From 7e9f21bb1be8a96df31a61fc4fd1a438f0993483 Mon Sep 17 00:00:00 2001 From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:48 +0000 Subject: [PATCH] staging: gpib: Using struct gpib_eos_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-7-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman --- 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 4e93d1c7e3d6..7c6f764a6253 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.25.1