public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Dave Airlie <airlied@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm for 6.15-rc1
Date: Tue, 1 Apr 2025 16:14:55 -0300	[thread overview]
Message-ID: <20250401191455.GC325917@nvidia.com> (raw)
In-Reply-To: <CAK7LNAQThGkgtKgquRPv8Ysi_omedRthF1_++apKda-xWeWcbA@mail.gmail.com>

On Wed, Apr 02, 2025 at 03:46:34AM +0900, Masahiro Yamada wrote:
> However, it is annoying to make every header self-contained
> "just because we are checking this".

From my POV itis not "just because we are checking this", I have a
very deliberate reason for wanting headers to be self contained:

I want the clangd code indexer and editor integration to work fully.

When clangd is asked by the editor for a report on a header file it
cannot know the missing implicit includes and it's functionality is
degraded. It reports fake compilation errors, can't do all the
indexing functions, and is generally a bad experience. To be clear the
header is parsed and loaded into the database when some C file
included it, just the actual editing of the header doesn't work well.

This is a very big day-to-day negative for working on the code. I'm
frequently annoyed by headers that are pointlessly not self
contained. I'd really welcome someone doing a cleanup here.

I agree it should not be a hard rule. I was reading the thread you
linked to and I'm thinking the approach is not optimal.

The only header files that should be checked are ones that are
actually used as part of the build with the current kconfig. Christoph
is right that there are endless cases where headers should never be
parsed outside of specific kconfig settings.

So, I'd suggest a better way to run this is first build the kernel,
then mine the gcc -MD output (ie stored in the .XX.cmd files) to
generate a list of headers that are actually part of the build, then
only test those. That eliminates all the kconfig problems. Opt out any
special headers that really have a good reason not to be stand alone.

Jason

  reply	other threads:[~2025-04-01 19:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-28  2:53 [git pull] drm for 6.15-rc1 Dave Airlie
2025-03-29  0:47 ` Linus Torvalds
2025-03-31 10:17   ` Jani Nikula
2025-03-31 11:03     ` Simona Vetter
2025-03-31 13:31       ` Jason Gunthorpe
2025-04-01 12:21         ` Jani Nikula
2025-04-01 16:12           ` Linus Torvalds
2025-04-01 18:46             ` Masahiro Yamada
2025-04-01 19:14               ` Jason Gunthorpe [this message]
2025-04-01 19:36                 ` Masahiro Yamada
2025-04-01 19:42                 ` Jani Nikula
2025-04-01 19:46                   ` Jason Gunthorpe
2025-04-02 12:56                     ` Jani Nikula
2025-04-02 13:03                       ` Jason Gunthorpe
2025-04-02 13:53                         ` Jani Nikula
2025-04-02 14:41                           ` Simona Vetter
2025-04-02 16:34                             ` Jason Gunthorpe
2025-04-01 19:28               ` Jani Nikula
2025-03-31 15:42     ` Linus Torvalds
2025-04-01 12:34       ` Jani Nikula
2025-03-29  1:01 ` pr-tracker-bot

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=20250401191455.GC325917@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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