mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t
@ 2025-04-08 22:36 Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config Michael Rubin
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config.

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_board_config"

* Patch 2 - Patch 17: Replacing gpib_board_config_t with
            "struct gpib_board_config"

* Patch 18: Removing typedef for gpib_board_config_t.

Michael Rubin (18):
  staing: gpib: struct typing for gpib_board_config
  staging: gpib: agilent_82350b: gpib_board_config
  staging: gpib: agilent_82357a: gpib_board_config
  staging: gpib: cb7210: struct gpib_board_config
  staging: gpib: cec: struct gpib_board_config
  staging: gpib: common: struct gpib_board_config
  staging: gpib: eastwood: struct gpib_board_config
  staging: gpib: fmh: struct gpib_board_config
  staging: gpib: gpio: struct gpib_board_config
  staging: gpib: hp_82335: struct gpib_board_config
  staging: gpib: hp_82341: struct gpib_board_config
  staging: gpib: gpibP: struct gpib_board_config
  staging: gpib: ines: struct gpib_board_config
  staging: gpib: lpvo_usb: struct gpib_board_config
  staging: gpib: ni_usb: struct gpib_board_config
  staging: gpib: pc2: struct gpib_board_config
  staging: gpib: tnt4882: struct gpib_board_config
  staging: gpib: Removing typedef gpib_board_config

 .../gpib/agilent_82350b/agilent_82350b.c      |  8 +++---
 .../gpib/agilent_82357a/agilent_82357a.c      |  4 +--
 drivers/staging/gpib/cb7210/cb7210.c          | 12 ++++----
 drivers/staging/gpib/cec/cec_gpib.c           |  4 +--
 drivers/staging/gpib/common/gpib_os.c         | 28 +++++++++----------
 drivers/staging/gpib/eastwood/fluke_gpib.c    | 12 ++++----
 drivers/staging/gpib/fmh_gpib/fmh_gpib.c      | 27 ++++++++++--------
 drivers/staging/gpib/gpio/gpib_bitbang.c      |  2 +-
 drivers/staging/gpib/hp_82335/hp82335.c       |  4 +--
 drivers/staging/gpib/hp_82341/hp_82341.c      |  7 +++--
 drivers/staging/gpib/include/gpibP.h          |  4 +--
 drivers/staging/gpib/include/gpib_types.h     |  8 +++---
 drivers/staging/gpib/ines/ines_gpib.c         | 23 +++++++--------
 .../gpib/lpvo_usb_gpib/lpvo_usb_gpib.c        |  2 +-
 drivers/staging/gpib/ni_usb/ni_usb_gpib.c     |  4 +--
 drivers/staging/gpib/pc2/pc2_gpib.c           | 12 ++++----
 drivers/staging/gpib/tnt4882/tnt4882_gpib.c   | 12 ++++----
 17 files changed, 91 insertions(+), 82 deletions(-)

-- 
2.43.0


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

* [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_board_config Michael Rubin
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

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@neverthere.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


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

* [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_board_config Michael Rubin
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
index 3880d4a23eea..901f7182502b 100644
--- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
+++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
@@ -492,7 +492,7 @@ static void agilent_82350b_free_private(struct gpib_board *board)
 }
 
 static int init_82350a_hardware(struct gpib_board *board,
-				const gpib_board_config_t *config)
+				const struct gpib_board_config *config)
 {
 	struct agilent_82350b_priv *a_priv = board->private_data;
 	static const unsigned int firmware_length = 5302;
@@ -587,7 +587,7 @@ static int test_sram(struct gpib_board *board)
 }
 
 static int agilent_82350b_generic_attach(struct gpib_board *board,
-					 const gpib_board_config_t *config,
+					 const struct gpib_board_config *config,
 					 int use_fifos)
 
 {
@@ -730,13 +730,13 @@ static int agilent_82350b_generic_attach(struct gpib_board *board,
 }
 
 static int agilent_82350b_unaccel_attach(struct gpib_board *board,
-					 const gpib_board_config_t *config)
+					 const struct gpib_board_config *config)
 {
 	return agilent_82350b_generic_attach(board, config, 0);
 }
 
 static int agilent_82350b_accel_attach(struct gpib_board *board,
-				       const gpib_board_config_t *config)
+				       const struct gpib_board_config *config)
 {
 	return agilent_82350b_generic_attach(board, config, 1);
 }
-- 
2.43.0


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

