All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Guido Kiener <guido@kiener-muenchen.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	USB <linux-usb@vger.kernel.org>,
	guido.kiener@rohde-schwarz.com, pankaj.adhikari@ni.com,
	steve_bayless@keysight.com, Dave Penkler <dpenkler@gmail.com>
Subject: [03/12] usb: usbtmc: Add ioctls to set/get usb timeout
Date: Fri, 18 May 2018 22:48:30 +0300	[thread overview]
Message-ID: <CAHp75VdFx--P98F45y0S9mCUkFe9bg0H_bJ_=m15x5VDO5RSLQ@mail.gmail.com> (raw)

On Thu, May 17, 2018 at 8:03 PM, Guido Kiener <guido@kiener-muenchen.de> 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;
> +}

             reply	other threads:[~2018-05-18 19:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 19:48 Andy Shevchenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-19  7:05 [03/12] usb: usbtmc: Add ioctls to set/get usb timeout Greg Kroah-Hartman
2018-05-18 22:19 Guido Kiener
2018-05-18 14:56 Guido Kiener
2018-05-18 13:20 Greg Kroah-Hartman
2018-05-17 17:03 Guido Kiener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHp75VdFx--P98F45y0S9mCUkFe9bg0H_bJ_=m15x5VDO5RSLQ@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=dpenkler@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guido.kiener@rohde-schwarz.com \
    --cc=guido@kiener-muenchen.de \
    --cc=linux-usb@vger.kernel.org \
    --cc=pankaj.adhikari@ni.com \
    --cc=steve_bayless@keysight.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.