public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: board: Remove control flow from macro
@ 2022-12-03  3:05 Joe Peterson
  2022-12-03  8:37 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joe Peterson @ 2022-12-03  3:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Joe Peterson

Adhere to Linux coding style

Reported by checkpatch:

WARNING: Macros with flow control statements should be avoided

There is only one return value possible. Remove the checkpatch warning
without effecting functionality.

Signed-off-by: Joe Peterson <jwp.linux@gmail.com>
---
 drivers/staging/board/board.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/board/board.h b/drivers/staging/board/board.h
index 5609daf4d869..94823d3ffbe9 100644
--- a/drivers/staging/board/board.h
+++ b/drivers/staging/board/board.h
@@ -33,12 +33,10 @@ void board_staging_register_devices(const struct board_staging_dev *devs,
 				    unsigned int ndevs);
 
 #define board_staging(str, fn)			\
-static int __init runtime_board_check(void)	\
+static void __init runtime_board_check(void)	\
 {						\
 	if (of_machine_is_compatible(str))	\
 		fn();				\
-						\
-	return 0;				\
 }						\
 						\
 device_initcall(runtime_board_check)
-- 
2.20.1


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

end of thread, other threads:[~2022-12-05  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-03  3:05 [PATCH] staging: board: Remove control flow from macro Joe Peterson
2022-12-03  8:37 ` Dan Carpenter
2022-12-03 10:46 ` kernel test robot
2022-12-05  8:52 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox