From: Takashi Iwai <tiwai@suse.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Qian Cai <cai@lca.pw>,
mcgrof@kernel.org, issor.oruam@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firmware: fix -Wunused-function compiler warnings
Date: Wed, 31 Jul 2019 14:53:37 +0200 [thread overview]
Message-ID: <s5hzhkuqsa6.wl-tiwai@suse.de> (raw)
In-Reply-To: <20190731124437.GA4786@kroah.com>
On Wed, 31 Jul 2019 14:44:37 +0200,
Greg KH wrote:
>
> On Tue, Jul 23, 2019 at 09:32:02AM -0400, Qian Cai wrote:
> > The commit 5342e7093ff2 ("firmware: Factor out the paged buffer handling
> > code") introduced a few compilation warnings when
> > CONFIG_FW_LOADER_USER_HELPER=n due to fw_grow_paged_buf() and
> > fw_grow_paged_buf() are only used in
> > drivers/base/firmware_loader/fallback.c, and the later will only be
> > built if CONFIG_FW_LOADER_USER_HELPER=y.
> >
> > In file included from drivers/base/firmware_loader/main.c:41:
> > drivers/base/firmware_loader/firmware.h:145:12: warning:
> > 'fw_map_paged_buf' defined but not used [-Wunused-function]
> > static int fw_map_paged_buf(struct fw_priv *fw_priv) { return -ENXIO; }
> > ^~~~~~~~~~~~~~~~
> > drivers/base/firmware_loader/firmware.h:144:12: warning:
> > 'fw_grow_paged_buf' defined but not used [-Wunused-function]
> > static int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed)
> > { return -ENXIO; }
> >
> > Fix it by removing those unused functions all together when
> > CONFIG_FW_LOADER_USER_HELPER=n.
> >
> > Fixes: 5342e7093ff2 ("firmware: Factor out the paged buffer handling code")
> > Signed-off-by: Qian Cai <cai@lca.pw>
> > ---
> > drivers/base/firmware_loader/firmware.h | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/base/firmware_loader/firmware.h b/drivers/base/firmware_loader/firmware.h
> > index 842e63f19f22..e74117bf8587 100644
> > --- a/drivers/base/firmware_loader/firmware.h
> > +++ b/drivers/base/firmware_loader/firmware.h
> > @@ -141,8 +141,6 @@ int assign_fw(struct firmware *fw, struct device *device,
> > int fw_map_paged_buf(struct fw_priv *fw_priv);
> > #else
> > static inline void fw_free_paged_buf(struct fw_priv *fw_priv) {}
> > -static int fw_grow_paged_buf(struct fw_priv *fw_priv, int pages_needed) { return -ENXIO; }
> > -static int fw_map_paged_buf(struct fw_priv *fw_priv) { return -ENXIO; }
> > #endif
> >
> > #endif /* __FIRMWARE_LOADER_H */
> > --
> > 1.8.3.1
> >
>
> Is this still needed with 5.3-rc2? If so, please rebase and resend as
> it does not apply to there.
This should have been already covered by my follow-up patch, commit
333a2101f47c "firmware: Fix missing inline"
thanks,
Takashi
prev parent reply other threads:[~2019-07-31 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 13:32 [PATCH] firmware: fix -Wunused-function compiler warnings Qian Cai
2019-07-31 12:44 ` Greg KH
2019-07-31 12:53 ` Takashi Iwai [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=s5hzhkuqsa6.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cai@lca.pw \
--cc=gregkh@linuxfoundation.org \
--cc=issor.oruam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.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