public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t
@ 2025-04-08 22:24 Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
                   ` (17 more replies)
  0 siblings, 18 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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: Adding "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          |  4 ++--
 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, 57 insertions(+), 58 deletions(-)

-- 
2.43.0


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

* [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-09  8:26   ` Dan Carpenter
  2025-04-08 22:24 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_interface Michael Rubin
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for gpib_interface 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@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 related	[flat|nested] 23+ messages in thread

* [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_interface Michael Rubin
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
index 445b9380ff98..3880d4a23eea 100644
--- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
+++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
@@ -773,7 +773,7 @@ static void agilent_82350b_detach(struct gpib_board *board)
 	agilent_82350b_free_private(board);
 }
 
-static gpib_interface_t agilent_82350b_unaccel_interface = {
+static struct gpib_interface agilent_82350b_unaccel_interface = {
 	.name = "agilent_82350b_unaccel",
 	.attach = agilent_82350b_unaccel_attach,
 	.detach = agilent_82350b_detach,
@@ -801,7 +801,7 @@ static gpib_interface_t agilent_82350b_unaccel_interface = {
 	.return_to_local = agilent_82350b_return_to_local,
 };
 
-static gpib_interface_t agilent_82350b_interface = {
+static struct gpib_interface agilent_82350b_interface = {
 	.name = "agilent_82350b",
 	.attach = agilent_82350b_accel_attach,
 	.detach = agilent_82350b_detach,
-- 
2.43.0


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

* [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_interface Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_interface Michael Rubin
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/agilent_82357a/agilent_82357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index 16cc5333beba..29c390b4f4e4 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -1432,7 +1432,7 @@ static void agilent_82357a_detach(struct gpib_board *board)
 	mutex_unlock(&agilent_82357a_hotplug_lock);
 }
 
-static gpib_interface_t agilent_82357a_gpib_interface = {
+static struct gpib_interface agilent_82357a_gpib_interface = {
 	.name = "agilent_82357a",
 	.attach = agilent_82357a_attach,
 	.detach = agilent_82357a_detach,
-- 
2.43.0


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

* [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (2 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_interface Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/cb7210/cb7210.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index 6b22a33a8c4f..20cea66d6557 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -686,7 +686,7 @@ static void cb7210_return_to_local(struct gpib_board *board)
 	write_byte(nec_priv, AUX_RTL, AUXMR);
 }
 
-static gpib_interface_t cb_pci_unaccel_interface = {
+static struct gpib_interface cb_pci_unaccel_interface = {
 	.name = "cbi_pci_unaccel",
 	.attach = cb_pci_attach,
 	.detach = cb_pci_detach,
@@ -714,7 +714,7 @@ static gpib_interface_t cb_pci_unaccel_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_pci_accel_interface = {
+static struct gpib_interface cb_pci_accel_interface = {
 	.name = "cbi_pci_accel",
 	.attach = cb_pci_attach,
 	.detach = cb_pci_detach,
@@ -742,7 +742,7 @@ static gpib_interface_t cb_pci_accel_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_pci_interface = {
+static struct gpib_interface cb_pci_interface = {
 	.name = "cbi_pci",
 	.attach = cb_pci_attach,
 	.detach = cb_pci_detach,
@@ -769,7 +769,7 @@ static gpib_interface_t cb_pci_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_isa_unaccel_interface = {
+static struct gpib_interface cb_isa_unaccel_interface = {
 	.name = "cbi_isa_unaccel",
 	.attach = cb_isa_attach,
 	.detach = cb_isa_detach,
@@ -797,7 +797,7 @@ static gpib_interface_t cb_isa_unaccel_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_isa_interface = {
+static struct gpib_interface cb_isa_interface = {
 	.name = "cbi_isa",
 	.attach = cb_isa_attach,
 	.detach = cb_isa_detach,
@@ -824,7 +824,7 @@ static gpib_interface_t cb_isa_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_isa_accel_interface = {
+static struct gpib_interface cb_isa_accel_interface = {
 	.name = "cbi_isa_accel",
 	.attach = cb_isa_attach,
 	.detach = cb_isa_detach,
@@ -1333,7 +1333,7 @@ static void cb_pcmcia_cleanup_module(void)
 	pcmcia_unregister_driver(&cb_gpib_cs_driver);
 }
 
-static gpib_interface_t cb_pcmcia_unaccel_interface = {
+static struct gpib_interface cb_pcmcia_unaccel_interface = {
 	.name = "cbi_pcmcia_unaccel",
 	.attach = cb_pcmcia_attach,
 	.detach = cb_pcmcia_detach,
@@ -1361,7 +1361,7 @@ static gpib_interface_t cb_pcmcia_unaccel_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_pcmcia_interface = {
+static struct gpib_interface cb_pcmcia_interface = {
 	.name = "cbi_pcmcia",
 	.attach = cb_pcmcia_attach,
 	.detach = cb_pcmcia_detach,
@@ -1389,7 +1389,7 @@ static gpib_interface_t cb_pcmcia_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static gpib_interface_t cb_pcmcia_accel_interface = {
+static struct gpib_interface cb_pcmcia_accel_interface = {
 	.name = "cbi_pcmcia_accel",
 	.attach = cb_pcmcia_attach,
 	.detach = cb_pcmcia_detach,
-- 
2.43.0


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

* [PATCH v1 05/18] staging: gpib: cec: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (3 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_interface Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/cec/cec_gpib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/cec/cec_gpib.c b/drivers/staging/gpib/cec/cec_gpib.c
index a822fa428cd0..dfc718de1532 100644
--- a/drivers/staging/gpib/cec/cec_gpib.c
+++ b/drivers/staging/gpib/cec/cec_gpib.c
@@ -188,7 +188,7 @@ static void cec_return_to_local(struct gpib_board *board)
 	nec7210_return_to_local(board, &priv->nec7210_priv);
 }
 
-static gpib_interface_t cec_pci_interface = {
+static struct gpib_interface cec_pci_interface = {
 	.name = "cec_pci",
 	.attach = cec_pci_attach,
 	.detach = cec_pci_detach,
-- 
2.43.0


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

* [PATCH v1 06/18] staging: gpib: common: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (4 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 07/18] staging: gpib: fluke: " Michael Rubin
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/common/gpib_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 711e99b1581a..940ea05ba478 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -2024,7 +2024,7 @@ void init_gpib_descriptor(gpib_descriptor_t *desc)
 	atomic_set(&desc->io_in_progress, 0);
 }
 
-int gpib_register_driver(gpib_interface_t *interface, struct module *provider_module)
+int gpib_register_driver(struct gpib_interface *interface, struct module *provider_module)
 {
 	struct gpib_interface_list_struct *entry;
 
@@ -2040,7 +2040,7 @@ int gpib_register_driver(gpib_interface_t *interface, struct module *provider_mo
 }
 EXPORT_SYMBOL(gpib_register_driver);
 
-void gpib_unregister_driver(gpib_interface_t *interface)
+void gpib_unregister_driver(struct gpib_interface *interface)
 {
 	int i;
 	struct list_head *list_ptr;
-- 
2.43.0


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

* [PATCH v1 07/18] staging: gpib: fluke: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (5 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/eastwood/fluke_gpib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index d289c321c153..68f888a75edc 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -698,7 +698,7 @@ static int fluke_accel_read(struct gpib_board *board, uint8_t *buffer, size_t le
 	return retval;
 }
 
-static gpib_interface_t fluke_unaccel_interface = {
+static struct gpib_interface fluke_unaccel_interface = {
 	.name = "fluke_unaccel",
 	.attach = fluke_attach_holdoff_all,
 	.detach = fluke_detach,
@@ -733,7 +733,7 @@ static gpib_interface_t fluke_unaccel_interface = {
  * register just as the dma controller is also doing a read.
  */
 
-static gpib_interface_t fluke_hybrid_interface = {
+static struct gpib_interface fluke_hybrid_interface = {
 	.name = "fluke_hybrid",
 	.attach = fluke_attach_holdoff_all,
 	.detach = fluke_detach,
@@ -760,7 +760,7 @@ static gpib_interface_t fluke_hybrid_interface = {
 	.return_to_local = fluke_return_to_local,
 };
 
-static gpib_interface_t fluke_interface = {
+static struct gpib_interface fluke_interface = {
 	.name = "fluke",
 	.attach = fluke_attach_holdoff_end,
 	.detach = fluke_detach,
-- 
2.43.0


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

* [PATCH v1 08/18] staging: gpib: fmh: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (6 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 07/18] staging: gpib: fluke: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
index 733433d7fc3f..b2c379ce4c88 100644
--- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
@@ -1011,7 +1011,7 @@ static int fmh_gpib_fifo_read(struct gpib_board *board, uint8_t *buffer, size_t
 	return retval;
 }
 
-static gpib_interface_t fmh_gpib_unaccel_interface = {
+static struct gpib_interface fmh_gpib_unaccel_interface = {
 	.name = "fmh_gpib_unaccel",
 	.attach = fmh_gpib_attach_holdoff_all,
 	.detach = fmh_gpib_detach,
@@ -1039,7 +1039,7 @@ static gpib_interface_t fmh_gpib_unaccel_interface = {
 	.return_to_local = fmh_gpib_return_to_local,
 };
 
-static gpib_interface_t fmh_gpib_interface = {
+static struct gpib_interface fmh_gpib_interface = {
 	.name = "fmh_gpib",
 	.attach = fmh_gpib_attach_holdoff_end,
 	.detach = fmh_gpib_detach,
@@ -1067,7 +1067,7 @@ static gpib_interface_t fmh_gpib_interface = {
 	.return_to_local = fmh_gpib_return_to_local,
 };
 
-static gpib_interface_t fmh_gpib_pci_interface = {
+static struct gpib_interface fmh_gpib_pci_interface = {
 	.name = "fmh_gpib_pci",
 	.attach = fmh_gpib_pci_attach_holdoff_end,
 	.detach = fmh_gpib_pci_detach,
@@ -1095,7 +1095,7 @@ static gpib_interface_t fmh_gpib_pci_interface = {
 	.return_to_local = fmh_gpib_return_to_local,
 };
 
-static gpib_interface_t fmh_gpib_pci_unaccel_interface = {
+static struct gpib_interface fmh_gpib_pci_unaccel_interface = {
 	.name = "fmh_gpib_pci_unaccel",
 	.attach = fmh_gpib_pci_attach_holdoff_all,
 	.detach = fmh_gpib_pci_detach,
-- 
2.43.0


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

* [PATCH v1 09/18] staging: gpib: gpio: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (7 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpib/gpio/gpib_bitbang.c
index 86bdd381472a..7e85dd29ef93 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -1306,7 +1306,7 @@ static int bb_attach(struct gpib_board *board, const gpib_board_config_t *config
 	return retval;
 }
 
-static gpib_interface_t bb_interface = {
+static struct gpib_interface bb_interface = {
 	.name =	NAME,
 	.attach = bb_attach,
 	.detach = bb_detach,
-- 
2.43.0


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

* [PATCH v1 10/18] staging: gpib: hp_82335: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (8 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 11/18] staging: gpib: hp2341: " Michael Rubin
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/hp_82335/hp82335.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/hp_82335/hp82335.c b/drivers/staging/gpib/hp_82335/hp82335.c
index fd23b1cb80f9..1a93a456f7bd 100644
--- a/drivers/staging/gpib/hp_82335/hp82335.c
+++ b/drivers/staging/gpib/hp_82335/hp82335.c
@@ -179,7 +179,7 @@ static void hp82335_return_to_local(struct gpib_board *board)
 	tms9914_return_to_local(board, &priv->tms9914_priv);
 }
 
-static gpib_interface_t hp82335_interface = {
+static struct gpib_interface hp82335_interface = {
 	.name = "hp82335",
 	.attach = hp82335_attach,
 	.detach = hp82335_detach,
-- 
2.43.0


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

* [PATCH v1 11/18] staging: gpib: hp2341: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (9 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/hp_82341/hp_82341.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index f52e673dc869..775103d744ba 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -410,7 +410,7 @@ static void hp_82341_return_to_local(struct gpib_board *board)
 	tms9914_return_to_local(board, &priv->tms9914_priv);
 }
 
-static gpib_interface_t hp_82341_unaccel_interface = {
+static struct gpib_interface hp_82341_unaccel_interface = {
 	.name = "hp_82341_unaccel",
 	.attach = hp_82341_attach,
 	.detach = hp_82341_detach,
@@ -438,7 +438,7 @@ static gpib_interface_t hp_82341_unaccel_interface = {
 	.return_to_local = hp_82341_return_to_local,
 };
 
-static gpib_interface_t hp_82341_interface = {
+static struct gpib_interface hp_82341_interface = {
 	.name = "hp_82341",
 	.attach = hp_82341_attach,
 	.detach = hp_82341_detach,
-- 
2.43.0


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

* [PATCH v1 12/18] staging: gpib: gpibP: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (10 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 11/18] staging: gpib: hp2341: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:24 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/include/gpibP.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/include/gpibP.h b/drivers/staging/gpib/include/gpibP.h
index 0c71a038e444..82627ca838e2 100644
--- a/drivers/staging/gpib/include/gpibP.h
+++ b/drivers/staging/gpib/include/gpibP.h
@@ -18,8 +18,8 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 
-int gpib_register_driver(gpib_interface_t *interface, struct module *mod);
-void gpib_unregister_driver(gpib_interface_t *interface);
+int gpib_register_driver(struct gpib_interface *interface, struct module *mod);
+void gpib_unregister_driver(struct gpib_interface *interface);
 struct pci_dev *gpib_pci_get_device(const gpib_board_config_t *config, unsigned int vendor_id,
 				    unsigned int device_id, struct pci_dev *from);
 struct pci_dev *gpib_pci_get_subsys(const gpib_board_config_t *config, unsigned int vendor_id,
-- 
2.43.0


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

* [PATCH v1 13/18] staging: gpib: ines: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (11 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
@ 2025-04-08 22:24 ` Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:24 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/ines/ines_gpib.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index 93897088f6f2..7d53f6592845 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -539,7 +539,7 @@ void ines_return_to_local(struct gpib_board *board)
 	nec7210_return_to_local(board, &priv->nec7210_priv);
 }
 
-static gpib_interface_t ines_pci_unaccel_interface = {
+static struct gpib_interface ines_pci_unaccel_interface = {
 	.name = "ines_pci_unaccel",
 	.attach = ines_pci_attach,
 	.detach = ines_pci_detach,
@@ -567,7 +567,7 @@ static gpib_interface_t ines_pci_unaccel_interface = {
 	.return_to_local = ines_return_to_local,
 };
 
-static gpib_interface_t ines_pci_interface = {
+static struct gpib_interface ines_pci_interface = {
 	.name = "ines_pci",
 	.attach = ines_pci_accel_attach,
 	.detach = ines_pci_detach,
@@ -595,7 +595,7 @@ static gpib_interface_t ines_pci_interface = {
 	.return_to_local = ines_return_to_local,
 };
 
-static gpib_interface_t ines_pci_accel_interface = {
+static struct gpib_interface ines_pci_accel_interface = {
 	.name = "ines_pci_accel",
 	.attach = ines_pci_accel_attach,
 	.detach = ines_pci_detach,
@@ -623,7 +623,7 @@ static gpib_interface_t ines_pci_accel_interface = {
 	.return_to_local = ines_return_to_local,
 };
 
-static gpib_interface_t ines_isa_interface = {
+static struct gpib_interface ines_isa_interface = {
 	.name = "ines_isa",
 	.attach = ines_isa_attach,
 	.detach = ines_isa_detach,
@@ -1215,7 +1215,7 @@ void ines_pcmcia_cleanup_module(void)
 	pcmcia_unregister_driver(&ines_gpib_cs_driver);
 }
 
-static gpib_interface_t ines_pcmcia_unaccel_interface = {
+static struct gpib_interface ines_pcmcia_unaccel_interface = {
 	.name = "ines_pcmcia_unaccel",
 	.attach = ines_pcmcia_attach,
 	.detach = ines_pcmcia_detach,
@@ -1243,7 +1243,7 @@ static gpib_interface_t ines_pcmcia_unaccel_interface = {
 	.return_to_local = ines_return_to_local,
 };
 
-static gpib_interface_t ines_pcmcia_accel_interface = {
+static struct gpib_interface ines_pcmcia_accel_interface = {
 	.name = "ines_pcmcia_accel",
 	.attach = ines_pcmcia_accel_attach,
 	.detach = ines_pcmcia_detach,
@@ -1271,7 +1271,7 @@ static gpib_interface_t ines_pcmcia_accel_interface = {
 	.return_to_local = ines_return_to_local,
 };
 
-static gpib_interface_t ines_pcmcia_interface = {
+static struct gpib_interface ines_pcmcia_interface = {
 	.name = "ines_pcmcia",
 	.attach = ines_pcmcia_accel_attach,
 	.detach = ines_pcmcia_detach,
-- 
2.43.0


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

* [PATCH v1 14/18] staging: gpib: lpvo_usb: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (12 preceding siblings ...)
  2025-04-08 22:24 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
@ 2025-04-08 22:25 ` Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:25 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
index faf96e9cc4a1..a4bfa95357bd 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -1053,7 +1053,7 @@ static int usb_gpib_t1_delay(struct gpib_board *board, unsigned int nano_sec)
  *   ***  module dispatch table and init/exit functions	 ***
  */
 
-static gpib_interface_t usb_gpib_interface = {
+static struct gpib_interface usb_gpib_interface = {
 	.name = NAME,
 	.attach = usb_gpib_attach,
 	.detach = usb_gpib_detach,
-- 
2.43.0


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

* [PATCH v1 15/18] staging: gpib: ni_usb: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (13 preceding siblings ...)
  2025-04-08 22:25 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
@ 2025-04-08 22:25 ` Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:25 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
index 14f7049a8e5e..715848a3bb75 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
@@ -2361,7 +2361,7 @@ static void ni_usb_detach(struct gpib_board *board)
 	mutex_unlock(&ni_usb_hotplug_lock);
 }
 
-static gpib_interface_t ni_usb_gpib_interface = {
+static struct gpib_interface ni_usb_gpib_interface = {
 	.name = "ni_usb_b",
 	.attach = ni_usb_attach,
 	.detach = ni_usb_detach,
-- 
2.43.0


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

* [PATCH v1 16/18] staging: gpib: pc2: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (14 preceding siblings ...)
  2025-04-08 22:25 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
@ 2025-04-08 22:25 ` Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 18/18] staging: gpib: Removing typedef gpib_interface_t Michael Rubin
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:25 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/pc2/pc2_gpib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/pc2/pc2_gpib.c b/drivers/staging/gpib/pc2/pc2_gpib.c
index 5ff1d52c14e3..b0b19e2d4782 100644
--- a/drivers/staging/gpib/pc2/pc2_gpib.c
+++ b/drivers/staging/gpib/pc2/pc2_gpib.c
@@ -518,7 +518,7 @@ static void pc2_2a_detach(struct gpib_board *board)
 	pc2a_common_detach(board, pc2_2a_iosize);
 }
 
-static gpib_interface_t pc2_interface = {
+static struct gpib_interface pc2_interface = {
 	.name =	"pcII",
 	.attach =	pc2_attach,
 	.detach =	pc2_detach,
@@ -546,7 +546,7 @@ static gpib_interface_t pc2_interface = {
 	.return_to_local = pc2_return_to_local,
 };
 
-static gpib_interface_t pc2a_interface = {
+static struct gpib_interface pc2a_interface = {
 	.name =	"pcIIa",
 	.attach =	pc2a_attach,
 	.detach =	pc2a_detach,
@@ -574,7 +574,7 @@ static gpib_interface_t pc2a_interface = {
 	.return_to_local = pc2_return_to_local,
 };
 
-static gpib_interface_t pc2a_cb7210_interface = {
+static struct gpib_interface pc2a_cb7210_interface = {
 	.name =	"pcIIa_cb7210",
 	.attach =	pc2a_cb7210_attach,
 	.detach =	pc2a_detach,
@@ -602,7 +602,7 @@ static gpib_interface_t pc2a_cb7210_interface = {
 	.return_to_local = pc2_return_to_local,
 };
 
-static gpib_interface_t pc2_2a_interface = {
+static struct gpib_interface pc2_2a_interface = {
 	.name =	"pcII_IIa",
 	.attach =	pc2_2a_attach,
 	.detach =	pc2_2a_detach,
-- 
2.43.0


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

* [PATCH v1 17/18] staging: gpib: tnt4882: struct gpib_interface
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (15 preceding siblings ...)
  2025-04-08 22:25 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
@ 2025-04-08 22:25 ` Michael Rubin
  2025-04-08 22:25 ` [PATCH v1 18/18] staging: gpib: Removing typedef gpib_interface_t Michael Rubin
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:25 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c | 24 ++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index 3b29f541fd49..596e2fa40dcd 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -1116,7 +1116,7 @@ static int tnt4882_pci_probe(struct pci_dev *dev, const struct pci_device_id *id
 	return 0;
 }
 
-static gpib_interface_t ni_pci_interface = {
+static struct gpib_interface ni_pci_interface = {
 	.name = "ni_pci",
 	.attach = ni_pci_attach,
 	.detach = ni_pci_detach,
@@ -1144,7 +1144,7 @@ static gpib_interface_t ni_pci_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_pci_accel_interface = {
+static struct gpib_interface ni_pci_accel_interface = {
 	.name = "ni_pci_accel",
 	.attach = ni_pci_attach,
 	.detach = ni_pci_detach,
@@ -1172,7 +1172,7 @@ static gpib_interface_t ni_pci_accel_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_isa_interface = {
+static struct gpib_interface ni_isa_interface = {
 	.name = "ni_isa",
 	.attach = ni_tnt_isa_attach,
 	.detach = ni_isa_detach,
@@ -1200,7 +1200,7 @@ static gpib_interface_t ni_isa_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_nat4882_isa_interface = {
+static struct gpib_interface ni_nat4882_isa_interface = {
 	.name = "ni_nat4882_isa",
 	.attach = ni_nat4882_isa_attach,
 	.detach = ni_isa_detach,
@@ -1228,7 +1228,7 @@ static gpib_interface_t ni_nat4882_isa_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_nec_isa_interface = {
+static struct gpib_interface ni_nec_isa_interface = {
 	.name = "ni_nec_isa",
 	.attach = ni_nec_isa_attach,
 	.detach = ni_isa_detach,
@@ -1256,7 +1256,7 @@ static gpib_interface_t ni_nec_isa_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_isa_accel_interface = {
+static struct gpib_interface ni_isa_accel_interface = {
 	.name = "ni_isa_accel",
 	.attach = ni_tnt_isa_attach,
 	.detach = ni_isa_detach,
@@ -1284,7 +1284,7 @@ static gpib_interface_t ni_isa_accel_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_nat4882_isa_accel_interface = {
+static struct gpib_interface ni_nat4882_isa_accel_interface = {
 	.name = "ni_nat4882_isa_accel",
 	.attach = ni_nat4882_isa_attach,
 	.detach = ni_isa_detach,
@@ -1312,7 +1312,7 @@ static gpib_interface_t ni_nat4882_isa_accel_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_nec_isa_accel_interface = {
+static struct gpib_interface ni_nec_isa_accel_interface = {
 	.name = "ni_nec_isa_accel",
 	.attach = ni_nec_isa_attach,
 	.detach = ni_isa_detach,
@@ -1371,8 +1371,8 @@ MODULE_DEVICE_TABLE(pnp, tnt4882_pnp_table);
 #endif
 
 #ifdef CONFIG_GPIB_PCMCIA
-static gpib_interface_t ni_pcmcia_interface;
-static gpib_interface_t ni_pcmcia_accel_interface;
+static struct gpib_interface ni_pcmcia_interface;
+static struct gpib_interface ni_pcmcia_accel_interface;
 static int __init init_ni_gpib_cs(void);
 static void __exit exit_ni_gpib_cs(void);
 #endif
@@ -1769,7 +1769,7 @@ static void ni_pcmcia_detach(struct gpib_board *board)
 	tnt4882_free_private(board);
 }
 
-static gpib_interface_t ni_pcmcia_interface = {
+static struct gpib_interface ni_pcmcia_interface = {
 	.name = "ni_pcmcia",
 	.attach = ni_pcmcia_attach,
 	.detach = ni_pcmcia_detach,
@@ -1797,7 +1797,7 @@ static gpib_interface_t ni_pcmcia_interface = {
 	.return_to_local = tnt4882_return_to_local,
 };
 
-static gpib_interface_t ni_pcmcia_accel_interface = {
+static struct gpib_interface ni_pcmcia_accel_interface = {
 	.name = "ni_pcmcia_accel",
 	.attach = ni_pcmcia_attach,
 	.detach = ni_pcmcia_detach,
-- 
2.43.0


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

* [PATCH v1 18/18] staging: gpib: Removing typedef gpib_interface_t
  2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
                   ` (16 preceding siblings ...)
  2025-04-08 22:25 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
@ 2025-04-08 22:25 ` Michael Rubin
  17 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-08 22:25 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Removing gpib_interface_t to adhere 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.

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/include/gpib_types.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 10d8776ef425..a5c21ac6affc 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -8,7 +8,7 @@
 #define _GPIB_TYPES_H
 
 #ifdef __KERNEL__
-/* gpib_interface_t defines the interface
+/* gpib_interface defines the interface
  * between the board-specific details dealt with in the drivers
  * and generic interface provided by gpib-common.
  * This really should be in a different header file.
@@ -22,7 +22,6 @@
 #include <linux/timer.h>
 #include <linux/interrupt.h>
 
-typedef struct gpib_interface gpib_interface_t;
 struct gpib_board;
 
 /* config parameters that are only used by driver attach functions */
@@ -212,7 +211,7 @@ static inline void init_gpib_pseudo_irq(struct gpib_pseudo_irq *pseudo_irq)
 /* list so we can make a linked list of drivers */
 typedef struct gpib_interface_list_struct {
 	struct list_head list;
-	gpib_interface_t *interface;
+	struct gpib_interface *interface;
 	struct module *module;
 } gpib_interface_list_t;
 
@@ -222,7 +221,7 @@ typedef struct gpib_interface_list_struct {
  */
 struct gpib_board {
 	/* functions used by this board */
-	gpib_interface_t *interface;
+	struct gpib_interface *interface;
 	/* Pointer to module whose use count we should increment when
 	 * interface is in use
 	 */
-- 
2.43.0


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

* Re: [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
  2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
@ 2025-04-09  8:26   ` Dan Carpenter
  2025-04-09 17:52     ` Michael Rubin
  0 siblings, 1 reply; 23+ messages in thread
From: Dan Carpenter @ 2025-04-09  8:26 UTC (permalink / raw)
  To: Michael Rubin; +Cc: gregkh, dpenkler, linux-staging, linux-kernel

On Tue, Apr 08, 2025 at 10:24:47PM +0000, Michael Rubin wrote:
> Using Linux code style for gpib_interface 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
> 

This commit message is quite long but it's totally unrelated to what the
patch does.

This commit message should just say "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."

regards,
dan carpenter

> 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] 23+ messages in thread

* Re: [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
  2025-04-09  8:26   ` Dan Carpenter
@ 2025-04-09 17:52     ` Michael Rubin
  2025-04-15 14:41       ` Greg KH
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Rubin @ 2025-04-09 17:52 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: gregkh, dpenkler, linux-staging, linux-kernel

On Wed, Apr 09, 2025 at 11:26:41AM +0300, Dan Carpenter wrote:
> On Tue, Apr 08, 2025 at 10:24:47PM +0000, Michael Rubin wrote:
> > Using Linux code style for gpib_interface 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
> > 
> 
> This commit message is quite long but it's totally unrelated to what the
> patch does.
> 
> This commit message should just say "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."

Thank you for the input. New commit marked v2 sent to the list.

Michael Rubin

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

* Re: [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
  2025-04-09 17:52     ` Michael Rubin
@ 2025-04-15 14:41       ` Greg KH
  2025-04-16 20:45         ` Michael Rubin
  0 siblings, 1 reply; 23+ messages in thread
From: Greg KH @ 2025-04-15 14:41 UTC (permalink / raw)
  To: Michael Rubin; +Cc: Dan Carpenter, dpenkler, linux-staging, linux-kernel

On Wed, Apr 09, 2025 at 05:52:51PM +0000, Michael Rubin wrote:
> On Wed, Apr 09, 2025 at 11:26:41AM +0300, Dan Carpenter wrote:
> > On Tue, Apr 08, 2025 at 10:24:47PM +0000, Michael Rubin wrote:
> > > Using Linux code style for gpib_interface 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
> > > 
> > 
> > This commit message is quite long but it's totally unrelated to what the
> > patch does.
> > 
> > This commit message should just say "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."
> 
> Thank you for the input. New commit marked v2 sent to the list.

I think we need a whole new v2 series, I can't just pick up 1 of the 18
patches as a v2 as our tools will get very confused.  Can you just
rebase and resend a v3 for the whole thing?

thanks,

greg k-h

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

* Re: [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface
  2025-04-15 14:41       ` Greg KH
@ 2025-04-16 20:45         ` Michael Rubin
  0 siblings, 0 replies; 23+ messages in thread
From: Michael Rubin @ 2025-04-16 20:45 UTC (permalink / raw)
  To: Greg KH; +Cc: Dan Carpenter, dpenkler, linux-staging, linux-kernel

On Tue, Apr 15, 2025 at 04:41:47PM +0200, Greg KH wrote:
> On Wed, Apr 09, 2025 at 05:52:51PM +0000, Michael Rubin wrote:
> > On Wed, Apr 09, 2025 at 11:26:41AM +0300, Dan Carpenter wrote:
> > > On Tue, Apr 08, 2025 at 10:24:47PM +0000, Michael Rubin wrote:
> > > > Using Linux code style for gpib_interface 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
> > > > 
> > > 
> > > This commit message is quite long but it's totally unrelated to what the
> > > patch does.
> > > 
> > > This commit message should just say "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."
> > 
> > Thank you for the input. New commit marked v2 sent to the list.
> 
> I think we need a whole new v2 series, I can't just pick up 1 of the 18
> patches as a v2 as our tools will get very confused.  Can you just
> rebase and resend a v3 for the whole thing?

I sent a new series. Hope that it looks ok.

Michael

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

end of thread, other threads:[~2025-04-16 20:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 22:24 [PATCH v1 00/18] staging: gpib: Removing typedef of gpib_interface_t Michael Rubin
2025-04-08 22:24 ` [PATCH v1 01/18] staging: gpib: struct typing for gpib_interface Michael Rubin
2025-04-09  8:26   ` Dan Carpenter
2025-04-09 17:52     ` Michael Rubin
2025-04-15 14:41       ` Greg KH
2025-04-16 20:45         ` Michael Rubin
2025-04-08 22:24 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_interface Michael Rubin
2025-04-08 22:24 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 07/18] staging: gpib: fluke: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 11/18] staging: gpib: hp2341: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
2025-04-08 22:24 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
2025-04-08 22:25 ` [PATCH v1 18/18] staging: gpib: Removing typedef gpib_interface_t Michael Rubin

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