From: Nathan Chancellor <nathan@kernel.org>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Nicolas Schier <nsc@kernel.org>,
patso@likewhatevs.io, Justin Stitt <justinstitt@google.com>,
eddyz87@gmail.com, Linus Torvalds <torvalds@linux-foundation.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
regressions@lists.linux.dev
Subject: Re: [GIT PULL] kbuild changes for v6.19
Date: Wed, 17 Dec 2025 17:32:02 +0900 [thread overview]
Message-ID: <20251217083202.GA2118121@ax162> (raw)
In-Reply-To: <CACT4Y+Z8aCz0XcoJx9XXPHZSZHxGF8Kx9iUbFarhpTSEPDhMfg@mail.gmail.com>
On Wed, Dec 17, 2025 at 05:16:02PM +0900, Dmitry Vyukov wrote:
> On Mon, 1 Dec 2025 at 16:38, Nicolas Schier <nsc@kernel.org> wrote:
> > Pat Somaru (1):
> > scripts/clang-tools: Handle included .c files in gen_compile_commands
>
> /\/\/\/\/\/\/\
>
> This commit breaks invocation of clang tools for me.
>
> For example I now have this fake entry for mock_uncore.c which
> pretends to produce intel_uncore.o (along with 2 other commands which
> produce the same object file):
...
> An attempt to invoke a clang tool using this database legitimately
> fails with the following errors (the file is not supposed and can't
> compile on its own):
>
> clang-tool: drivers/gpu/drm/i915/selftests/mock_uncore.c: exit status 1
> drivers/gpu/drm/i915/selftests/mock_uncore.c:47:2: error: call to
> undeclared function 'ASSIGN_RAW_WRITE_MMIO_VFUNCS'; ISO C99 and later
> do not support implicit function declarations
> [-Wimplicit-function-declaration]
> 47 | ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, nop);
> | ^
> drivers/gpu/drm/i915/selftests/mock_uncore.c:47:39: error: use of
> undeclared identifier 'nop'; did you mean 'nopv'?
> 47 | ASSIGN_RAW_WRITE_MMIO_VFUNCS(uncore, nop);
> | ^~~
> | nopv
> /arch/x86/include/asm/hypervisor.h:71:13: note: 'nopv' declared here
> 71 | extern bool nopv;
> | ^
> drivers/gpu/drm/i915/selftests/mock_uncore.c:48:2: error: call to
> undeclared function 'ASSIGN_RAW_READ_MMIO_VFUNCS'; ISO C99 and later
> do not support implicit function declarations
> [-Wimplicit-function-declaration]
> 48 | ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, nop);
> | ^
> drivers/gpu/drm/i915/selftests/mock_uncore.c:48:38: error: use of
> undeclared identifier 'nop'; did you mean 'nopv'?
> 48 | ASSIGN_RAW_READ_MMIO_VFUNCS(uncore, nop);
> | ^~~
> | nopv
> /arch/x86/include/asm/hypervisor.h:71:13: note: 'nopv' declared here
> 71 | extern bool nopv;
> | ^
> 4 errors generated.
> Error while processing /drivers/gpu/drm/i915/selftests/mock_uncore.c.
>
>
> What am I doing wrong?
Nothing. As you note, ASSIGN_RAW_WRITE_MMIO_VFUNCS is defined in
drivers/gpu/drm/i915/intel_uncore.c but it is used in
drivers/gpu/drm/i915/selftests/mock_uncore.c, which is not designed to
be built standalone. We could potentially move
ASSIGN_RAW_WRITE_MMIO_VFUNCS into a common header to avoid this but I
think I would rather just revert 9362d34acf91, as I already figured that
this was going to be fragile:
https://lore.kernel.org/20251007163338.GA547361@ax162/
I would rather discourage including .c files if folks want clangd to
work properly since this seems fundamentally unsolvable if developers
have written .c files in this manner. I am open to other thoughts
though.
Cheers,
Nathan
next prev parent reply other threads:[~2025-12-17 8:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 15:37 [GIT PULL] kbuild changes for v6.19 Nicolas Schier
2025-12-03 23:50 ` pr-tracker-bot
2025-12-17 8:16 ` Dmitry Vyukov
2025-12-17 8:32 ` Nathan Chancellor [this message]
2025-12-17 8:39 ` Dmitry Vyukov
2025-12-17 10:16 ` Dmitry Vyukov
2025-12-17 10:45 ` Nathan Chancellor
2025-12-17 12:07 ` Dmitry Vyukov
2025-12-17 13:03 ` Pat Somaru
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=20251217083202.GA2118121@ax162 \
--to=nathan@kernel.org \
--cc=dvyukov@google.com \
--cc=eddyz87@gmail.com \
--cc=justinstitt@google.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsc@kernel.org \
--cc=patso@likewhatevs.io \
--cc=regressions@lists.linux.dev \
--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