diff options
| author | Michael Rubin <matchstick@neverthere.org> | 2025-04-09 08:58:55 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-15 17:46:09 +0300 |
| commit | faebdfab317c73581fbd0853ccd6467e2385c311 (patch) | |
| tree | ba73c90a216ebcb1da1512980be1dcaa42500ffa | |
| parent | 419a3433f03cb1bedbdb2e14ad7a3eee4deed4bf (diff) | |
| download | linux-faebdfab317c73581fbd0853ccd6467e2385c311.tar.xz | |
staging: gpib: Using struct gpib_pad_ioctl
Using Linux code style for 'struct gpib_pad_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-14-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/gpib/common/gpib_os.c | 2 | ||||
| -rw-r--r-- | 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 9e4ed6262afe..19bda8ff095d 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1438,7 +1438,7 @@ static int line_status_ioctl(struct gpib_board *board, unsigned long arg) static int pad_ioctl(struct gpib_board *board, struct gpib_file_private *file_priv, unsigned long arg) { - pad_ioctl_t cmd; + struct gpib_pad_ioctl cmd; int retval; struct gpib_descriptor *desc; diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index df428899ba3f..7cb09cac6cd0 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -92,10 +92,10 @@ struct gpib_ppoll_config_ioctl { unsigned clear_ist : 1; }; -typedef struct { +struct gpib_pad_ioctl { unsigned int handle; unsigned int pad; -} pad_ioctl_t; +}; typedef struct { unsigned int handle; @@ -134,7 +134,7 @@ enum gpib_ioctl { IBGTS = _IO(GPIB_CODE, 11), IBCAC = _IOW(GPIB_CODE, 12, int), IBLINES = _IOR(GPIB_CODE, 14, short), - IBPAD = _IOW(GPIB_CODE, 15, pad_ioctl_t), + IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl), IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t), IBTMO = _IOW(GPIB_CODE, 17, unsigned int), IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl), |
