From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:50 +0000 (+0000) Subject: staging: gpib: Using struct gpib_online_ioctl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7e17963fa99086e809d70191417aa9ef77f1db58;p=users%2Fjedix%2Flinux-maple.git staging: gpib: Using struct gpib_online_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-9-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 70fa66f70780..a8189f296cf9 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),