staging: gpib: Using struct gpib_board_info_ioctl
authorMichael Rubin <matchstick@neverthere.org>
Wed, 9 Apr 2025 05:58:52 +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_board_info_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-11-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 25d9e885ec00304461e14abb9aec96826e880f55..4b062fd70ec2c7258a80f9bb65b83896410392bd 100644 (file)
@@ -1762,7 +1762,7 @@ static int query_board_rsv_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int board_info_ioctl(const struct gpib_board *board, unsigned long arg)
 {
-       board_info_ioctl_t info;
+       struct gpib_board_info_ioctl info;
        int retval;
 
        info.pad = board->pad;
index e3d167edfd694dbd9110353c1cc47ef620eb490e..041b0a1593e96144d33ad9ae6470521d6cbb020d 100644 (file)
@@ -70,7 +70,7 @@ struct gpib_spoll_bytes_ioctl {
        int sad;
 };
 
-typedef struct {
+struct gpib_board_info_ioctl {
        unsigned int pad;
        int sad;
        int parallel_poll_configuration;
@@ -79,7 +79,7 @@ typedef struct {
        unsigned int t1_delay;
        unsigned ist : 1;
        unsigned no_7_bit_eos : 1;
-} board_info_ioctl_t;
+};
 
 typedef struct {
        int pci_bus;
@@ -148,7 +148,7 @@ enum gpib_ioctl {
        IBMUTEX = _IOW(GPIB_CODE, 26, int),
        IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
        IBPPC = _IOW(GPIB_CODE, 28, ppoll_config_ioctl_t),
-       IBBOARD_INFO = _IOR(GPIB_CODE, 29, board_info_ioctl_t),
+       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),