]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
staging: gpib: Using struct gpib_online_ioctl
authorMichael Rubin <matchstick@neverthere.org>
Wed, 9 Apr 2025 05:58:50 +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_online_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-9-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 70fa66f707807fd1b8e464bff8e823f2e1ad91aa..a8189f296cf9150cf56b2bd99e7a72a29d070cd3 100644 (file)
@@ -1353,7 +1353,7 @@ static int parallel_poll_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int online_ioctl(struct gpib_board *board, unsigned long arg)
 {
-       online_ioctl_t online_cmd;
+       struct gpib_online_ioctl online_cmd;
        int retval;
        void __user *init_data = NULL;
 
index 71c5e3d020bb5d8ae3671177f0a9a72c43244f2d..dab170b09764bf3661e34a53859a53e91a84654f 100644 (file)
@@ -58,11 +58,11 @@ struct gpib_wait_ioctl {
        unsigned int usec_timeout;
 };
 
-typedef struct {
+struct gpib_online_ioctl {
        uint64_t init_data_ptr;
        int init_data_length;
        int online;
-} online_ioctl_t;
+};
 
 typedef struct {
        unsigned int num_bytes;
@@ -158,7 +158,7 @@ enum gpib_ioctl {
        IBLOC = _IO(GPIB_CODE, 36),
 
        IBAUTOSPOLL = _IOW(GPIB_CODE, 38, autospoll_ioctl_t),
-       IBONL = _IOW(GPIB_CODE, 39, online_ioctl_t),
+       IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
        IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
        IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
        IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, select_device_path_ioctl_t),