[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409055903.321438-12-matchstick@neverthere.org>
Date: Wed, 9 Apr 2025 05:58:53 +0000
From: Michael Rubin <matchstick@...erthere.org>
To: gregkh@...uxfoundation.org,
dpenkler@...il.com
Cc: linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Michael Rubin <matchstick@...erthere.org>
Subject: [Patch v1 11/21] 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 <matchstick@...erthere.org>
---
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 ce2184c5de03..5cf425fdcd89 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 041b0a1593e9..5681a66483a8 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),
--
2.43.0
Powered by blists - more mailing lists