lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings triggered by is_signed_type()
On Mon, Aug 22, 2022 at 11:20 AM Bart Van Assche <bvanassche@acm.org> wrote:
>
> I agree that it's better that sparse sees the same code as what is used to
> build the kernel. However, I do not agree that the patch above is a solution.
> Sparse reports a warning for the suggested definition above of is_signed_type()
> because the new definition tries to use the less-than (<) operator to compare
> two __bitwise types.

Argh. I forgot that part. It wasn't just the cast that warned, it was
the compare too.

But we did have a sparse fix for it, didn't we? That fix required that
the '< (type)1' cast be changed to '<= (type)0' iirc, and a patch to
sparse, but it at least avoided the problem.

Linus

\
 
 \ /
  Last update: 2022-08-22 20:47    [W:0.081 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site