[PATCH 3/4] staging: gpib: Use standard size basic uapi types

Dave Penkler
2025-06-03T18:44:06Z

Change unsigned int to __u32,
int to __s32
and short to __s16

Signed-off-by: Dave Penkler <dpenkler@gmail.com>
---
drivers/staging/gpib/uapi/gpib_ioctl.h | 106 ++++++++++++-------------
1 file changed, 53 insertions(+), 53 deletions(-)

diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 0fed5c0fa7f2..0da47e28caaa 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -19,71 +19,71 @@ struct gpib_board_type_ioctl {
/* argument for read/write/command ioctls */
struct gpib_read_write_ioctl {
__u64 buffer_ptr;
- unsigned int requested_transfer_count;
- unsigned int completed_transfer_count;
- int end; /* end flag return for reads, end io suppression request for cmd*/
- int handle;
+ __u32 requested_transfer_count;
+ __u32 completed_transfer_count;
+ __s32 end; /* end flag return for reads, end io suppression request for cmd*/
+ __s32 handle;
};

struct gpib_open_dev_ioctl {
- unsigned int handle;
- unsigned int pad;
- int sad;
+ __u32 handle;
+ __u32 pad;
+ __s32 sad;
unsigned is_board : 1;
};

struct gpib_close_dev_ioctl {
- unsigned int handle;
+ __u32 handle;
};

struct gpib_serial_poll_ioctl {
- unsigned int pad;
- int sad;
+ __u32 pad;
+ __s32 sad;
__u8 status_byte;
};

struct gpib_eos_ioctl {
- int eos;
- int eos_flags;
+ __s32 eos;
+ __s32 eos_flags;
};

struct gpib_wait_ioctl {
- int handle;
- int wait_mask;
- int clear_mask;
- int set_mask;
- int ibsta;
- int pad;
- int sad;
- unsigned int usec_timeout;
+ __s32 handle;
+ __s32 wait_mask;
+ __s32 clear_mask;
+ __s32 set_mask;
+ __s32 ibsta;
+ __s32 pad;
+ __s32 sad;
+ __u32 usec_timeout;
};

struct gpib_online_ioctl {
__u64 init_data_ptr;
- int init_data_length;
- int online;
+ __s32 init_data_length;
+ __s32 online;
};

struct gpib_spoll_bytes_ioctl {
- unsigned int num_bytes;
- unsigned int pad;
- int sad;
+ __u32 num_bytes;
+ __u32 pad;
+ __s32 sad;
};

struct gpib_board_info_ioctl {
- unsigned int pad;
- int sad;
- int parallel_poll_configuration;
- int autopolling;
- int is_system_controller;
- unsigned int t1_delay;
+ __u32 pad;
+ __s32 sad;
+ __s32 parallel_poll_configuration;
+ __s32 autopolling;
+ __s32 is_system_controller;
+ __u32 t1_delay;
unsigned ist : 1;
unsigned no_7_bit_eos : 1;
};

struct gpib_select_pci_ioctl {
- int pci_bus;
- int pci_slot;
+ __s32 pci_bus;
+ __s32 pci_slot;
};

struct gpib_ppoll_config_ioctl {
@@ -93,13 +93,13 @@ struct gpib_ppoll_config_ioctl {
};

struct gpib_pad_ioctl {
- unsigned int handle;
- unsigned int pad;
+ __u32 handle;
+ __u32 pad;
};

struct gpib_sad_ioctl {
- unsigned int handle;
- int sad;
+ __u32 handle;
+ __s32 sad;
};

// select a piece of hardware to attach by its sysfs device path
@@ -110,7 +110,7 @@ struct gpib_select_device_path_ioctl {
// update status byte and request service
struct gpib_request_service2 {
__u8 status_byte;
- int new_reason_for_service;
+ __s32 new_reason_for_service;
};

/* Standard functions. */
@@ -123,38 +123,38 @@ enum gpib_ioctl {
IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl),
IBRPP = _IOWR(GPIB_CODE, 6, __u8),

- IBSIC = _IOW(GPIB_CODE, 9, unsigned int),
- IBSRE = _IOW(GPIB_CODE, 10, int),
+ IBSIC = _IOW(GPIB_CODE, 9, __u32),
+ IBSRE = _IOW(GPIB_CODE, 10, __s32),
IBGTS = _IO(GPIB_CODE, 11),
- IBCAC = _IOW(GPIB_CODE, 12, int),
- IBLINES = _IOR(GPIB_CODE, 14, short),
+ IBCAC = _IOW(GPIB_CODE, 12, __s32),
+ IBLINES = _IOR(GPIB_CODE, 14, __s16),
IBPAD = _IOW(GPIB_CODE, 15, struct gpib_pad_ioctl),
IBSAD = _IOW(GPIB_CODE, 16, struct gpib_sad_ioctl),
- IBTMO = _IOW(GPIB_CODE, 17, unsigned int),
+ IBTMO = _IOW(GPIB_CODE, 17, __u32),
IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl),
IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl),
IBRSV = _IOW(GPIB_CODE, 20, __u8),
CFCBASE = _IOW(GPIB_CODE, 21, __u64),
- CFCIRQ = _IOW(GPIB_CODE, 22, unsigned int),
- CFCDMA = _IOW(GPIB_CODE, 23, unsigned int),
+ CFCIRQ = _IOW(GPIB_CODE, 22, __u32),
+ CFCDMA = _IOW(GPIB_CODE, 23, __u32),
CFCBOARDTYPE = _IOW(GPIB_CODE, 24, struct gpib_board_type_ioctl),

- IBMUTEX = _IOW(GPIB_CODE, 26, int),
+ IBMUTEX = _IOW(GPIB_CODE, 26, __s32),
IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl),
IBPPC = _IOW(GPIB_CODE, 28, struct gpib_ppoll_config_ioctl),
IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl),

- IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int),
+ IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, __s32),
IBSELECT_PCI = _IOWR(GPIB_CODE, 32, struct gpib_select_pci_ioctl),
- IBEVENT = _IOR(GPIB_CODE, 33, short),
- IBRSC = _IOW(GPIB_CODE, 34, int),
- IB_T1_DELAY = _IOW(GPIB_CODE, 35, unsigned int),
+ IBEVENT = _IOR(GPIB_CODE, 33, __s16),
+ IBRSC = _IOW(GPIB_CODE, 34, __s32),
+ IB_T1_DELAY = _IOW(GPIB_CODE, 35, __u32),
IBLOC = _IO(GPIB_CODE, 36),

- IBAUTOSPOLL = _IOW(GPIB_CODE, 38, short),
+ IBAUTOSPOLL = _IOW(GPIB_CODE, 38, __s16),
IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
- IBPP2_SET = _IOW(GPIB_CODE, 40, short),
- IBPP2_GET = _IOR(GPIB_CODE, 41, short),
+ IBPP2_SET = _IOW(GPIB_CODE, 40, __s16),
+ IBPP2_GET = _IOR(GPIB_CODE, 41, __s16),
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.49.0