Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Bjorn Helgaas" <helgaas@kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"kernel test robot" <lkp@intel.com>,
	linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>
Subject: Re: [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b
Date: Wed, 1 Nov 2023 10:34:32 -0700	[thread overview]
Message-ID: <20231101173432.GC1368360@dev-arch.thelio-3990X> (raw)
In-Reply-To: <da1413c0-d81a-47b6-8283-0fb3da7975e6@app.fastmail.com>

On Wed, Nov 01, 2023 at 10:25:25AM +0100, Arnd Bergmann wrote:
> On Tue, Oct 31, 2023, at 18:14, Bjorn Helgaas wrote:
> > On Tue, Oct 31, 2023 at 09:59:29AM -0700, Nick Desaulniers wrote:
> >> On Tue, Oct 31, 2023 at 7:56 AM Bjorn Helgaas <helgaas@kernel.org> wrote:
> 
> >> >   arch/powerpc/xmon/xmon.c:             release_output_lock();
> >> >
> >> > That said, the unused functions do look legit:
> >> >
> >> > grackle_set_stg() is a static function and the only call is under
> >> > "#if 0".
> >> 
> >> Time to remove it then? Or is it a bug that it's not called?
> >> Otherwise the definition should be behind the same preprocessor guards
> >> as the caller.  Same for the below.
> 
> It would be nice to get rid of all warnings about unused
> "static inline" functions and "static const" variables in .c
> files. I think both these warnings got added at the W=1 level
> for compilers that support them at some point, but are ignored
> for normal builds without W=1 because they are too noisy.
> 
> Obviously, all compilers ignore unused inline functions and
> const variables in header files regardless of the warning level.

Right, this was an intentional change done by Masahiro to try and take
advantage of the fact that clang warns about unused static inline
functions in .c files (whereas GCC has no warning in .c or .h files) to
clean up dead code. See commit 6863f5643dd7 ("kbuild: allow Clang to
find unused static inline functions for W=1 build") for more
information.

Cheers,
Nathan

      reply	other threads:[~2023-11-01 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28 12:22 [pci:controller/xilinx-xdma] BUILD REGRESSION 8d786149d78c7784144c7179e25134b6530b714b kernel test robot
2023-10-31 14:56 ` Bjorn Helgaas
2023-10-31 16:24   ` Segher Boessenkool
2023-10-31 16:59   ` Nick Desaulniers
2023-10-31 17:14     ` Bjorn Helgaas
2023-11-01  9:25       ` Arnd Bergmann
2023-11-01 17:34         ` Nathan Chancellor [this message]

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=20231101173432.GC1368360@dev-arch.thelio-3990X \
    --to=nathan@kernel.org \
    --cc=arnd@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=lkp@intel.com \
    --cc=ndesaulniers@google.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