[PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config
From: Michael Rubin
Date: Tue Apr 08 2025 - 18:37:16 EST
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@xxxxxxxxxxxxxx>
---
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