From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:45 +0000 (+0000) Subject: staging: gpib: Using struct gpib_open_dev_ioctl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6e5f0402c87e7033120868c44b31925a89945e79;p=users%2Fdwmw2%2Flinux.git staging: gpib: Using struct gpib_open_dev_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-4-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c index dff0674cf31c9..8a17e8bb3bd22 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 15c924efe5bc6..cfd1afb36e4fe 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),