From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:47 +0000 (+0000) Subject: staging: gpib: Using struct gpib_serial_poll_ioctl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=262040faa5e9522848f6c7aa9d772a6f1995f85d;p=users%2Fdwmw2%2Flinux.git staging: gpib: Using struct gpib_serial_poll_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-6-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 1df833127846d..4e93d1c7e3d6d 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 6ea6114ae78aa..9be3262271c50 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),