[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221203030544.11543-1-jwp.linux@gmail.com>
Date: Fri, 2 Dec 2022 21:05:44 -0600
From: Joe Peterson <jwp.linux@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc: Joe Peterson <jwp.linux@...il.com>
Subject: [PATCH] staging: board: Remove control flow from macro
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@...il.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
Powered by blists - more mailing lists