staging: gpib: local_ppoll_mode_ioctl_t now short
authorMichael Rubin <matchstick@neverthere.org>
Wed, 9 Apr 2025 05:59:03 +0000 (05:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:46:10 +0000 (16:46 +0200)
Using Linux code style to replace typedef local_ppoll_mode_ioctl_t with
type short.

Adhering to Linux code style.

Reported by checkpatch.pl

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
Link: https://lore.kernel.org/r/20250409055903.321438-22-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 f90cc818227857bc480ef63b950ed08c6fe6a585..4684527808f711e78933e7df03fb2f1929f3b344 100644 (file)
@@ -1718,7 +1718,7 @@ static int ppc_ioctl(struct gpib_board *board, unsigned long arg)
 
 static int set_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long arg)
 {
-       local_ppoll_mode_ioctl_t cmd;
+       short cmd;
        int retval;
 
        retval = copy_from_user(&cmd, (void __user *)arg, sizeof(cmd));
@@ -1735,7 +1735,7 @@ static int set_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long ar
 
 static int get_local_ppoll_mode_ioctl(struct gpib_board *board, unsigned long arg)
 {
-       local_ppoll_mode_ioctl_t cmd;
+       short cmd;
        int retval;
 
        cmd = board->local_ppoll_mode;
index c66b8d59a46b8469bd323f5f853ed2391afe5bb8..e903ec1fe27427536ce1cc5fbf6a3168e8f388ec 100644 (file)
@@ -107,8 +107,6 @@ struct gpib_select_device_path_ioctl {
        char device_path[0x1000];
 };
 
-typedef short local_ppoll_mode_ioctl_t;
-
 // update status byte and request service
 struct gpib_request_service2 {
        uint8_t status_byte;
@@ -155,8 +153,8 @@ enum gpib_ioctl {
 
        IBAUTOSPOLL = _IOW(GPIB_CODE, 38, short),
        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),
+       IBPP2_SET = _IOW(GPIB_CODE, 40, short),
+       IBPP2_GET = _IOR(GPIB_CODE, 41, short),
        IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, struct gpib_select_device_path_ioctl),
        // 44 was IBSELECT_SERIAL_NUMBER
        IBRSV2 = _IOW(GPIB_CODE, 45, struct gpib_request_service2)