Re: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings triggered by is_signed_type()

From: Linus Torvalds
Date: Thu Aug 25 2022 - 04:07:56 EST


On Thu, Aug 25, 2022 at 12:57 AM Rasmus Villemoes
<linux@xxxxxxxxxxxxxxxxxx> wrote:
>
> One can also make the RHS not be a null pointer constant with something like
>
> (((t)(-1)) <= (1 ? (t)0 : (t)0))

Oh Gods.

Let's not go there. I'm sure some version of gcc will figure that out
as being NULL in the end and warn about that too.

I do agree that a comment about the exact choice and why (integers vs
pointers with NULL conversions, and compilers vs sparse) for the
particular syntax would not be misplaced.

Linus