All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] firmware_loader: simplfy builtin or module check
@ 2022-01-12 16:00 Luis Chamberlain
  2022-01-12 16:22 ` Randy Dunlap
  2022-01-12 17:38 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Luis Chamberlain @ 2022-01-12 16:00 UTC (permalink / raw)
  To: gregkh, bp
  Cc: linux-kernel, linux-fsdevel, Luis Chamberlain, Borislav Petkov,
	Masahiro Yamada, Randy Dunlap

The existing check is outdated and confuses developers. Use the
already existing IS_REACHABLE() 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>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 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,
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] firmware_loader: simplfy builtin or module check
  2022-01-12 16:00 [PATCH v2] firmware_loader: simplfy builtin or module check Luis Chamberlain
@ 2022-01-12 16:22 ` Randy Dunlap
  2022-01-12 17:38 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2022-01-12 16:22 UTC (permalink / raw)
  To: Luis Chamberlain, gregkh, bp
  Cc: linux-kernel, linux-fsdevel, Borislav Petkov, Masahiro Yamada



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@alien8.de>
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>

Ackd-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..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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] firmware_loader: simplfy builtin or module check
  2022-01-12 16:00 [PATCH v2] firmware_loader: simplfy builtin or module check Luis Chamberlain
  2022-01-12 16:22 ` Randy Dunlap
@ 2022-01-12 17:38 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2022-01-12 17:38 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: bp, linux-kernel, linux-fsdevel, Borislav Petkov,
	Masahiro Yamada, Randy Dunlap

On Wed, Jan 12, 2022 at 08:00:53AM -0800, 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.
> 
> Reported-by: Borislav Petkov <bp@alien8.de>
> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
>  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,
> -- 
> 2.34.1
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-12 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 16:00 [PATCH v2] firmware_loader: simplfy builtin or module check Luis Chamberlain
2022-01-12 16:22 ` Randy Dunlap
2022-01-12 17:38 ` Greg KH

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.