diff options
| author | Michael Rubin <matchstick@neverthere.org> | 2025-04-09 08:58:51 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-15 17:46:08 +0300 |
| commit | 770b63fd93739d5ba48241faa8ecb8cf716ad95e (patch) | |
| tree | 3e4318617a800a71feaee2a409ad3a9664fbdae1 | |
| parent | 7e17963fa99086e809d70191417aa9ef77f1db58 (diff) | |
| download | linux-770b63fd93739d5ba48241faa8ecb8cf716ad95e.tar.xz | |
staging: gpib: Using struct gpib_spoll_bytes_ioctl
Using Linux code style for 'struct gpib_spoll_bytes_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-10-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 a8189f296cf9..25d9e885ec00 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1095,7 +1095,7 @@ static int write_ioctl(struct gpib_file_private *file_priv, struct gpib_board *b static int status_bytes_ioctl(struct gpib_board *board, unsigned long arg) { struct gpib_status_queue *device; - spoll_bytes_ioctl_t cmd; + struct gpib_spoll_bytes_ioctl cmd; int retval; retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd)); diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index dab170b09764..e3d167edfd69 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -64,11 +64,11 @@ struct gpib_online_ioctl { int online; }; -typedef struct { +struct gpib_spoll_bytes_ioctl { unsigned int num_bytes; unsigned int pad; int sad; -} spoll_bytes_ioctl_t; +}; typedef struct { unsigned int pad; @@ -146,7 +146,7 @@ enum gpib_ioctl { CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl), IBMUTEX = _IOW(GPIB_CODE, 26, int), - IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, spoll_bytes_ioctl_t), + 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), |
