* [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface
@ 2025-04-09 17:35 Michael Rubin
0 siblings, 0 replies; 2+ messages in thread
From: Michael Rubin @ 2025-04-09 17:35 UTC (permalink / raw)
To: gregkh, dpenkler, dan.carpenter
Cc: linux-staging, linux-kernel, Michael Rubin
"Having the word "_struct" in the name of the struct doesn't add any
information so rename "struct gpib_interface_struct" to
"struct gpib_interface".
Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
drivers/staging/gpib/include/gpib_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 2d9b9be683f8..10d8776ef425 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -22,7 +22,7 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
-typedef struct gpib_interface_struct gpib_interface_t;
+typedef struct gpib_interface gpib_interface_t;
struct gpib_board;
/* config parameters that are only used by driver attach functions */
@@ -51,7 +51,7 @@ typedef struct {
char *serial_number;
} gpib_board_config_t;
-struct gpib_interface_struct {
+struct gpib_interface {
/* name of board */
char *name;
/* attach() initializes board and allocates resources */
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH v2 00/18] staging: gpib: Removing typedef of gpib_interface_t
@ 2025-04-16 20:41 Michael Rubin
2025-04-16 20:41 ` [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
0 siblings, 1 reply; 2+ messages in thread
From: Michael Rubin @ 2025-04-16 20:41 UTC (permalink / raw)
To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin
Using Linux code style for struct gpib_interface.
Adhering to Linux code style.
Reported by checkpatch.pl
In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.
* Patch 1: "struct gpib_interface"
Having the word "_struct" in the name of the struct doesn't add any
information so rename "struct gpib_interface_struct" to
"struct gpib_interface".
* Patch 2 - Patch 17: Replacing gpib_interface_t with "struct gpib_interface"
* Patch 18: Removing typedef for gpib_interface_t.
Michael Rubin (18):
staging: gpib: struct typing for gpib_interface
staging: gpib: agilent_82350b: gpib_interface
staging: gpib: agilent_82357a: gpib_interface
staging: gpib: cb7210: struct gpib_interface
staging: gpib: cec: struct gpib_interface
staging: gpib: common: struct gpib_interface
staging: gpib: fluke: struct gpib_interface
staging: gpib: fmh: struct gpib_interface
staging: gpib: gpio: struct gpib_interface
staging: gpib: hp_82335: struct gpib_interface
staging: gpib: hp2341: struct gpib_interface
staging: gpib: gpibP: struct gpib_interface
staging: gpib: ines: struct gpib_interface
staging: gpib: lpvo_usb: struct gpib_interface
staging: gpib: ni_usb: struct gpib_interface
staging: gpib: pc2: struct gpib_interface
staging: gpib: tnt4882: struct gpib_interface
staging: gpib: Removing typedef gpib_interface_t
.../gpib/agilent_82350b/agilent_82350b.c | 4 ++--
.../gpib/agilent_82357a/agilent_82357a.c | 2 +-
drivers/staging/gpib/cb7210/cb7210.c | 18 +++++++-------
drivers/staging/gpib/cec/cec_gpib.c | 2 +-
drivers/staging/gpib/common/gpib_os.c | 4 ++--
drivers/staging/gpib/eastwood/fluke_gpib.c | 6 ++---
drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 8 +++----
drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +-
drivers/staging/gpib/hp_82335/hp82335.c | 2 +-
drivers/staging/gpib/hp_82341/hp_82341.c | 4 ++--
drivers/staging/gpib/include/gpibP.h | 6 ++---
drivers/staging/gpib/include/gpib_types.h | 9 ++++---
drivers/staging/gpib/ines/ines_gpib.c | 14 +++++------
.../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +-
drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 2 +-
drivers/staging/gpib/pc2/pc2_gpib.c | 8 +++----
drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 24 +++++++++----------
17 files changed, 58 insertions(+), 59 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface
2025-04-16 20:41 [PATCH v2 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
@ 2025-04-16 20:41 ` Michael Rubin
0 siblings, 0 replies; 2+ messages in thread
From: Michael Rubin @ 2025-04-16 20:41 UTC (permalink / raw)
To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin
"Having the word "_struct" in the name of the struct doesn't add any
information so rename "struct gpib_interface_struct" to
"struct gpib_interface".
Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
drivers/staging/gpib/include/gpib_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 71af9e808a76..16aaade310fd 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -22,7 +22,7 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
-typedef struct gpib_interface_struct gpib_interface_t;
+typedef struct gpib_interface gpib_interface_t;
struct gpib_board;
/* config parameters that are only used by driver attach functions */
@@ -51,7 +51,7 @@ struct gpib_board_config {
char *serial_number;
};
-struct gpib_interface_struct {
+struct gpib_interface {
/* name of board */
char *name;
/* attach() initializes board and allocates resources */
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-16 20:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 17:35 [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
2025-04-16 20:41 [PATCH v2 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
2025-04-16 20:41 ` [PATCH v2 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®