Skip to contentSkip to conversation

usb: usbtmc: Add ioctls to set/get usb timeout

PATCH New Greg Kroah-Hartman 1 participant 1 message May 19, 2018 USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 3/12 usb: usbtmc: Add ioctls to set/get usb timeout

Quoted 7 lines · Andy Shevchenko
Quoted 2 lines · Guido Kiener

Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to get/set I/O timeout for specific file handle.

Quoted 9 lines

Review

Quoted 6 lines
(quoted diff) +6 -0
+static int usbtmc_ioctl_get_timeout(struct usbtmc_file_data *file_data,
+                               void __user *arg)
+{
+       __u32 timeout;
+
+       timeout = file_data->timeout;

Why do you need __u32 on kernel side?
Would plain u32 work?

Yes, on the kernel side that is the correct type to use after you copy it over from userspace.

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html