From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:53 +0000 (+0000) Subject: staging: gpib: Using struct gpib_select_pci_ioctl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4c2170378cb426e02d398e1beabeb18b806df6a9;p=users%2Fdwmw2%2Flinux.git staging: gpib: Using struct gpib_select_pci_ioctl Using Linux code style for 'struct gpib_select_pci_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-12-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 4b062fd70ec2c..aa6e07b1f73d6 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1797,7 +1797,7 @@ static int interface_clear_ioctl(struct gpib_board *board, unsigned long arg) static int select_pci_ioctl(struct gpib_board_config *config, unsigned long arg) { - select_pci_ioctl_t selection; + struct gpib_select_pci_ioctl selection; int retval; if (!capable(CAP_SYS_ADMIN)) diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index 041b0a1593e96..5681a66483a8d 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -81,10 +81,10 @@ struct gpib_board_info_ioctl { unsigned no_7_bit_eos : 1; }; -typedef struct { +struct gpib_select_pci_ioctl { int pci_bus; int pci_slot; -} select_pci_ioctl_t; +}; typedef struct { uint8_t config; @@ -151,7 +151,7 @@ enum gpib_ioctl { IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl), IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int), - IBSELECT_PCI = _IOWR(GPIB_CODE, 32, select_pci_ioctl_t), + IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl), IBEVENT = _IOR(GPIB_CODE, 33, event_ioctl_t), IBRSC = _IOW(GPIB_CODE, 34, rsc_ioctl_t), IB_T1_DELAY = _IOW(GPIB_CODE, 35, t1_delay_ioctl_t),