From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:51 +0000 (+0000) Subject: staging: gpib: Using struct gpib_spoll_bytes_ioctl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=770b63fd93739d5ba48241faa8ecb8cf716ad95e;p=users%2Fdwmw2%2Flinux.git staging: gpib: Using struct gpib_spoll_bytes_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-10-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 a8189f296cf91..25d9e885ec003 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 dab170b09764b..e3d167edfd694 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),