* [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_board_config Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_board_config Michael Rubin
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
index 29c390b4f4e4..baa8f149024c 100644
--- a/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
+++ b/drivers/staging/gpib/agilent_82357a/agilent_82357a.c
@@ -1292,7 +1292,7 @@ static int agilent_82357a_init(struct gpib_board *board)
 }
 
 static inline int agilent_82357a_device_match(struct usb_interface *interface,
-					      const gpib_board_config_t *config)
+					      const struct gpib_board_config *config)
 {
 	struct usb_device * const usbdev = interface_to_usbdev(interface);
 
@@ -1305,7 +1305,7 @@ static inline int agilent_82357a_device_match(struct usb_interface *interface,
 	return 1;
 }
 
-static int agilent_82357a_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int agilent_82357a_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	int retval;
 	int i;
-- 
2.43.0


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

* [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (2 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_board_config Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c
index 20cea66d6557..a8549718b425 100644
--- a/drivers/staging/gpib/cb7210/cb7210.c
+++ b/drivers/staging/gpib/cb7210/cb7210.c
@@ -533,8 +533,8 @@ static irqreturn_t cb7210_interrupt(int irq, void *arg)
 	return cb7210_internal_interrupt(arg);
 }
 
-static int cb_pci_attach(struct gpib_board *board, const gpib_board_config_t *config);
-static int cb_isa_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int cb_pci_attach(struct gpib_board *board, const struct gpib_board_config *config);
+static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_config *config);
 
 static void cb_pci_detach(struct gpib_board *board);
 static void cb_isa_detach(struct gpib_board *board);
@@ -926,7 +926,7 @@ static int cb7210_init(struct cb7210_priv *cb_priv, struct gpib_board *board)
 	return 0;
 }
 
-static int cb_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int cb_pci_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct cb7210_priv *cb_priv;
 	struct nec7210_priv *nec_priv;
@@ -1031,7 +1031,7 @@ static void cb_pci_detach(struct gpib_board *board)
 	cb7210_generic_detach(board);
 }
 
-static int cb_isa_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int cb_isa_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	int isr_flags = 0;
 	struct cb7210_priv *cb_priv;
