From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:58 +0000 (+0000) Subject: staging: gpib: Using struct gpib_request_service2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ad368b53ac0999a4861899148a60606aad548d0d;p=users%2Fjedix%2Flinux-maple.git staging: gpib: Using struct gpib_request_service2 Using Linux code style for 'struct gpib_request_service2' 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-17-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 b47a5078c493..6cad9e1879fa 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1532,11 +1532,11 @@ static int request_service_ioctl(struct gpib_board *board, unsigned long arg) static int request_service2_ioctl(struct gpib_board *board, unsigned long arg) { - request_service2_t request_service2_cmd; + struct gpib_request_service2 request_service2_cmd; int retval; retval = copy_from_user(&request_service2_cmd, (void __user *)arg, - sizeof(request_service2_t)); + sizeof(struct gpib_request_service2)); if (retval) return -EFAULT; diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index 473b09d4efaa..eea169a0ba40 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -114,10 +114,10 @@ typedef short autospoll_ioctl_t; typedef short local_ppoll_mode_ioctl_t; // update status byte and request service -typedef struct { +struct gpib_request_service2 { uint8_t status_byte; int new_reason_for_service; -} request_service2_t; +}; /* Standard functions. */ enum gpib_ioctl { @@ -163,7 +163,7 @@ enum gpib_ioctl { IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t), IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl), // 44 was IBSELECT_SERIAL_NUMBER - IBRSV2 = _IOW(GPIB_CODE, 45, request_service2_t) + IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2) }; #endif /* _GPIB_IOCTL_H */