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