From: Randy Dunlap <rdunlap@infradead.org>
To: Luis Chamberlain <mcgrof@kernel.org>,
gregkh@linuxfoundation.org, bp@suse.de
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH] firmware_loader: simplfy builtin or module check
Date: Tue, 11 Jan 2022 22:37:10 -0800 [thread overview]
Message-ID: <3e721c69-afa9-6634-2e52-e9a9c2a89372@infradead.org> (raw)
In-Reply-To: <20220112023416.215644-1-mcgrof@kernel.org>
On 1/11/22 18:34, Luis Chamberlain wrote:
> The existing check is outdated and confuses developers. Use the
> already existing IS_ENABLED() defined on kconfig.h which makes
> the intention much clearer.
>
> Reported-by: Borislav Petkov <bp@alien8.de>
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> include/linux/firmware.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/firmware.h b/include/linux/firmware.h
> index 3b057dfc8284..fa3493dbe84a 100644
> --- a/include/linux/firmware.h
> +++ b/include/linux/firmware.h
> @@ -34,7 +34,7 @@ static inline bool firmware_request_builtin(struct firmware *fw,
> }
> #endif
>
> -#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
The "defined(MODULE)" part wasn't needed here. :)
> +#if IS_ENABLED(CONFIG_FW_LOADER)
> int request_firmware(const struct firmware **fw, const char *name,
> struct device *device);
> int firmware_request_nowarn(const struct firmware **fw, const char *name,
--
~Randy
next prev parent reply other threads:[~2022-01-12 6:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 2:34 [PATCH] firmware_loader: simplfy builtin or module check Luis Chamberlain
2022-01-12 6:37 ` Randy Dunlap [this message]
2022-01-12 6:56 ` Masahiro Yamada
2022-01-12 7:03 ` Randy Dunlap
2022-01-12 7:36 ` Randy Dunlap
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=3e721c69-afa9-6634-2e52-e9a9c2a89372@infradead.org \
--to=rdunlap@infradead.org \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).