linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	dhowells@redhat.com, kees@kernel.org, gustavoars@kernel.org,
	aleksander.lobakin@intel.com, tstruk@gigaio.com
Subject: Re: [PATCH net-next v2] uapi: wrap compiler_types.h in an ifdef instead of the implicit strip
Date: Wed, 27 Aug 2025 16:52:23 +0100	[thread overview]
Message-ID: <20250827155223.GA10519@horms.kernel.org> (raw)
In-Reply-To: <20250825201828.2370083-1-kuba@kernel.org>

On Mon, Aug 25, 2025 at 01:18:28PM -0700, Jakub Kicinski wrote:
> The uAPI stddef header includes compiler_types.h, a kernel-only
> header, to make sure that kernel definitions of annotations
> like __counted_by() take precedence.
> 
> There is a hack in scripts/headers_install.sh which strips includes
> of compiler.h and compiler_types.h when installing uAPI headers.
> While explicit handling makes sense for compiler.h, which is included
> all over the uAPI, compiler_types.h is only included by stddef.h
> (within the uAPI, obviously it's included in kernel code a lot).
> 
> Remove the stripping from scripts/headers_install.sh and wrap
> the include of compiler_types.h in #ifdef __KERNEL__ instead.
> This should be equivalent functionally, but is easier to understand
> to a casual reader of the code. It also makes it easier to work
> with kernel headers directly from under tools/
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> v2:
>  - remove the hack from scripts/headers_install.sh
>  - wrap in __KERNEL__ instead of removing
> v1: https://lore.kernel.org/20250818181848.799566-1-kuba@kernel.org

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-08-27 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 20:18 [PATCH net-next v2] uapi: wrap compiler_types.h in an ifdef instead of the implicit strip Jakub Kicinski
2025-08-27 15:52 ` Simon Horman [this message]
2025-08-28 11:20 ` patchwork-bot+netdevbpf

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=20250827155223.GA10519@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tstruk@gigaio.com \
    /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;
as well as URLs for NNTP newsgroup(s).