public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API
@ 2025-04-09  5:58 Michael Rubin
  2025-04-09  5:58 ` [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl Michael Rubin
                   ` (20 more replies)
  0 siblings, 21 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Moving typedefs to explicit structs as dictated by the Linux code style.
Also removing typedefs for fundamental types as per Linux code style.

Reported by checkpatch.pl

* Patch 1 - Patch 16: Removes typedef for explicit structs.

	In general, a pointer, or a struct that has elements that can
	reasonably be directly accessed should never be a typedef.

* Patch 17 - Patch 21

	Removing typedefs of fundamental types

Michael Rubin (21):
  staging: gpib: Using struct gpib_board_type_ioctl
  staging: gpib: Using struct gpib_read_write_ioctl
  staging: gpib: Using struct gpib_open_dev_ioctl
  staging: gpib: Using struct gpib_close_dev_ioctl
  staging: gpib: Using struct gpib_serial_poll_ioctl
  staging: gpib: Using struct gpib_eos_ioctl
  staging: gpib: Using struct gpib_wait_ioctl
  staging: gpib: Using struct gpib_online_ioctl
  staging: gpib: Using struct gpib_spoll_bytes_ioctl
  staging: gpib: Using struct gpib_board_info_ioctl
  staging: gpib: Using struct gpib_select_pci_ioctl
  staging: gpib: Using struct gpib_ppoll_config_ioctl`
  staging: gpib: Using struct gpib_pad_ioctl
  staging: gpib: Using struct gpib_sad_ioctl
  staging: gpib: Using gpib_select_device_path_ioctl
  staging: gpib: Using struct gpib_request_service2
  staging: gpib: event_ioctl_t now short
  staging: gpib: rsc_ioctl_t now int
  staging: gpib: t1_delay_ioctl_t now unsigned int
  staging: gpib: autospoll_ioctl_t now short
  staging: gpib: local_ppoll_mode_ioctl_t now short

 drivers/staging/gpib/common/gpib_os.c  |  58 ++++++------
 drivers/staging/gpib/uapi/gpib_ioctl.h | 118 ++++++++++++-------------
 2 files changed, 86 insertions(+), 90 deletions(-)

-- 
2.43.0


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

* [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  8:10   ` Dan Carpenter
  2025-04-09  5:58 ` [Patch v1 02/21] staging: gpib: Using struct gpib_read_write_ioctl Michael Rubin
                   ` (19 subsequent siblings)
  20 siblings, 1 reply; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_board_type_ioctl' to remove typedef.

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  | 5 +++--
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index a1992a2b06a0..e12a9e56d808 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -813,7 +813,7 @@ static int board_type_ioctl(struct gpib_file_private *file_priv,
 			    struct gpib_board *board, unsigned long arg)
 {
 	struct list_head *list_ptr;
-	board_type_ioctl_t cmd;
+	struct gpib_board_type_ioctl cmd;
 	int retval;
 
 	if (!capable(CAP_SYS_ADMIN))
@@ -821,7 +821,8 @@ static int board_type_ioctl(struct gpib_file_private *file_priv,
 	if (board->online)
 		return -EBUSY;
 
-	retval = copy_from_user(&cmd, (void __user *)arg, sizeof(board_type_ioctl_t));
+	retval = copy_from_user(&cmd, (void __user *)arg,
+				sizeof(struct gpib_board_type_ioctl));
 	if (retval)
 		return retval;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 6202865278ea..4ddcbc2a81b0 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -12,9 +12,9 @@
 
 #define GPIB_CODE 160
 
-typedef struct {
+struct gpib_board_type_ioctl {
 	char name[100];
-} board_type_ioctl_t;
+};
 
 /* argument for read/write/command ioctls */
 typedef struct {
@@ -143,7 +143,7 @@ enum gpib_ioctl {
 	CFCBASE = _IOW(GPIB_CODE, 21, uint64_t),
 	CFCIRQ = _IOW(GPIB_CODE, 22, unsigned int),
 	CFCDMA = _IOW(GPIB_CODE, 23, unsigned int),
-	CFCBOARDTYPE = _IOW(GPIB_CODE, 24, board_type_ioctl_t),
+	CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl),
 
 	IBMUTEX = _IOW(GPIB_CODE, 26, int),
 	IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, spoll_bytes_ioctl_t),
-- 
2.43.0


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

* [Patch v1 02/21] staging: gpib: Using struct gpib_read_write_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
  2025-04-09  5:58 ` [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 03/21] staging: gpib: Using struct gpib_open_dev_ioctl Michael Rubin
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_read_write_ioctl' to remove typedef.

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  |  6 +++---
 drivers/staging/gpib/uapi/gpib_ioctl.h | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index e12a9e56d808..02ead46453a7 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -865,7 +865,7 @@ static int board_type_ioctl(struct gpib_file_private *file_priv,
 static int read_ioctl(struct gpib_file_private *file_priv, struct gpib_board *board,
 		      unsigned long arg)
 {
-	read_write_ioctl_t read_cmd;
+	struct gpib_read_write_ioctl read_cmd;
 	u8 __user *userbuf;
 	unsigned long remain;
 	int end_flag = 0;
@@ -940,7 +940,7 @@ static int read_ioctl(struct gpib_file_private *file_priv, struct gpib_board *bo
 static int command_ioctl(struct gpib_file_private *file_priv,
 			 struct gpib_board *board, unsigned long arg)
 {
-	read_write_ioctl_t cmd;
+	struct gpib_read_write_ioctl cmd;
 	u8 __user *userbuf;
 	unsigned long remain;
 	int retval;
@@ -1024,7 +1024,7 @@ static int command_ioctl(struct gpib_file_private *file_priv,
 static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *board,
 		       unsigned long arg)
 {
-	read_write_ioctl_t write_cmd;
+	struct gpib_read_write_ioctl write_cmd;
 	u8 __user *userbuf;
 	unsigned long remain;
 	int retval = 0;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 4ddcbc2a81b0..15c924efe5bc 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -17,13 +17,13 @@ struct gpib_board_type_ioctl {
 };
 
 /* argument for read/write/command ioctls */
-typedef struct {
+struct gpib_read_write_ioctl {
 	uint64_t buffer_ptr;
 	unsigned int requested_transfer_count;
 	unsigned int completed_transfer_count;
 	int end; /* end flag return for reads, end io suppression request for cmd*/
 	int handle;
-} read_write_ioctl_t;
+};
 
 typedef struct {
 	unsigned int handle;
@@ -121,9 +121,9 @@ typedef struct {
 
 /* Standard functions. */
 enum gpib_ioctl {
-	IBRD = _IOWR(GPIB_CODE, 100, read_write_ioctl_t),
-	IBWRT = _IOWR(GPIB_CODE, 101, read_write_ioctl_t),
-	IBCMD = _IOWR(GPIB_CODE, 102, read_write_ioctl_t),
+	IBRD = _IOWR(GPIB_CODE, 100, struct gpib_read_write_ioctl),
+	IBWRT = _IOWR(GPIB_CODE, 101, struct gpib_read_write_ioctl),
+	IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
 	IBOPENDEV = _IOWR(GPIB_CODE, 3, open_dev_ioctl_t),
 	IBCLOSEDEV = _IOW(GPIB_CODE, 4, close_dev_ioctl_t),
 	IBWAIT = _IOWR(GPIB_CODE, 5, wait_ioctl_t),
-- 
2.43.0


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

* [Patch v1 03/21] staging: gpib: Using struct gpib_open_dev_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
  2025-04-09  5:58 ` [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl Michael Rubin
  2025-04-09  5:58 ` [Patch v1 02/21] staging: gpib: Using struct gpib_read_write_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 04/21] staging: gpib: Using struct gpib_close_dev_ioctl Michael Rubin
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_open_dev_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 02ead46453a7..a0a9a07dab5d 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1212,7 +1212,7 @@ static int cleanup_open_devices(struct gpib_file_private *file_priv, struct gpib
 
 static int open_dev_ioctl(struct file *filep, struct gpib_board *board, unsigned long arg)
 {
-	open_dev_ioctl_t open_dev_cmd;
+	struct gpib_open_dev_ioctl open_dev_cmd;
 	int retval;
 	struct gpib_file_private *file_priv = filep->private_data;
 	int i;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 15c924efe5bc..cfd1afb36e4f 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -25,12 +25,12 @@ struct gpib_read_write_ioctl {
 	int handle;
 };
 
-typedef struct {
+struct gpib_open_dev_ioctl {
 	unsigned int handle;
 	unsigned int pad;
 	int sad;
 	unsigned is_board : 1;
-} open_dev_ioctl_t;
+};
 
 typedef struct {
 	unsigned int handle;
@@ -124,7 +124,7 @@ enum gpib_ioctl {
 	IBRD = _IOWR(GPIB_CODE, 100, struct gpib_read_write_ioctl),
 	IBWRT = _IOWR(GPIB_CODE, 101, struct gpib_read_write_ioctl),
 	IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
-	IBOPENDEV = _IOWR(GPIB_CODE, 3, open_dev_ioctl_t),
+	IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
 	IBCLOSEDEV = _IOW(GPIB_CODE, 4, close_dev_ioctl_t),
 	IBWAIT = _IOWR(GPIB_CODE, 5, wait_ioctl_t),
 	IBRPP = _IOWR(GPIB_CODE, 6, uint8_t),
-- 
2.43.0


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

* [Patch v1 04/21] staging: gpib: Using struct gpib_close_dev_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (2 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 03/21] staging: gpib: Using struct gpib_open_dev_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 05/21] staging: gpib: Using struct gpib_serial_poll_ioctl Michael Rubin
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_close_dev_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index a0a9a07dab5d..4d105db18447 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1262,7 +1262,7 @@ static int open_dev_ioctl(struct file *filep, struct gpib_board *board, unsigned
 
 static int close_dev_ioctl(struct file *filep, struct gpib_board *board, unsigned long arg)
 {
-	close_dev_ioctl_t cmd;
+	struct gpib_close_dev_ioctl cmd;
 	struct gpib_file_private *file_priv = filep->private_data;
 	int retval;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index cfd1afb36e4f..6ea6114ae78a 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -32,9 +32,9 @@ struct gpib_open_dev_ioctl {
 	unsigned is_board : 1;
 };
 
-typedef struct {
+struct gpib_close_dev_ioctl {
 	unsigned int handle;
-} close_dev_ioctl_t;
+};
 
 typedef struct {
 	unsigned int pad;
@@ -125,7 +125,7 @@ enum gpib_ioctl {
 	IBWRT = _IOWR(GPIB_CODE, 101, struct gpib_read_write_ioctl),
 	IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
 	IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
-	IBCLOSEDEV = _IOW(GPIB_CODE, 4, close_dev_ioctl_t),
+	IBCLOSEDEV = _IOW(GPIB_CODE, 4, struct gpib_close_dev_ioctl),
 	IBWAIT = _IOWR(GPIB_CODE, 5, wait_ioctl_t),
 	IBRPP = _IOWR(GPIB_CODE, 6, uint8_t),
 
-- 
2.43.0


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

* [Patch v1 05/21] staging: gpib: Using struct gpib_serial_poll_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (3 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 04/21] staging: gpib: Using struct gpib_close_dev_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 06/21] staging: gpib: Using struct gpib_eos_ioctl Michael Rubin
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_serial_poll_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 4d105db18447..9f7becb09e60 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1289,7 +1289,7 @@ static int close_dev_ioctl(struct file *filep, struct gpib_board *board, unsigne
 
 static int serial_poll_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	serial_poll_ioctl_t serial_cmd;
+	struct gpib_serial_poll_ioctl serial_cmd;
 	int retval;
 
 	retval = copy_from_user(&serial_cmd, (void __user *)arg, sizeof(serial_cmd));
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 6ea6114ae78a..9be3262271c5 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -36,11 +36,11 @@ struct gpib_close_dev_ioctl {
 	unsigned int handle;
 };
 
-typedef struct {
+struct gpib_serial_poll_ioctl {
 	unsigned int pad;
 	int sad;
 	uint8_t status_byte;
-} serial_poll_ioctl_t;
+};
 
 typedef struct {
 	int eos;
@@ -137,7 +137,7 @@ enum gpib_ioctl {
 	IBPAD = _IOW(GPIB_CODE, 15, pad_ioctl_t),
 	IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t),
 	IBTMO = _IOW(GPIB_CODE, 17, unsigned int),
-	IBRSP = _IOWR(GPIB_CODE, 18, serial_poll_ioctl_t),
+	IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
 	IBEOS = _IOW(GPIB_CODE, 19, eos_ioctl_t),
 	IBRSV = _IOW(GPIB_CODE, 20, uint8_t),
 	CFCBASE = _IOW(GPIB_CODE, 21, uint64_t),
-- 
2.43.0


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

* [Patch v1 06/21] staging: gpib: Using struct gpib_eos_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (4 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 05/21] staging: gpib: Using struct gpib_serial_poll_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 07/21] staging: gpib: Using struct gpib_wait_ioctl Michael Rubin
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_eos_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 9f7becb09e60..bbf8a60978d1 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1508,7 +1508,7 @@ static int sad_ioctl(struct gpib_board *board, struct gpib_file_private *file_pr
 
 static int eos_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	eos_ioctl_t eos_cmd;
+	struct gpib_eos_ioctl eos_cmd;
 	int retval;
 
 	retval = copy_from_user(&eos_cmd, (void __user *)arg, sizeof(eos_cmd));
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 9be3262271c5..3f32eceaca93 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -42,10 +42,10 @@ struct gpib_serial_poll_ioctl {
 	uint8_t status_byte;
 };
 
-typedef struct {
+struct gpib_eos_ioctl {
 	int eos;
 	int eos_flags;
-} eos_ioctl_t;
+};
 
 typedef struct {
 	int handle;
@@ -138,7 +138,7 @@ enum gpib_ioctl {
 	IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t),
 	IBTMO = _IOW(GPIB_CODE, 17, unsigned int),
 	IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
-	IBEOS = _IOW(GPIB_CODE, 19, eos_ioctl_t),
+	IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl),
 	IBRSV = _IOW(GPIB_CODE, 20, uint8_t),
 	CFCBASE = _IOW(GPIB_CODE, 21, uint64_t),
 	CFCIRQ = _IOW(GPIB_CODE, 22, unsigned int),
-- 
2.43.0


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

* [Patch v1 07/21] staging: gpib: Using struct gpib_wait_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (5 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 06/21] staging: gpib: Using struct gpib_eos_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 08/21] staging: gpib: Using struct gpib_online_ioctl Michael Rubin
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_wait_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index bbf8a60978d1..6d0191c9f730 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1311,7 +1311,7 @@ static int serial_poll_ioctl(struct gpib_board *board, unsigned long arg)
 static int wait_ioctl(struct gpib_file_private *file_priv, struct gpib_board *board,
 		      unsigned long arg)
 {
-	wait_ioctl_t wait_cmd;
+	struct gpib_wait_ioctl wait_cmd;
 	int retval;
 	struct gpib_descriptor *desc;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 3f32eceaca93..71c5e3d020bb 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -47,7 +47,7 @@ struct gpib_eos_ioctl {
 	int eos_flags;
 };
 
-typedef struct {
+struct gpib_wait_ioctl {
 	int handle;
 	int wait_mask;
 	int clear_mask;
@@ -56,7 +56,7 @@ typedef struct {
 	int pad;
 	int sad;
 	unsigned int usec_timeout;
-} wait_ioctl_t;
+};
 
 typedef struct {
 	uint64_t init_data_ptr;
@@ -126,7 +126,7 @@ enum gpib_ioctl {
 	IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
 	IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
 	IBCLOSEDEV = _IOW(GPIB_CODE, 4, struct gpib_close_dev_ioctl),
-	IBWAIT = _IOWR(GPIB_CODE, 5, wait_ioctl_t),
+	IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl),
 	IBRPP = _IOWR(GPIB_CODE, 6, uint8_t),
 
 	IBSIC = _IOW(GPIB_CODE, 9, unsigned int),
-- 
2.43.0


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

* [Patch v1 08/21] staging: gpib: Using struct gpib_online_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (6 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 07/21] staging: gpib: Using struct gpib_wait_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 09/21] staging: gpib: Using struct gpib_spoll_bytes_ioctl Michael Rubin
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_online_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 6d0191c9f730..b215521d0ee5 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1353,7 +1353,7 @@ static int parallel_poll_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int online_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	online_ioctl_t online_cmd;
+	struct gpib_online_ioctl online_cmd;
 	int retval;
 	void __user *init_data = NULL;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 71c5e3d020bb..dab170b09764 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -58,11 +58,11 @@ struct gpib_wait_ioctl {
 	unsigned int usec_timeout;
 };
 
-typedef struct {
+struct gpib_online_ioctl {
 	uint64_t init_data_ptr;
 	int init_data_length;
 	int online;
-} online_ioctl_t;
+};
 
 typedef struct {
 	unsigned int num_bytes;
@@ -158,7 +158,7 @@ enum gpib_ioctl {
 	IBLOC = _IO(GPIB_CODE, 36),
 
 	IBAUTOSPOLL = _IOW(GPIB_CODE, 38, autospoll_ioctl_t),
-	IBONL = _IOW(GPIB_CODE, 39, online_ioctl_t),
+	IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
 	IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
 	IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
 	IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, select_device_path_ioctl_t),
-- 
2.43.0


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

* [Patch v1 09/21] staging: gpib: Using struct gpib_spoll_bytes_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (7 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 08/21] staging: gpib: Using struct gpib_online_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 10/21] staging: gpib: Using struct gpib_board_info_ioctl Michael Rubin
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_spoll_bytes_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index b215521d0ee5..79806cc51749 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1095,7 +1095,7 @@ static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *b
 static int status_bytes_ioctl(struct gpib_board *board, unsigned long arg)
 {
 	struct gpib_status_queue *device;
-	spoll_bytes_ioctl_t cmd;
+	struct gpib_spoll_bytes_ioctl cmd;
 	int retval;
 
 	retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd));
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index dab170b09764..e3d167edfd69 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -64,11 +64,11 @@ struct gpib_online_ioctl {
 	int online;
 };
 
-typedef struct {
+struct gpib_spoll_bytes_ioctl {
 	unsigned int num_bytes;
 	unsigned int pad;
 	int sad;
-} spoll_bytes_ioctl_t;
+};
 
 typedef struct {
 	unsigned int pad;
@@ -146,7 +146,7 @@ enum gpib_ioctl {
 	CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl),
 
 	IBMUTEX = _IOW(GPIB_CODE, 26, int),
-	IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, spoll_bytes_ioctl_t),
+	IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
 	IBPPC = _IOW(GPIB_CODE, 28, ppoll_config_ioctl_t),
 	IBBOARD_INFO = _IOR(GPIB_CODE, 29, board_info_ioctl_t),
 
-- 
2.43.0


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

* [Patch v1 10/21] staging: gpib: Using struct gpib_board_info_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (8 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 09/21] staging: gpib: Using struct gpib_spoll_bytes_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 11/21] staging: gpib: Using struct gpib_select_pci_ioctl Michael Rubin
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_board_info_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 79806cc51749..ce2184c5de03 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1762,7 +1762,7 @@ static int query_board_rsv_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int board_info_ioctl(const struct gpib_board *board, unsigned long arg)
 {
-	board_info_ioctl_t info;
+	struct gpib_board_info_ioctl info;
 	int retval;
 
 	info.pad = board->pad;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index e3d167edfd69..041b0a1593e9 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -70,7 +70,7 @@ struct gpib_spoll_bytes_ioctl {
 	int sad;
 };
 
-typedef struct {
+struct gpib_board_info_ioctl {
 	unsigned int pad;
 	int sad;
 	int parallel_poll_configuration;
@@ -79,7 +79,7 @@ typedef struct {
 	unsigned int t1_delay;
 	unsigned ist : 1;
 	unsigned no_7_bit_eos : 1;
-} board_info_ioctl_t;
+};
 
 typedef struct {
 	int pci_bus;
@@ -148,7 +148,7 @@ enum gpib_ioctl {
 	IBMUTEX = _IOW(GPIB_CODE, 26, int),
 	IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
 	IBPPC = _IOW(GPIB_CODE, 28, ppoll_config_ioctl_t),
-	IBBOARD_INFO = _IOR(GPIB_CODE, 29, board_info_ioctl_t),
+	IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),
 
 	IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
 	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, select_pci_ioctl_t),
-- 
2.43.0


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

* [Patch v1 11/21] staging: gpib: Using struct gpib_select_pci_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (9 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 10/21] staging: gpib: Using struct gpib_board_info_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 12/21] staging: gpib: Using struct gpib_ppoll_config_ioctl` Michael Rubin
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_select_pci_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index ce2184c5de03..5cf425fdcd89 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1797,7 +1797,7 @@ static int interface_clear_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int select_pci_ioctl(struct gpib_board_config *config, unsigned long arg)
 {
-	select_pci_ioctl_t selection;
+	struct gpib_select_pci_ioctl selection;
 	int retval;
 
 	if (!capable(CAP_SYS_ADMIN))
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 041b0a1593e9..5681a66483a8 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -81,10 +81,10 @@ struct gpib_board_info_ioctl {
 	unsigned no_7_bit_eos : 1;
 };
 
-typedef struct {
+struct gpib_select_pci_ioctl {
 	int pci_bus;
 	int pci_slot;
-} select_pci_ioctl_t;
+};
 
 typedef struct {
 	uint8_t config;
@@ -151,7 +151,7 @@ enum gpib_ioctl {
 	IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),
 
 	IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
-	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, select_pci_ioctl_t),
+	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
 	IBEVENT = _IOR(GPIB_CODE, 33, event_ioctl_t),
 	IBRSC = _IOW(GPIB_CODE, 34, rsc_ioctl_t),
 	IB_T1_DELAY = _IOW(GPIB_CODE, 35, t1_delay_ioctl_t),
-- 
2.43.0


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

* [Patch v1 12/21] staging: gpib: Using struct gpib_ppoll_config_ioctl`
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (10 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 11/21] staging: gpib: Using struct gpib_select_pci_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 13/21] staging: gpib: Using struct gpib_pad_ioctl Michael Rubin
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_ppoll_config_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 5cf425fdcd89..3939c85fb533 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1692,7 +1692,7 @@ static int timeout_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int ppc_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	ppoll_config_ioctl_t cmd;
+	struct gpib_ppoll_config_ioctl cmd;
 	int retval;
 
 	retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd));
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 5681a66483a8..df428899ba3f 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -86,11 +86,11 @@ struct gpib_select_pci_ioctl {
 	int pci_slot;
 };
 
-typedef struct {
+struct gpib_ppoll_config_ioctl {
 	uint8_t config;
 	unsigned set_ist : 1;
 	unsigned clear_ist : 1;
-}	ppoll_config_ioctl_t;
+};
 
 typedef struct {
 	unsigned int handle;
@@ -147,7 +147,7 @@ enum gpib_ioctl {
 
 	IBMUTEX = _IOW(GPIB_CODE, 26, int),
 	IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
-	IBPPC = _IOW(GPIB_CODE, 28, ppoll_config_ioctl_t),
+	IBPPC = _IOW(GPIB_CODE, 28, struct gpib_ppoll_config_ioctl),
 	IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),
 
 	IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
-- 
2.43.0


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

* [Patch v1 13/21] staging: gpib: Using struct gpib_pad_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (11 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 12/21] staging: gpib: Using struct gpib_ppoll_config_ioctl` Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 14/21] staging: gpib: Using struct gpib_sad_ioctl Michael Rubin
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_pad_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 3939c85fb533..2fc93a3c4b00 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1438,7 +1438,7 @@ static int line_status_ioctl(struct gpib_board *board, unsigned long arg)
 static int pad_ioctl(struct gpib_board *board, struct gpib_file_private *file_priv,
 		     unsigned long arg)
 {
-	pad_ioctl_t cmd;
+	struct gpib_pad_ioctl cmd;
 	int retval;
 	struct gpib_descriptor *desc;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index df428899ba3f..7cb09cac6cd0 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -92,10 +92,10 @@ struct gpib_ppoll_config_ioctl {
 	unsigned clear_ist : 1;
 };
 
-typedef struct {
+struct gpib_pad_ioctl {
 	unsigned int handle;
 	unsigned int pad;
-} pad_ioctl_t;
+};
 
 typedef struct {
 	unsigned int handle;
@@ -134,7 +134,7 @@ enum gpib_ioctl {
 	IBGTS = _IO(GPIB_CODE, 11),
 	IBCAC = _IOW(GPIB_CODE, 12, int),
 	IBLINES = _IOR(GPIB_CODE, 14, short),
-	IBPAD = _IOW(GPIB_CODE, 15, pad_ioctl_t),
+	IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl),
 	IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t),
 	IBTMO = _IOW(GPIB_CODE, 17, unsigned int),
 	IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
-- 
2.43.0


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

* [Patch v1 14/21] staging: gpib: Using struct gpib_sad_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (12 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 13/21] staging: gpib: Using struct gpib_pad_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 15/21] staging: gpib: Using gpib_select_device_path_ioctl Michael Rubin
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_sad_ioctl' to remove typedef.

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  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 2fc93a3c4b00..8febd683fe0b 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1474,7 +1474,7 @@ static int pad_ioctl(struct gpib_board *board, struct gpib_file_private *file_pr
 static int sad_ioctl(struct gpib_board *board, struct gpib_file_private *file_priv,
 		     unsigned long arg)
 {
-	sad_ioctl_t cmd;
+	struct gpib_sad_ioctl cmd;
 	int retval;
 	struct gpib_descriptor *desc;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 7cb09cac6cd0..a0fbc660ab99 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -97,10 +97,10 @@ struct gpib_pad_ioctl {
 	unsigned int pad;
 };
 
-typedef struct {
+struct gpib_sad_ioctl {
 	unsigned int handle;
 	int sad;
-} sad_ioctl_t;
+};
 
 // select a piece of hardware to attach by its sysfs device path
 typedef struct {
@@ -135,7 +135,7 @@ enum gpib_ioctl {
 	IBCAC = _IOW(GPIB_CODE, 12, int),
 	IBLINES = _IOR(GPIB_CODE, 14, short),
 	IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl),
-	IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t),
+	IBSAD = _IOW(GPIB_CODE, 16, struct gpib_sad_ioctl),
 	IBTMO = _IOW(GPIB_CODE, 17, unsigned int),
 	IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
 	IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl),
-- 
2.43.0


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

* [Patch v1 15/21] staging: gpib: Using gpib_select_device_path_ioctl
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (13 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 14/21] staging: gpib: Using struct gpib_sad_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 16/21] staging: gpib: Using struct gpib_request_service2 Michael Rubin
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_select_device_path_ioctl' to
remove typedef.

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  | 7 ++++---
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 8febd683fe0b..71c379c22be0 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1815,17 +1815,18 @@ 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)
 {
-	select_device_path_ioctl_t *selection;
+	struct gpib_select_device_path_ioctl *selection;
 	int retval;
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	selection = vmalloc(sizeof(select_device_path_ioctl_t));
+	selection = vmalloc(sizeof(struct gpib_select_device_path_ioctl));
 	if (!selection)
 		return -ENOMEM;
 
-	retval = copy_from_user(selection, (void __user *)arg, sizeof(select_device_path_ioctl_t));
+	retval = copy_from_user(selection, (void __user *)arg,
+				sizeof(struct gpib_select_device_path_ioctl));
 	if (retval) {
 		vfree(selection);
 		return -EFAULT;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index a0fbc660ab99..473b09d4efaa 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -103,9 +103,9 @@ struct gpib_sad_ioctl {
 };
 
 // select a piece of hardware to attach by its sysfs device path
-typedef struct {
+struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
-} select_device_path_ioctl_t;
+};
 
 typedef short event_ioctl_t;
 typedef int rsc_ioctl_t;
@@ -161,7 +161,7 @@ enum gpib_ioctl {
 	IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
 	IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
 	IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
-	IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, select_device_path_ioctl_t),
+	IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
 	// 44 was IBSELECT_SERIAL_NUMBER
 	IBRSV2 = _IOW(GPIB_CODE, 45, request_service2_t)
 };
-- 
2.43.0


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

* [Patch v1 16/21] staging: gpib: Using struct gpib_request_service2
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (14 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 15/21] staging: gpib: Using gpib_select_device_path_ioctl Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:58 ` [Patch v1 17/21] staging: gpib: event_ioctl_t now short Michael Rubin
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style for 'struct gpib_request_service2' to remove typedef.

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 ++--
 drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 71c379c22be0..446827701399 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1532,11 +1532,11 @@ static int request_service_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int request_service2_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	request_service2_t request_service2_cmd;
+	struct gpib_request_service2 request_service2_cmd;
 	int retval;
 
 	retval = copy_from_user(&request_service2_cmd, (void __user *)arg,
-				sizeof(request_service2_t));
+				sizeof(struct gpib_request_service2));
 	if (retval)
 		return -EFAULT;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 473b09d4efaa..eea169a0ba40 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -114,10 +114,10 @@ typedef short autospoll_ioctl_t;
 typedef short local_ppoll_mode_ioctl_t;
 
 // update status byte and request service
-typedef struct {
+struct gpib_request_service2 {
 	uint8_t status_byte;
 	int new_reason_for_service;
-} request_service2_t;
+};
 
 /* Standard functions. */
 enum gpib_ioctl {
@@ -163,7 +163,7 @@ enum gpib_ioctl {
 	IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
 	IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
 	// 44 was IBSELECT_SERIAL_NUMBER
-	IBRSV2 = _IOW(GPIB_CODE, 45, request_service2_t)
+	IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2)
 };
 
 #endif	/* _GPIB_IOCTL_H */
-- 
2.43.0


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

* [Patch v1 17/21] staging: gpib: event_ioctl_t now short
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (15 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 16/21] staging: gpib: Using struct gpib_request_service2 Michael Rubin
@ 2025-04-09  5:58 ` Michael Rubin
  2025-04-09  5:59 ` [Patch v1 18/21] staging: gpib: rsc_ioctl_t now int Michael Rubin
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:58 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style to replace typedef event_ioctl_t with type short.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/common/gpib_os.c  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 446827701399..72a9b660f124 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1951,7 +1951,7 @@ int pop_gpib_event(struct gpib_board *board, struct gpib_event_queue *queue, sho
 
 static int event_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	event_ioctl_t user_event;
+	short user_event;
 	int retval;
 	short event;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index eea169a0ba40..e9baa6724fb4 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -107,7 +107,6 @@ struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
 };
 
-typedef short event_ioctl_t;
 typedef int rsc_ioctl_t;
 typedef unsigned int t1_delay_ioctl_t;
 typedef short autospoll_ioctl_t;
@@ -152,7 +151,7 @@ enum gpib_ioctl {
 
 	IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
 	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
-	IBEVENT = _IOR(GPIB_CODE, 33, event_ioctl_t),
+	IBEVENT = _IOR(GPIB_CODE, 33, short),
 	IBRSC = _IOW(GPIB_CODE, 34, rsc_ioctl_t),
 	IB_T1_DELAY = _IOW(GPIB_CODE, 35, t1_delay_ioctl_t),
 	IBLOC = _IO(GPIB_CODE, 36),
-- 
2.43.0


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

* [Patch v1 18/21] staging: gpib: rsc_ioctl_t now int
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (16 preceding siblings ...)
  2025-04-09  5:58 ` [Patch v1 17/21] staging: gpib: event_ioctl_t now short Michael Rubin
@ 2025-04-09  5:59 ` Michael Rubin
  2025-04-09  5:59 ` [Patch v1 19/21] staging: gpib: t1_delay_ioctl_t now unsigned int Michael Rubin
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:59 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style to replace typedef rsc_ioctl_t with type int.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/common/gpib_os.c  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 72a9b660f124..6a2ceb7b0b59 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1970,7 +1970,7 @@ static int event_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int request_system_control_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	rsc_ioctl_t request_control;
+	int request_control;
 	int retval;
 
 	retval = copy_from_user(&request_control, (void __user *)arg, sizeof(request_control));
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index e9baa6724fb4..c3d82b627210 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -107,7 +107,6 @@ struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
 };
 
-typedef int rsc_ioctl_t;
 typedef unsigned int t1_delay_ioctl_t;
 typedef short autospoll_ioctl_t;
 typedef short local_ppoll_mode_ioctl_t;
@@ -152,7 +151,7 @@ enum gpib_ioctl {
 	IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
 	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
 	IBEVENT = _IOR(GPIB_CODE, 33, short),
-	IBRSC = _IOW(GPIB_CODE, 34, rsc_ioctl_t),
+	IBRSC = _IOW(GPIB_CODE, 34, int),
 	IB_T1_DELAY = _IOW(GPIB_CODE, 35, t1_delay_ioctl_t),
 	IBLOC = _IO(GPIB_CODE, 36),
 
-- 
2.43.0


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

* [Patch v1 19/21] staging: gpib: t1_delay_ioctl_t now unsigned int
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (17 preceding siblings ...)
  2025-04-09  5:59 ` [Patch v1 18/21] staging: gpib: rsc_ioctl_t now int Michael Rubin
@ 2025-04-09  5:59 ` Michael Rubin
  2025-04-09  5:59 ` [Patch v1 20/21] staging: gpib: autospoll_ioctl_t now short Michael Rubin
  2025-04-09  5:59 ` [Patch v1 21/21] staging: gpib: local_ppoll_mode_ioctl_t " Michael Rubin
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:59 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style to replace typedef t1_delay_ioctl_t with type
unsigned int.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/common/gpib_os.c  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 6a2ceb7b0b59..d32f39ddea28 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1984,7 +1984,7 @@ static int request_system_control_ioctl(struct gpib_board *board, unsigned long
 
 static int t1_delay_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	t1_delay_ioctl_t cmd;
+	unsigned int cmd;
 	unsigned int delay;
 	int retval;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index c3d82b627210..0403e285eed4 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -107,7 +107,6 @@ struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
 };
 
-typedef unsigned int t1_delay_ioctl_t;
 typedef short autospoll_ioctl_t;
 typedef short local_ppoll_mode_ioctl_t;
 
@@ -152,7 +151,7 @@ enum gpib_ioctl {
 	IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
 	IBEVENT = _IOR(GPIB_CODE, 33, short),
 	IBRSC = _IOW(GPIB_CODE, 34, int),
-	IB_T1_DELAY = _IOW(GPIB_CODE, 35, t1_delay_ioctl_t),
+	IB_T1_DELAY = _IOW(GPIB_CODE, 35, unsigned int),
 	IBLOC = _IO(GPIB_CODE, 36),
 
 	IBAUTOSPOLL = _IOW(GPIB_CODE, 38, autospoll_ioctl_t),
-- 
2.43.0


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

* [Patch v1 20/21] staging: gpib: autospoll_ioctl_t now short
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (18 preceding siblings ...)
  2025-04-09  5:59 ` [Patch v1 19/21] staging: gpib: t1_delay_ioctl_t now unsigned int Michael Rubin
@ 2025-04-09  5:59 ` Michael Rubin
  2025-04-09  5:59 ` [Patch v1 21/21] staging: gpib: local_ppoll_mode_ioctl_t " Michael Rubin
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:59 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style to replace typedef autospoll_ioctl_t with type short.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
---
 drivers/staging/gpib/common/gpib_os.c  | 2 +-
 drivers/staging/gpib/uapi/gpib_ioctl.h | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index d32f39ddea28..6a92562ae39c 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1600,7 +1600,7 @@ static int dma_ioctl(struct gpib_board_config *config, unsigned long arg)
 static int autospoll_ioctl(struct gpib_board *board, struct gpib_file_private *file_priv,
 			   unsigned long arg)
 {
-	autospoll_ioctl_t enable;
+	short enable;
 	int retval;
 	struct gpib_descriptor *desc;
 
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 0403e285eed4..c66b8d59a46b 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -107,7 +107,6 @@ struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
 };
 
-typedef short autospoll_ioctl_t;
 typedef short local_ppoll_mode_ioctl_t;
 
 // update status byte and request service
@@ -154,7 +153,7 @@ enum gpib_ioctl {
 	IB_T1_DELAY = _IOW(GPIB_CODE, 35, unsigned int),
 	IBLOC = _IO(GPIB_CODE, 36),
 
-	IBAUTOSPOLL = _IOW(GPIB_CODE, 38, autospoll_ioctl_t),
+	IBAUTOSPOLL = _IOW(GPIB_CODE, 38, short),
 	IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
 	IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
 	IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
-- 
2.43.0


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

* [Patch v1 21/21] staging: gpib: local_ppoll_mode_ioctl_t now short
  2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
                   ` (19 preceding siblings ...)
  2025-04-09  5:59 ` [Patch v1 20/21] staging: gpib: autospoll_ioctl_t now short Michael Rubin
@ 2025-04-09  5:59 ` Michael Rubin
  20 siblings, 0 replies; 25+ messages in thread
From: Michael Rubin @ 2025-04-09  5:59 UTC (permalink / raw)
  To: gregkh, dpenkler; +Cc: linux-staging, linux-kernel, Michael Rubin

Using Linux code style to replace typedef local_ppoll_mode_ioctl_t with
type short.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

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

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 6a92562ae39c..7d0c03ebe624 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1718,7 +1718,7 @@ static int ppc_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int set_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long arg)
 {
-	local_ppoll_mode_ioctl_t cmd;
+	short cmd;
 	int retval;
 
 	retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd));
@@ -1735,7 +1735,7 @@ 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)
 {
-	local_ppoll_mode_ioctl_t cmd;
+	short cmd;
 	int retval;
 
 	cmd = board->local_ppoll_mode;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index c66b8d59a46b..e903ec1fe274 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -107,8 +107,6 @@ struct gpib_select_device_path_ioctl {
 	char device_path[0x1000];
 };
 
-typedef short local_ppoll_mode_ioctl_t;
-
 // update status byte and request service
 struct gpib_request_service2 {
 	uint8_t status_byte;
@@ -155,8 +153,8 @@ enum gpib_ioctl {
 
 	IBAUTOSPOLL = _IOW(GPIB_CODE, 38, short),
 	IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
-	IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
-	IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
+	IBPP2_SET = _IOW(GPIB_CODE, 40, short),
+	IBPP2_GET = _IOR(GPIB_CODE, 41, short),
 	IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
 	// 44 was IBSELECT_SERIAL_NUMBER
 	IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2)
-- 
2.43.0


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

* Re: [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl
  2025-04-09  5:58 ` [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl Michael Rubin
@ 2025-04-09  8:10   ` Dan Carpenter
  2025-04-09  8:56     ` Dave Penkler
  0 siblings, 1 reply; 25+ messages in thread
From: Dan Carpenter @ 2025-04-09  8:10 UTC (permalink / raw)
  To: Michael Rubin; +Cc: gregkh, dpenkler, linux-staging, linux-kernel

On Wed, Apr 09, 2025 at 05:58:43AM +0000, Michael Rubin wrote:
> diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
> index 6202865278ea..4ddcbc2a81b0 100644
> --- a/drivers/staging/gpib/uapi/gpib_ioctl.h
> +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
> @@ -12,9 +12,9 @@
>  
>  #define GPIB_CODE 160
>  
> -typedef struct {
> +struct gpib_board_type_ioctl {
>  	char name[100];
> -} board_type_ioctl_t;
> +};

This breaks user API so now user space can't compile.  I don't think
any of these 21 patches can be applied.

regards,
dan carpenter


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

* Re: [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl
  2025-04-09  8:10   ` Dan Carpenter
@ 2025-04-09  8:56     ` Dave Penkler
  2025-04-09  9:42       ` Dan Carpenter
  0 siblings, 1 reply; 25+ messages in thread
From: Dave Penkler @ 2025-04-09  8:56 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Michael Rubin, gregkh, linux-staging, linux-kernel

On Wed, Apr 09, 2025 at 11:10:41AM +0300, Dan Carpenter wrote:
> On Wed, Apr 09, 2025 at 05:58:43AM +0000, Michael Rubin wrote:
> > diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
> > index 6202865278ea..4ddcbc2a81b0 100644
> > --- a/drivers/staging/gpib/uapi/gpib_ioctl.h
> > +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
> > @@ -12,9 +12,9 @@
> >  
> >  #define GPIB_CODE 160
> >  
> > -typedef struct {
> > +struct gpib_board_type_ioctl {
> >  	char name[100];
> > -} board_type_ioctl_t;
> > +};
> 
> This breaks user API so now user space can't compile.  I don't think
> any of these 21 patches can be applied.
>
> regards,
> dan carpenter
> 
 
These patches are OK. I will make a new release of the userspace libraries
with a compat include that defines the typedefs.
cheers,
-Dave


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

* Re: [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl
  2025-04-09  8:56     ` Dave Penkler
@ 2025-04-09  9:42       ` Dan Carpenter
  0 siblings, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2025-04-09  9:42 UTC (permalink / raw)
  To: Dave Penkler; +Cc: Michael Rubin, gregkh, linux-staging, linux-kernel

On Wed, Apr 09, 2025 at 10:56:42AM +0200, Dave Penkler wrote:
> On Wed, Apr 09, 2025 at 11:10:41AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 09, 2025 at 05:58:43AM +0000, Michael Rubin wrote:
> > > diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
> > > index 6202865278ea..4ddcbc2a81b0 100644
> > > --- a/drivers/staging/gpib/uapi/gpib_ioctl.h
> > > +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
> > > @@ -12,9 +12,9 @@
> > >  
> > >  #define GPIB_CODE 160
> > >  
> > > -typedef struct {
> > > +struct gpib_board_type_ioctl {
> > >  	char name[100];
> > > -} board_type_ioctl_t;
> > > +};
> > 
> > This breaks user API so now user space can't compile.  I don't think
> > any of these 21 patches can be applied.
> >
> > regards,
> > dan carpenter
> > 
>  
> These patches are OK. I will make a new release of the userspace libraries
> with a compat include that defines the typedefs.

Ah that's fine then.  Thanks.

regards,
dan carpenter

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

end of thread, other threads:[~2025-04-09  9:42 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  5:58 [Patch v1 00/21] staging: gpib: Removing typedefs for ioctl API Michael Rubin
2025-04-09  5:58 ` [Patch v1 01/21] staging: gpib: Using struct gpib_board_type_ioctl Michael Rubin
2025-04-09  8:10   ` Dan Carpenter
2025-04-09  8:56     ` Dave Penkler
2025-04-09  9:42       ` Dan Carpenter
2025-04-09  5:58 ` [Patch v1 02/21] staging: gpib: Using struct gpib_read_write_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 03/21] staging: gpib: Using struct gpib_open_dev_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 04/21] staging: gpib: Using struct gpib_close_dev_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 05/21] staging: gpib: Using struct gpib_serial_poll_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 06/21] staging: gpib: Using struct gpib_eos_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 07/21] staging: gpib: Using struct gpib_wait_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 08/21] staging: gpib: Using struct gpib_online_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 09/21] staging: gpib: Using struct gpib_spoll_bytes_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 10/21] staging: gpib: Using struct gpib_board_info_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 11/21] staging: gpib: Using struct gpib_select_pci_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 12/21] staging: gpib: Using struct gpib_ppoll_config_ioctl` Michael Rubin
2025-04-09  5:58 ` [Patch v1 13/21] staging: gpib: Using struct gpib_pad_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 14/21] staging: gpib: Using struct gpib_sad_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 15/21] staging: gpib: Using gpib_select_device_path_ioctl Michael Rubin
2025-04-09  5:58 ` [Patch v1 16/21] staging: gpib: Using struct gpib_request_service2 Michael Rubin
2025-04-09  5:58 ` [Patch v1 17/21] staging: gpib: event_ioctl_t now short Michael Rubin
2025-04-09  5:59 ` [Patch v1 18/21] staging: gpib: rsc_ioctl_t now int Michael Rubin
2025-04-09  5:59 ` [Patch v1 19/21] staging: gpib: t1_delay_ioctl_t now unsigned int Michael Rubin
2025-04-09  5:59 ` [Patch v1 20/21] staging: gpib: autospoll_ioctl_t now short Michael Rubin
2025-04-09  5:59 ` [Patch v1 21/21] staging: gpib: local_ppoll_mode_ioctl_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