From c39eabbffeca621f54bb5a4477a43fdf9e253e47 Mon Sep 17 00:00:00 2001 From: Michael Rubin Date: Wed, 9 Apr 2025 05:58:52 +0000 Subject: [PATCH] staging: gpib: Using struct gpib_board_info_ioctl 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 Link: https://lore.kernel.org/r/20250409055903.321438-11-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gpib/common/gpib_os.c | 2 +- drivers/staging/gpib/uapi/gpib_ioctl.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c index 25d9e885ec00..4b062fd70ec2 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -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; diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index e3d167edfd69..041b0a1593e9 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -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), -- 2.25.1