lkml.org 
[lkml]   [2022]   [Aug]   [23]   [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 Tue, Aug 23, 2022 at 6:49 PM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> That's the
>
> > It does require that kernel change to make
> >
> > #define is_signed_type(type) (((type)(-1)) <= (type)0)
>
> part I was talking about.

Side note: I think you could move this into '<linux/compiler.h>' and that would

(a) make some conceptual sense (unlike "overflow.h" and "trace_events.h")

and

(b) mean it gets included automatically in both files.

overflow.h already explicitly includes compiler.h, and trace_events.h
gets it from

linux/ring_buffer.h -> linux/mm.h -> linux/bug.h -> asm/bug.h ->
linux/compiler.h

(it goes other wats too, but those ones are through arch-specific asm
headers, so the above is the first non-arch-specific unconditional
chain I found.

And yes, we should have some tool for sorting out these nasty header
chains. Some automated tool that says "You don't need header X,
because you already got it" or "You don't need headed X, because
nothing you do depends on it".

Linus

\
 
 \ /
  Last update: 2022-08-24 04:11    [W:2.053 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site