[Patch v1 21/21] staging: gpib: local_ppoll_mode_ioctl_t now short

Michael Rubin
2025-04-09T05:59:32Z

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>
---
drivers/staging/gpib/common/gpib_os.c | 4 ++--
drivers/staging/gpib/uapi/gpib_ioctl.h | 6 ++----
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 6a92562ae39c..7d0c03ebe624 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -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;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index c66b8d59a46b..e903ec1fe274 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -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)
--
2.43.0