[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0ccb377d-0073-9e3b-758d-441747002f6f@infradead.org>
Date: Wed, 12 Jan 2022 08:22:14 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Luis Chamberlain <mcgrof@...nel.org>, gregkh@...uxfoundation.org,
bp@...e.de
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
Borislav Petkov <bp@...en8.de>,
Masahiro Yamada <masahiroy@...nel.org>
Subject: Re: [PATCH v2] firmware_loader: simplfy builtin or module check
On 1/12/22 08:00, Luis Chamberlain wrote:
> The existing check is outdated and confuses developers. Use the
> already existing IS_REACHABLE() defined on kconfig.h which makes
> the intention much clearer.
Yes.
> Reported-by: Borislav Petkov <bp@...en8.de>
> Reported-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Suggested-by: Masahiro Yamada <masahiroy@...nel.org>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Cc: Masahiro Yamada <masahiroy@...nel.org>
> Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
Ackd-by: Randy Dunlap <rdunlap@...radead.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..ec2ccfebef65 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))
> +#if IS_REACHABLE(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
Powered by blists - more mailing lists