[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250408223659.187109-2-matchstick@neverthere.org>
Date: Tue, 8 Apr 2025 22:36:41 +0000
From: Michael Rubin <matchstick@...erthere.org>
To: gregkh@...uxfoundation.org,
dpenkler@...il.com,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: Michael Rubin <matchstick@...erthere.org>
Subject: [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config
Using Linux code style for gpib_board_config struct in .h to allow drivers to
migrate.
Adhering to Linux code style.
In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.
Reported by CheckPatch
WARNING: do not add new typedefs
Signed-off-by: Michael Rubin <matchstick@...erthere.org>
---
drivers/staging/gpib/include/gpib_types.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index a5c21ac6affc..1c641f17bdeb 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -23,9 +23,10 @@
#include <linux/interrupt.h>
struct gpib_board;
+typedef struct gpib_board_config gpib_board_config_t;
/* config parameters that are only used by driver attach functions */
-typedef struct {
+struct gpib_board_config {
/* firmware blob */
void *init_data;
int init_data_length;
@@ -48,7 +49,7 @@ typedef struct {
char *device_path;
/* serial number of hardware to attach */
char *serial_number;
-} gpib_board_config_t;
+};
struct gpib_interface {
/* name of board */
--
2.43.0
Powered by blists - more mailing lists