All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Input: gameport - use IS_REACHABLE() instead of open-coding it
@ 2023-07-06  0:30 Dmitry Torokhov
  2023-07-06  1:07 ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2023-07-06  0:30 UTC (permalink / raw)
  To: linux-kernel

Replace an open-coded preprocessor conditional with an equivalent helper.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 include/linux/gameport.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 0a221e768ea4..07e370113b2b 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -63,7 +63,7 @@ struct gameport_driver {
 int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode);
 void gameport_close(struct gameport *gameport);
 
-#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
+#if IS_REACHABLE(CONFIG_GAMEPORT)
 
 void __gameport_register_port(struct gameport *gameport, struct module *owner);
 /* use a define to avoid include chaining to get THIS_MODULE */
-- 
2.41.0.255.g8b1d071c50-goog


-- 
Dmitry

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

* Re: [PATCH] Input: gameport - use IS_REACHABLE() instead of open-coding it
  2023-07-06  0:30 [PATCH] Input: gameport - use IS_REACHABLE() instead of open-coding it Dmitry Torokhov
@ 2023-07-06  1:07 ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-07-06  1:07 UTC (permalink / raw)
  To: Dmitry Torokhov, linux-kernel



On 7/5/23 17:30, Dmitry Torokhov wrote:
> Replace an open-coded preprocessor conditional with an equivalent helper.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  include/linux/gameport.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/gameport.h b/include/linux/gameport.h
> index 0a221e768ea4..07e370113b2b 100644
> --- a/include/linux/gameport.h
> +++ b/include/linux/gameport.h
> @@ -63,7 +63,7 @@ struct gameport_driver {
>  int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mode);
>  void gameport_close(struct gameport *gameport);
>  
> -#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
> +#if IS_REACHABLE(CONFIG_GAMEPORT)
>  
>  void __gameport_register_port(struct gameport *gameport, struct module *owner);
>  /* use a define to avoid include chaining to get THIS_MODULE */

-- 
~Randy

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

end of thread, other threads:[~2023-07-06  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06  0:30 [PATCH] Input: gameport - use IS_REACHABLE() instead of open-coding it Dmitry Torokhov
2023-07-06  1:07 ` Randy Dunlap

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.