@@ -1133,7 +1133,7 @@ static struct pci_driver cb7210_pci_driver = {
 
 static int cb_gpib_config(struct pcmcia_device	*link);
 static void cb_gpib_release(struct pcmcia_device  *link);
-static int cb_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int cb_pcmcia_attach(struct gpib_board *board, const struct gpib_board_config *config);
 static void cb_pcmcia_detach(struct gpib_board *board);
 
 /*
@@ -1417,7 +1417,7 @@ static struct gpib_interface cb_pcmcia_accel_interface = {
 	.return_to_local = cb7210_return_to_local,
 };
 
-static int cb_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int cb_pcmcia_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct cb7210_priv *cb_priv;
 	struct nec7210_priv *nec_priv;
-- 
2.43.0


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

* [PATCH v1 05/18] staging: gpib: cec: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (3 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_board_config Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/cec/cec_gpib.c b/drivers/staging/gpib/cec/cec_gpib.c
index dfc718de1532..1b02222881b9 100644
--- a/drivers/staging/gpib/cec/cec_gpib.c
+++ b/drivers/staging/gpib/cec/cec_gpib.c
@@ -40,7 +40,7 @@ static irqreturn_t cec_interrupt(int irq, void *arg)
 #define CEC_DEV_ID    0x5cec
 #define CEC_SUBID 0x9050
 
-static int cec_pci_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int cec_pci_attach(struct gpib_board *board, const struct gpib_board_config *config);
 
 static void cec_pci_detach(struct gpib_board *board);
 
@@ -265,7 +265,7 @@ static void cec_init(struct cec_priv *cec_priv, const struct gpib_board *board)
 	nec7210_board_online(nec_priv, board);
 }
 
-static int cec_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int cec_pci_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct cec_priv *cec_priv;
 	struct nec7210_priv *nec_priv;
-- 
2.43.0


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

* [PATCH v1 06/18] staging: gpib: common: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (4 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 07/18] staging: gpib: eastwood: " Michael Rubin
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 28 +++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 940ea05ba478..f2216768d8bd 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -50,9 +50,9 @@ static int sad_ioctl(struct gpib_board *board, gpib_file_private_t *file_priv,
 static int eos_ioctl(struct gpib_board *board, unsigned long arg);
 static int request_service_ioctl(struct gpib_board *board, unsigned long arg);
 static int request_service2_ioctl(struct gpib_board *board, unsigned long arg);
-static int iobase_ioctl(gpib_board_config_t *config, unsigned long arg);
-static int irq_ioctl(gpib_board_config_t *config, unsigned long arg);
-static int dma_ioctl(gpib_board_config_t *config, unsigned long arg);
+static int iobase_ioctl(struct gpib_board_config *config, unsigned long arg);
+static int irq_ioctl(struct gpib_board_config *config, unsigned long arg);
+static int dma_ioctl(struct gpib_board_config *config, unsigned long arg);
 static int autospoll_ioctl(struct gpib_board *board, gpib_file_private_t *file_priv,
 			   unsigned long arg);
 static int mutex_ioctl(struct gpib_board *board, gpib_file_private_t *file_priv,
@@ -65,8 +65,8 @@ static int set_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long ar
 static int get_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long arg);
 static int query_board_rsv_ioctl(struct gpib_board *board, unsigned long arg);
 static int interface_clear_ioctl(struct gpib_board *board, unsigned long arg);
-static int select_pci_ioctl(gpib_board_config_t *config, unsigned long arg);
-static int select_device_path_ioctl(gpib_board_config_t *config, unsigned long arg);
+static int select_pci_ioctl(struct gpib_board_config *config, unsigned long arg);
+static int select_device_path_ioctl(struct gpib_board_config *config, unsigned long arg);
 static int event_ioctl(struct gpib_board *board, unsigned long arg);
 static int request_system_control_ioctl(struct gpib_board *board, unsigned long arg);
 static int t1_delay_ioctl(struct gpib_board *board, unsigned long arg);
@@ -1542,7 +1542,7 @@ static int request_service2_ioctl(struct gpib_board *board, unsigned long arg)
 		      request_service2_cmd.new_reason_for_service);
 }
 
-static int iobase_ioctl(gpib_board_config_t *config, unsigned long arg)
+static int iobase_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
 	u64 base_addr;
 	int retval;
@@ -1561,7 +1561,7 @@ static int iobase_ioctl(gpib_board_config_t *config, unsigned long arg)
 	return 0;
 }
 
-static int irq_ioctl(gpib_board_config_t *config, unsigned long arg)
+static int irq_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
 	unsigned int irq;
 	int retval;
@@ -1578,7 +1578,7 @@ static int irq_ioctl(gpib_board_config_t *config, unsigned long arg)
 	return 0;
 }
 
-static int dma_ioctl(gpib_board_config_t *config, unsigned long arg)
+static int dma_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
 	unsigned int dma_channel;
 	int retval;
@@ -1793,7 +1793,7 @@ static int interface_clear_ioctl(struct gpib_board *board, unsigned long arg)
 	return ibsic(board, usec_duration);
 }
 
-static int select_pci_ioctl(gpib_board_config_t *config, unsigned long arg)
+static int select_pci_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
 	select_pci_ioctl_t selection;
 	int retval;
@@ -1811,7 +1811,7 @@ static int select_pci_ioctl(gpib_board_config_t *config, unsigned long arg)
 	return 0;
 }
 
-static int select_device_path_ioctl(gpib_board_config_t *config, unsigned long arg)
+static int select_device_path_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
 	select_device_path_ioctl_t *selection;
 	int retval;
@@ -2069,9 +2069,9 @@ void gpib_unregister_driver(struct gpib_interface *interface)
 }
 EXPORT_SYMBOL(gpib_unregister_driver);
 
-static void init_gpib_board_config(gpib_board_config_t *config)
+static void init_gpib_board_config(struct gpib_board_config *config)
 {
-	memset(config, 0, sizeof(gpib_board_config_t));
+	memset(config, 0, sizeof(struct gpib_board_config));
 	config->pci_bus = -1;
 	config->pci_slot = -1;
 }
@@ -2212,7 +2212,7 @@ int gpib_match_device_path(struct device *dev, const char *device_path_in)
 }
 EXPORT_SYMBOL(gpib_match_device_path);
 
-struct pci_dev *gpib_pci_get_device(const gpib_board_config_t *config, unsigned int vendor_id,
+struct pci_dev *gpib_pci_get_device(const struct gpib_board_config *config, unsigned int vendor_id,
 				    unsigned int device_id, struct pci_dev *from)
 {
 	struct pci_dev *pci_device = from;
@@ -2231,7 +2231,7 @@ struct pci_dev *gpib_pci_get_device(const gpib_board_config_t *config, unsigned
 }
 EXPORT_SYMBOL(gpib_pci_get_device);
 
-struct pci_dev *gpib_pci_get_subsys(const gpib_board_config_t *config, unsigned int vendor_id,
+struct pci_dev *gpib_pci_get_subsys(const struct gpib_board_config *config, unsigned int vendor_id,
 				    unsigned int device_id, unsigned int ss_vendor,
 				    unsigned int ss_device,
 				    struct pci_dev *from)
-- 
2.43.0


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

* [PATCH v1 07/18] staging: gpib: eastwood: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (5 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index 68f888a75edc..e1f8598e4e04 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -24,8 +24,10 @@
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("GPIB Driver for Fluke cda devices");
 
-static int fluke_attach_holdoff_all(struct gpib_board *board, const gpib_board_config_t *config);
-static int fluke_attach_holdoff_end(struct gpib_board *board, const gpib_board_config_t *config);
+static int fluke_attach_holdoff_all(struct gpib_board *board,
+				    const struct gpib_board_config *config);
+static int fluke_attach_holdoff_end(struct gpib_board *board,
+				    const struct gpib_board_config *config);
 static void fluke_detach(struct gpib_board *board);
 static int fluke_config_dma(struct gpib_board *board, int output);
 static irqreturn_t fluke_gpib_internal_interrupt(struct gpib_board *board);
@@ -943,7 +945,7 @@ static bool gpib_dma_channel_filter(struct dma_chan *chan, void *filter_param)
 	return chan->chan_id == 0;
 }
 
-static int fluke_attach_impl(struct gpib_board *board, const gpib_board_config_t *config,
+static int fluke_attach_impl(struct gpib_board *board, const struct gpib_board_config *config,
 			     unsigned int handshake_mode)
 {
 	struct fluke_priv *e_priv;
@@ -1049,12 +1051,12 @@ static int fluke_attach_impl(struct gpib_board *board, const gpib_board_config_t
 	return fluke_init(e_priv, board, handshake_mode);
 }
 
-int fluke_attach_holdoff_all(struct gpib_board *board, const gpib_board_config_t *config)
+int fluke_attach_holdoff_all(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return fluke_attach_impl(board, config, HR_HLDA);
 }
 
-int fluke_attach_holdoff_end(struct gpib_board *board, const gpib_board_config_t *config)
+int fluke_attach_holdoff_end(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return fluke_attach_impl(board, config, HR_HLDE);
 }
-- 
2.43.0


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

* [PATCH v1 08/18] staging: gpib: fmh: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (6 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 07/18] staging: gpib: eastwood: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 27 ++++++++++++++----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
index b2c379ce4c88..30fbf1065de2 100644
--- a/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
+++ b/drivers/staging/gpib/fmh_gpib/fmh_gpib.c
@@ -32,13 +32,15 @@ MODULE_DESCRIPTION("GPIB Driver for fmh_gpib_core");
 MODULE_AUTHOR("Frank Mori Hess <fmh6jj@gmail.com>");
 
 static irqreturn_t fmh_gpib_interrupt(int irq, void *arg);
-static int fmh_gpib_attach_holdoff_all(struct gpib_board *board, const gpib_board_config_t *config);
-static int fmh_gpib_attach_holdoff_end(struct gpib_board *board, const gpib_board_config_t *config);
+static int fmh_gpib_attach_holdoff_all(struct gpib_board *board,
+				       const struct gpib_board_config *config);
+static int fmh_gpib_attach_holdoff_end(struct gpib_board *board,
+				       const struct gpib_board_config *config);
 static void fmh_gpib_detach(struct gpib_board *board);
 static int fmh_gpib_pci_attach_holdoff_all(struct gpib_board *board,
-					   const gpib_board_config_t *config);
+					   const struct gpib_board_config *config);
 static int fmh_gpib_pci_attach_holdoff_end(struct gpib_board *board,
-					   const gpib_board_config_t *config);
+					   const struct gpib_board_config *config);
 static void fmh_gpib_pci_detach(struct gpib_board *board);
 static int fmh_gpib_config_dma(struct gpib_board *board, int output);
 static irqreturn_t fmh_gpib_internal_interrupt(struct gpib_board *board);
@@ -1335,7 +1337,7 @@ static int fmh_gpib_init(struct fmh_priv *e_priv, struct gpib_board *board, int
 /* Match callback for driver_find_device */
 static int fmh_gpib_device_match(struct device *dev, const void *data)
 {
-	const gpib_board_config_t *config = data;
+	const struct gpib_board_config *config = data;
 
 	if (dev_get_drvdata(dev))
 		return 0;
@@ -1351,7 +1353,7 @@ static int fmh_gpib_device_match(struct device *dev, const void *data)
 	return 1;
 }
 
-static int fmh_gpib_attach_impl(struct gpib_board *board, const gpib_board_config_t *config,
+static int fmh_gpib_attach_impl(struct gpib_board *board, const struct gpib_board_config *config,
 				unsigned int handshake_mode, int acquire_dma)
 {
 	struct fmh_priv *e_priv;
@@ -1454,12 +1456,12 @@ static int fmh_gpib_attach_impl(struct gpib_board *board, const gpib_board_confi
 	return fmh_gpib_init(e_priv, board, handshake_mode);
 }
 
-int fmh_gpib_attach_holdoff_all(struct gpib_board *board, const gpib_board_config_t *config)
+int fmh_gpib_attach_holdoff_all(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return fmh_gpib_attach_impl(board, config, HR_HLDA, 0);
 }
 
-int fmh_gpib_attach_holdoff_end(struct gpib_board *board, const gpib_board_config_t *config)
+int fmh_gpib_attach_holdoff_end(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return fmh_gpib_attach_impl(board, config, HR_HLDE, 1);
 }
@@ -1497,7 +1499,8 @@ void fmh_gpib_detach(struct gpib_board *board)
 	fmh_gpib_generic_detach(board);
 }
 
-static int fmh_gpib_pci_attach_impl(struct gpib_board *board, const gpib_board_config_t *config,
+static int fmh_gpib_pci_attach_impl(struct gpib_board *board,
+				    const struct gpib_board_config *config,
 				    unsigned int handshake_mode)
 {
 	struct fmh_priv *e_priv;
@@ -1570,12 +1573,14 @@ static int fmh_gpib_pci_attach_impl(struct gpib_board *board, const gpib_board_c
 	return fmh_gpib_init(e_priv, board, handshake_mode);
 }
 
-int fmh_gpib_pci_attach_holdoff_all(struct gpib_board *board, const gpib_board_config_t *config)
+int fmh_gpib_pci_attach_holdoff_all(struct gpib_board *board,
+				    const struct gpib_board_config *config)
 {
 	return fmh_gpib_pci_attach_impl(board, config, HR_HLDA);
 }
 
-int fmh_gpib_pci_attach_holdoff_end(struct gpib_board *board, const gpib_board_config_t *config)
+int fmh_gpib_pci_attach_holdoff_end(struct gpib_board *board,
+				    const struct gpib_board_config *config)
 {
 	int retval;
 	struct fmh_priv *e_priv;
-- 
2.43.0


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

* [PATCH v1 09/18] staging: gpib: gpio: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (7 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 7e85dd29ef93..c586f739c251 100644
--- a/drivers/staging/gpib/gpio/gpib_bitbang.c
+++ b/drivers/staging/gpib/gpio/gpib_bitbang.c
@@ -1206,7 +1206,7 @@ static void bb_detach(struct gpib_board *board)
 	free_private(board);
 }
 
-static int bb_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int bb_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct bb_priv *priv;
 	int retval = 0;
-- 
2.43.0


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

* [PATCH v1 10/18] staging: gpib: hp_82335: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (8 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 11/18] staging: gpib: hp_82341: " Michael Rubin
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/hp_82335/hp82335.c b/drivers/staging/gpib/hp_82335/hp82335.c
index 1a93a456f7bd..32b3aba673d9 100644
--- a/drivers/staging/gpib/hp_82335/hp82335.c
+++ b/drivers/staging/gpib/hp_82335/hp82335.c
@@ -24,7 +24,7 @@
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("GPIB driver for HP 82335 interface cards");
 
-static int hp82335_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int hp82335_attach(struct gpib_board *board, const struct gpib_board_config *config);
 static void hp82335_detach(struct gpib_board *board);
 static irqreturn_t hp82335_interrupt(int irq, void *arg);
 
@@ -243,7 +243,7 @@ static void hp82335_clear_interrupt(struct hp82335_priv *hp_priv)
 	writeb(0, tms_priv->mmiobase + HPREG_INTR_CLEAR);
 }
 
-static int hp82335_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int hp82335_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct hp82335_priv *hp_priv;
 	struct tms9914_priv *tms_priv;
-- 
2.43.0


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

* [PATCH v1 11/18] staging: gpib: hp_82341: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (9 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/hp_82341/hp_82341.c b/drivers/staging/gpib/hp_82341/hp_82341.c
index 775103d744ba..f2306245ce4c 100644
--- a/drivers/staging/gpib/hp_82341/hp_82341.c
+++ b/drivers/staging/gpib/hp_82341/hp_82341.c
@@ -250,7 +250,7 @@ static int hp_82341_accel_write(struct gpib_board *board, uint8_t *buffer, size_
 	return 0;
 }
 
-static int hp_82341_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int hp_82341_attach(struct gpib_board *board, const struct gpib_board_config *config);
 
 static void hp_82341_detach(struct gpib_board *board);
 
@@ -619,7 +619,8 @@ static int hp_82341_load_firmware_array(struct hp_82341_priv *hp_priv,
 	return 0;
 }
 
-static int hp_82341_load_firmware(struct hp_82341_priv *hp_priv, const gpib_board_config_t *config)
+static int hp_82341_load_firmware(struct hp_82341_priv *hp_priv,
+				  const struct gpib_board_config *config)
 {
 	if (config->init_data_length == 0) {
 		if (xilinx_done(hp_priv))
@@ -686,7 +687,7 @@ static int clear_xilinx(struct hp_82341_priv *hp_priv)
 	return 0;
 }
 
-static int hp_82341_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int hp_82341_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct hp_82341_priv *hp_priv;
 	struct tms9914_priv *tms_priv;
-- 
2.43.0


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

* [PATCH v1 12/18] staging: gpib: gpibP: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (10 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 11/18] staging: gpib: hp_82341: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 82627ca838e2..c9cd1dbd7e6f 100644
--- a/drivers/staging/gpib/include/gpibP.h
+++ b/drivers/staging/gpib/include/gpibP.h
@@ -20,9 +20,9 @@
 
 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,
+struct pci_dev *gpib_pci_get_device(const struct gpib_board_config *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,
+struct pci_dev *gpib_pci_get_subsys(const struct gpib_board_config *config, unsigned int vendor_id,
 				    unsigned int device_id, unsigned int ss_vendor,
 				    unsigned int ss_device, struct pci_dev *from);
 unsigned int num_gpib_events(const gpib_event_queue_t *queue);
-- 
2.43.0


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

* [PATCH v1 13/18] staging: gpib: ines: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (11 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c
index 7d53f6592845..3b7c8fc0f2e8 100644
--- a/drivers/staging/gpib/ines/ines_gpib.c
+++ b/drivers/staging/gpib/ines/ines_gpib.c
@@ -313,9 +313,9 @@ irqreturn_t ines_interrupt(struct gpib_board *board)
 	return IRQ_HANDLED;
 }
 
-static int ines_pci_attach(struct gpib_board *board, const gpib_board_config_t *config);
-static int ines_pci_accel_attach(struct gpib_board *board, const gpib_board_config_t *config);
-static int ines_isa_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int ines_pci_attach(struct gpib_board *board, const struct gpib_board_config *config);
+static int ines_pci_accel_attach(struct gpib_board *board, const struct gpib_board_config *config);
+static int ines_isa_attach(struct gpib_board *board, const struct gpib_board_config *config);
 
 static void ines_pci_detach(struct gpib_board *board);
 static void ines_isa_detach(struct gpib_board *board);
@@ -724,7 +724,7 @@ void ines_online(struct ines_priv *ines_priv, const struct gpib_board *board, in
 		nec7210_set_reg_bits(nec_priv, IMR1, HR_DOIE | HR_DIIE, 0);
 }
 
-static int ines_common_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ines_common_pci_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	struct nec7210_priv *nec_priv;
@@ -852,7 +852,7 @@ static int ines_common_pci_attach(struct gpib_board *board, const gpib_board_con
 	return 0;
 }
 
-int ines_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
+int ines_pci_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	int retval;
@@ -867,7 +867,7 @@ int ines_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
 	return 0;
 }
 
-int ines_pci_accel_attach(struct gpib_board *board, const gpib_board_config_t *config)
+int ines_pci_accel_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	int retval;
@@ -884,7 +884,7 @@ int ines_pci_accel_attach(struct gpib_board *board, const gpib_board_config_t *c
 
 static const int ines_isa_iosize = 0x20;
 
-int ines_isa_attach(struct gpib_board *board, const gpib_board_config_t *config)
+int ines_isa_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	struct nec7210_priv *nec_priv;
@@ -1000,8 +1000,9 @@ static const int ines_pcmcia_iosize = 0x20;
 
 static int ines_gpib_config(struct pcmcia_device  *link);
 static void ines_gpib_release(struct pcmcia_device  *link);
-static int ines_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *config);
-static int ines_pcmcia_accel_attach(struct gpib_board *board, const gpib_board_config_t *config);
+static int ines_pcmcia_attach(struct gpib_board *board, const struct gpib_board_config *config);
+static int ines_pcmcia_accel_attach(struct gpib_board *board,
+				    const struct gpib_board_config *config);
 static void ines_pcmcia_detach(struct gpib_board *board);
 static irqreturn_t ines_pcmcia_interrupt(int irq, void *arg);
 static int ines_common_pcmcia_attach(struct gpib_board *board);
@@ -1345,7 +1346,7 @@ int ines_common_pcmcia_attach(struct gpib_board *board)
 	return 0;
 }
 
-int ines_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *config)
+int ines_pcmcia_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	int retval;
@@ -1360,7 +1361,7 @@ int ines_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *conf
 	return 0;
 }
 
-int ines_pcmcia_accel_attach(struct gpib_board *board, const gpib_board_config_t *config)
+int ines_pcmcia_accel_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct ines_priv *ines_priv;
 	int retval;
-- 
2.43.0


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

* [PATCH v1 14/18] staging: gpib: lpvo_usb: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (12 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 a4bfa95357bd..fa185171cc69 100644
--- a/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
+++ b/drivers/staging/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c
@@ -384,7 +384,7 @@ static void set_timeout(struct gpib_board *board)
  * detach() will be called. Always.
  */
 
-static int usb_gpib_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int usb_gpib_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	int retval, j;
 	u32 base = config->ibbase;
-- 
2.43.0


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

* [PATCH v1 15/18] staging: gpib: ni_usb: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (13 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
index 715848a3bb75..93975cd7e5b6 100644
--- a/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
+++ b/drivers/staging/gpib/ni_usb/ni_usb_gpib.c
@@ -2198,14 +2198,14 @@ static int ni_usb_hs_plus_extra_init(struct ni_usb_priv *ni_priv)
 }
 
 static inline int ni_usb_device_match(struct usb_interface *interface,
-				      const gpib_board_config_t *config)
+				      const struct gpib_board_config *config)
 {
 	if (gpib_match_device_path(&interface->dev, config->device_path) == 0)
 		return 0;
 	return 1;
 }
 
-static int ni_usb_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_usb_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	int retval;
 	int i, index;
-- 
2.43.0


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

* [PATCH v1 16/18] staging: gpib: pc2: struct gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (14 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
  2025-04-08 22:36 ` [PATCH v1 18/18] staging: gpib: Removing typedef gpib_board_config Michael Rubin
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 UTC (permalink / raw)
  To: gregkh, dpenkler, linux-staging, linux-kernel; +Cc: Michael Rubin

Using Linux code style for struct gpib_board_config

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 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gpib/pc2/pc2_gpib.c b/drivers/staging/gpib/pc2/pc2_gpib.c
index b0b19e2d4782..a33ebd951e79 100644
--- a/drivers/staging/gpib/pc2/pc2_gpib.c
+++ b/drivers/staging/gpib/pc2/pc2_gpib.c
@@ -252,7 +252,7 @@ static void free_private(struct gpib_board *board)
 	board->private_data = NULL;
 }
 
-static int pc2_generic_attach(struct gpib_board *board, const gpib_board_config_t *config,
+static int pc2_generic_attach(struct gpib_board *board, const struct gpib_board_config *config,
 			      enum nec7210_chipset chipset)
 {
 	struct pc2_priv *pc2_priv;
@@ -295,7 +295,7 @@ static int pc2_generic_attach(struct gpib_board *board, const gpib_board_config_
 	return 0;
 }
 
-static int pc2_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int pc2_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	int isr_flags = 0;
 	struct pc2_priv *pc2_priv;
@@ -366,7 +366,7 @@ static void pc2_detach(struct gpib_board *board)
 	free_private(board);
 }
 
-static int pc2a_common_attach(struct gpib_board *board, const gpib_board_config_t *config,
+static int pc2a_common_attach(struct gpib_board *board, const struct gpib_board_config *config,
 			      unsigned int num_registers, enum nec7210_chipset chipset)
 {
 	unsigned int i, j;
@@ -460,17 +460,17 @@ static int pc2a_common_attach(struct gpib_board *board, const gpib_board_config_
 	return 0;
 }
 
-static int pc2a_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int pc2a_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return pc2a_common_attach(board, config, pc2a_iosize, NEC7210);
 }
 
-static int pc2a_cb7210_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int pc2a_cb7210_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return pc2a_common_attach(board, config, pc2a_iosize, CB7210);
 }
 
-static int pc2_2a_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int pc2_2a_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return pc2a_common_attach(board, config, pc2_2a_iosize, NAT4882);
 }
-- 
2.43.0


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

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

Using Linux code style for struct gpib_board_config

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 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
index 596e2fa40dcd..f123d427f835 100644
--- a/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
+++ b/drivers/staging/gpib/tnt4882/tnt4882_gpib.c
@@ -898,7 +898,7 @@ static void tnt4882_init(struct tnt4882_priv *tnt_priv, const struct gpib_board
 	tnt_writeb(tnt_priv, tnt_priv->imr0_bits, IMR0);
 }
 
-static int ni_pci_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_pci_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct tnt4882_priv *tnt_priv;
 	struct nec7210_priv *nec_priv;
@@ -1019,7 +1019,7 @@ static int ni_isapnp_find(struct pnp_dev **dev)
 	return 0;
 }
 
-static int ni_isa_attach_common(struct gpib_board *board, const gpib_board_config_t *config,
+static int ni_isa_attach_common(struct gpib_board *board, const struct gpib_board_config *config,
 				enum nec7210_chipset chipset)
 {
 	struct tnt4882_priv *tnt_priv;
@@ -1075,17 +1075,17 @@ static int ni_isa_attach_common(struct gpib_board *board, const gpib_board_confi
 	return 0;
 }
 
-static int ni_tnt_isa_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_tnt_isa_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return ni_isa_attach_common(board, config, TNT4882);
 }
 
-static int ni_nat4882_isa_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_nat4882_isa_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return ni_isa_attach_common(board, config, NAT4882);
 }
 
-static int ni_nec_isa_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_nec_isa_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	return ni_isa_attach_common(board, config, NEC7210);
 }
@@ -1702,7 +1702,7 @@ static void __exit exit_ni_gpib_cs(void)
 
 static const int pcmcia_gpib_iosize = 32;
 
-static int ni_pcmcia_attach(struct gpib_board *board, const gpib_board_config_t *config)
+static int ni_pcmcia_attach(struct gpib_board *board, const struct gpib_board_config *config)
 {
 	struct local_info_t *info;
 	struct tnt4882_priv *tnt_priv;
-- 
2.43.0


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

* [PATCH v1 18/18] staging: gpib: Removing typedef gpib_board_config
  2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
                   ` (16 preceding siblings ...)
  2025-04-08 22:36 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
@ 2025-04-08 22:36 ` Michael Rubin
  17 siblings, 0 replies; 19+ messages in thread
From: Michael Rubin @ 2025-04-08 22:36 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 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h
index 1c641f17bdeb..0253ef2c94a3 100644
--- a/drivers/staging/gpib/include/gpib_types.h
+++ b/drivers/staging/gpib/include/gpib_types.h
@@ -23,7 +23,6 @@
 #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 */
 struct gpib_board_config {
@@ -55,7 +54,7 @@ struct gpib_interface {
 	/* name of board */
 	char *name;
 	/* attach() initializes board and allocates resources */
-	int (*attach)(struct gpib_board *board, const gpib_board_config_t *config);
+	int (*attach)(struct gpib_board *board, const struct gpib_board_config *config);
 	/* detach() shuts down board and frees resources */
 	void (*detach)(struct gpib_board *board);
 	/* read() should read at most 'length' bytes from the bus into
@@ -291,7 +290,7 @@ struct gpib_board {
 	struct gpib_pseudo_irq pseudo_irq;
 	/* error dong autopoll */
 	atomic_t stuck_srq;
-	gpib_board_config_t config;
+	struct gpib_board_config config;
 	/* Flag that indicates whether board is system controller of the bus */
 	unsigned master : 1;
 	/* individual status bit */
-- 
2.43.0


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

end of thread, other threads:[~2025-04-08 22:37 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 22:36 [PATCH v1 00/18] staging: gpib: Removing typedef gpib_board_config_t Michael Rubin
2025-04-08 22:36 ` [PATCH v1 01/18] staing: gpib: struct typing for gpib_board_config Michael Rubin
2025-04-08 22:36 ` [PATCH v1 02/18] staging: gpib: agilent_82350b: gpib_board_config Michael Rubin
2025-04-08 22:36 ` [PATCH v1 03/18] staging: gpib: agilent_82357a: gpib_board_config Michael Rubin
2025-04-08 22:36 ` [PATCH v1 04/18] staging: gpib: cb7210: struct gpib_board_config Michael Rubin
2025-04-08 22:36 ` [PATCH v1 05/18] staging: gpib: cec: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 06/18] staging: gpib: common: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 07/18] staging: gpib: eastwood: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 08/18] staging: gpib: fmh: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 09/18] staging: gpib: gpio: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 10/18] staging: gpib: hp_82335: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 11/18] staging: gpib: hp_82341: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 12/18] staging: gpib: gpibP: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 13/18] staging: gpib: ines: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 14/18] staging: gpib: lpvo_usb: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 15/18] staging: gpib: ni_usb: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 16/18] staging: gpib: pc2: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 17/18] staging: gpib: tnt4882: " Michael Rubin
2025-04-08 22:36 ` [PATCH v1 18/18] staging: gpib: Removing typedef gpib_board_config 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®