Re: [PATCH 03/12] usb: usbtmc: Add ioctls to set/get usb timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17, 2018 at 8:03 PM, Guido Kiener <guido@xxxxxxxxxxxxxxxxxx> wrote:
> Add ioctls USBTMC_IOCTL_GET_TIMEOUT / USBTMC_IOCTL_SET_TIMEOUT to
> get/set I/O timeout for specific file handle.




> +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?

> +
> +       return put_user(timeout, (__u32 __user *)arg);
> +}

> +static int usbtmc_ioctl_set_timeout(struct usbtmc_file_data *file_data,
> +                               void __user *arg)
> +{
> +       __u32 timeout;

Ditto.

> +       return 0;
> +}


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux