From: Nathan Chancellor <nathan@kernel.org> To: Takashi Iwai <tiwai@suse.de> Cc: Tom Rix <trix@redhat.com>, perex@perex.cz, tiwai@suse.com, ndesaulniers@google.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] ALSA: ymfpci: remove unused snd_ymfpci_readb function Date: Sun, 19 Mar 2023 16:34:44 -0700 [thread overview] Message-ID: <20230319233444.GA12415@dev-arch.thelio-3990X> (raw) In-Reply-To: <87mt49mabx.wl-tiwai@suse.de> On Sun, Mar 19, 2023 at 09:09:22AM +0100, Takashi Iwai wrote: > On Sat, 18 Mar 2023 14:27:08 +0100, > Tom Rix wrote: > > > > clang with W=1 reports > > sound/pci/ymfpci/ymfpci_main.c:34:18: error: > > unused function 'snd_ymfpci_readb' [-Werror,-Wunused-function] > > static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) > > ^ > > This static function is not used, so remove it. > > > > Signed-off-by: Tom Rix <trix@redhat.com> > > I applied now, but still wondering why it warns at all even if it's a > static inline function... See commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build") for some more information. The key part of the commit message is 'with W=1', this will not happen with a normal clang build. Cheers, Nathan > > --- > > sound/pci/ymfpci/ymfpci_main.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c > > index c80114c0ad7b..2858736ed20a 100644 > > --- a/sound/pci/ymfpci/ymfpci_main.c > > +++ b/sound/pci/ymfpci/ymfpci_main.c > > @@ -31,11 +31,6 @@ > > > > static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip); > > > > -static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) > > -{ > > - return readb(chip->reg_area_virt + offset); > > -} > > - > > static inline void snd_ymfpci_writeb(struct snd_ymfpci *chip, u32 offset, u8 val) > > { > > writeb(val, chip->reg_area_virt + offset); > > -- > > 2.27.0 > >
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Chancellor <nathan@kernel.org> To: Takashi Iwai <tiwai@suse.de> Cc: Tom Rix <trix@redhat.com>, tiwai@suse.com, ndesaulniers@google.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] ALSA: ymfpci: remove unused snd_ymfpci_readb function Date: Sun, 19 Mar 2023 16:34:44 -0700 [thread overview] Message-ID: <20230319233444.GA12415@dev-arch.thelio-3990X> (raw) In-Reply-To: <87mt49mabx.wl-tiwai@suse.de> On Sun, Mar 19, 2023 at 09:09:22AM +0100, Takashi Iwai wrote: > On Sat, 18 Mar 2023 14:27:08 +0100, > Tom Rix wrote: > > > > clang with W=1 reports > > sound/pci/ymfpci/ymfpci_main.c:34:18: error: > > unused function 'snd_ymfpci_readb' [-Werror,-Wunused-function] > > static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) > > ^ > > This static function is not used, so remove it. > > > > Signed-off-by: Tom Rix <trix@redhat.com> > > I applied now, but still wondering why it warns at all even if it's a > static inline function... See commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build") for some more information. The key part of the commit message is 'with W=1', this will not happen with a normal clang build. Cheers, Nathan > > --- > > sound/pci/ymfpci/ymfpci_main.c | 5 ----- > > 1 file changed, 5 deletions(-) > > > > diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c > > index c80114c0ad7b..2858736ed20a 100644 > > --- a/sound/pci/ymfpci/ymfpci_main.c > > +++ b/sound/pci/ymfpci/ymfpci_main.c > > @@ -31,11 +31,6 @@ > > > > static void snd_ymfpci_irq_wait(struct snd_ymfpci *chip); > > > > -static inline u8 snd_ymfpci_readb(struct snd_ymfpci *chip, u32 offset) > > -{ > > - return readb(chip->reg_area_virt + offset); > > -} > > - > > static inline void snd_ymfpci_writeb(struct snd_ymfpci *chip, u32 offset, u8 val) > > { > > writeb(val, chip->reg_area_virt + offset); > > -- > > 2.27.0 > >
next prev parent reply other threads:[~2023-03-19 23:34 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-18 13:27 [PATCH] ALSA: ymfpci: remove unused snd_ymfpci_readb function Tom Rix 2023-03-19 8:09 ` Takashi Iwai 2023-03-19 8:09 ` Takashi Iwai 2023-03-19 23:34 ` Nathan Chancellor [this message] 2023-03-19 23:34 ` Nathan Chancellor 2023-03-20 12:33 ` Tom Rix 2023-03-20 12:33 ` Tom Rix
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=20230319233444.GA12415@dev-arch.thelio-3990X \ --to=nathan@kernel.org \ --cc=alsa-devel@alsa-project.org \ --cc=linux-kernel@vger.kernel.org \ --cc=llvm@lists.linux.dev \ --cc=ndesaulniers@google.com \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ --cc=tiwai@suse.de \ --cc=trix@redhat.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.