public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/5] kbuild: uapi: upgrade check_sizetypes() warning to error
Date: Wed, 8 Oct 2025 21:52:02 +0200	[thread overview]
Message-ID: <aObA4vNF4tppZ5vR@levanger> (raw)
In-Reply-To: <20251006190048.GA2395186@ax162>

On Mon, Oct 06, 2025 at 12:00:48PM -0700, Nathan Chancellor wrote:
> On Wed, Aug 13, 2025 at 08:16:59AM +0200, Thomas Weißschuh wrote:
> > No problematic type usages exist anymore.
> > 
> > Make sure it stays this way.
> > 
> > Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
> > Reviewed-by: Nicolas Schier <nsc@kernel.org>
> > ---
> >  usr/include/headers_check.pl | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/usr/include/headers_check.pl b/usr/include/headers_check.pl
> > index 36307a137cc1e109e3e1c253f66f3e5935499fc8..36349b21cef5d55241b68ca24dabe6a321b7ce27 100755
> > --- a/usr/include/headers_check.pl
> > +++ b/usr/include/headers_check.pl
> > @@ -159,7 +159,6 @@ sub check_sizetypes
> >  		              "found __[us]{8,16,32,64} type " .
> >  		              "without #include <linux/types.h>\n";
> >  		$linux_types = 2;
> > -		# Warn until headers are all fixed
> > -		#$ret = 1;
> > +		$ret = 1;
> >  	}
> >  }
> > 
> > -- 
> > 2.50.1
> > 
> 
> Geert's regression report and subsequent fix made me look a little
> closer at this check. Is it even useful to do this anymore now that we
> compile test the headers? If these types are found without the
> appropriate include, won't there just be an error? Or is this to avoid
> the case where a system header may transitively include types.h so the
> compile would succeed but the header is not as contained as it could be?

Good question.  I think you're right, that header compiling should be
enough.

I cannot think of a sensible way that with successful header compile
test for an UAPI header file that is not contained. 

Setting USERCFLAGS='-include something/like/types.h' during header
compilation may hide a missing '#include <linux/types.h>', but I don't
think that this is a good reason to keep the checking.

Kind regards,
Nicolas

  reply	other threads:[~2025-10-09  3:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13  6:16 [PATCH v2 0/5] kbuild: uapi: various fixes Thomas Weißschuh
2025-08-13  6:16 ` [PATCH v2 1/5] kbuild: uapi: rerun header tests when headers_check.pl changes Thomas Weißschuh
2025-08-13  6:16 ` [PATCH v2 2/5] kbuild: uapi: fail header test on compiler warnings Thomas Weißschuh
2025-08-13  6:16 ` [PATCH v2 3/5] kbuild: uapi: upgrade warning on asm/types.h inclusion to error Thomas Weißschuh
2025-08-13  6:16 ` [PATCH v2 4/5] kbuild: uapi: upgrade check_sizetypes() warning " Thomas Weißschuh
2025-10-06  8:53   ` Geert Uytterhoeven
2025-10-06 19:00   ` Nathan Chancellor
2025-10-08 19:52     ` Nicolas Schier [this message]
2025-10-09 16:56       ` Nathan Chancellor
2025-08-13  6:17 ` [PATCH v2 5/5] kbuild: uapi: upgrade check_declarations() " Thomas Weißschuh
2025-08-14 19:11 ` [PATCH v2 0/5] kbuild: uapi: various fixes Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aObA4vNF4tppZ5vR@levanger \
    --to=nsc@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox