Re: [PATCH v6 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock

From: Luc Van Oostenryck
Date: Thu Nov 14 2019 - 19:38:31 EST


On Thu, Nov 14, 2019 at 03:57:34PM -0500, Alex Kogan wrote:
> + linux-sparse mailing list
>
> It seems like a bug in the way sparse handles âpureâ functions that return
> a pointer.

Yes, it's a bug in sparse.

> The warnings can be eliminated by adding an explicit cast, e.g.:
>
> node = (struct mcs_spinlock *)grab_mcs_node(node, idx);
>
> but this seems wrong (unnecessary) to me.

Indeed, it would be wrong.

Thanks for analyzing and reporting this,
-- Luc