]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
staging: gpib: Using struct gpib_select_pci_ioctl
authorMichael Rubin <matchstick@neverthere.org>
Wed, 9 Apr 2025 05:58:53 +0000 (05:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:46:08 +0000 (16:46 +0200)
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 <matchstick@neverthere.org>
Link: https://lore.kernel.org/r/20250409055903.321438-12-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/common/gpib_os.c
drivers/staging/gpib/uapi/gpib_ioctl.h

index 4b062fd70ec2c7258a80f9bb65b83896410392bd..aa6e07b1f73d662b29595893765ff85ab2fe5845 100644 (file)
@@ -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))
index 041b0a1593e96144d33ad9ae6470521d6cbb020d..5681a66483a8d1c32c6bbe56bee4b1b761f482f8 100644 (file)
@@ -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),