Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1265075 > unrolled thread

Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

Started byElias Vanderstuyft <elias.vds@gmail.com>
First post2015-11-08 12:00 +0100
Last post2015-11-10 22:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and  UI_ABS_SETUP ioctl Elias Vanderstuyft <elias.vds@gmail.com> - 2015-11-08 12:00 +0100
    Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and  UI_ABS_SETUP ioctl Benjamin Tissoires <btissoir@redhat.com> - 2015-11-09 09:00 +0100
      Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and  UI_ABS_SETUP ioctl Elias Vanderstuyft <elias.vds@gmail.com> - 2015-11-10 22:50 +0100

#1265075 — Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

FromElias Vanderstuyft <elias.vds@gmail.com>
Date2015-11-08 12:00 +0100
SubjectRe: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
Message-ID<qsvRw-7vV-15@gated-at.bofh.it>
Hi,

On Tue, Aug 25, 2015 at 5:12 PM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h
> index 013c9d8..ef6c9f5 100644
> --- a/include/uapi/linux/uinput.h
> +++ b/include/uapi/linux/uinput.h
> @@ -20,6 +20,11 @@
>   * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
>   *
>   * Changes/Revisions:
> + *     0.5     08/13/2015 (David Herrmann <dh.herrmann@gmail.com> &
> + *                         Benjamin Tissoires <benjamin.tissoires@redhat.com>)
> + *             - add UI_DEV_SETUP ioctl
> + *             - add UI_ABS_SETUP ioctl
> + *             - add UI_GET_VERSION ioctl
>   *     0.4     01/09/2014 (Benjamin Tissoires <benjamin.tissoires@redhat.com>)
>   *             - add UI_GET_SYSNAME ioctl
>   *     0.3     24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
> @@ -37,8 +42,8 @@
>  #include <linux/types.h>
>  #include <linux/input.h>
>
> -#define UINPUT_VERSION         4
> -
> +#define UINPUT_VERSION         5
> +#define UINPUT_MAX_NAME_SIZE   80
>
>  struct uinput_ff_upload {
>         __u32                   request_id;
> @@ -58,6 +63,79 @@ struct uinput_ff_erase {
>  #define UI_DEV_CREATE          _IO(UINPUT_IOCTL_BASE, 1)
>  #define UI_DEV_DESTROY         _IO(UINPUT_IOCTL_BASE, 2)
>
> +struct uinput_setup {
> +       struct input_id id;
> +       char name[UINPUT_MAX_NAME_SIZE];
> +       __u32 ff_effects_max;
> +};

Is there a reason to not follow the same field order as in struct
uinput_user_dev?
I.e., why not:

struct uinput_setup {
        char name[UINPUT_MAX_NAME_SIZE];
        struct input_id id;
        __u32 ff_effects_max;
};

In case you would change this, also make sure to change the order in
the documentation of UI_DEV_SETUP.

Cheers,
Elias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1265436

FromBenjamin Tissoires <btissoir@redhat.com>
Date2015-11-09 09:00 +0100
Message-ID<qsPwS-3v4-13@gated-at.bofh.it>
In reply to#1265075



----- Original Message -----
> From: "Elias Vanderstuyft" <elias.vds@gmail.com>
> To: "Benjamin Tissoires" <benjamin.tissoires@redhat.com>
> Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>, "David Herrmann" <dh.herrmann@gmail.com>, "Peter Hutterer"
> <peter.hutterer@who-t.net>, "open list:HID CORE LAYER" <linux-input@vger.kernel.org>, linux-kernel@vger.kernel.org
> Sent: Sunday, November 8, 2015 11:55:04 AM
> Subject: Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
> 
> Hi,
> 
> On Tue, Aug 25, 2015 at 5:12 PM, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
> > diff --git a/include/uapi/linux/uinput.h b/include/uapi/linux/uinput.h
> > index 013c9d8..ef6c9f5 100644
> > --- a/include/uapi/linux/uinput.h
> > +++ b/include/uapi/linux/uinput.h
> > @@ -20,6 +20,11 @@
> >   * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
> >   *
> >   * Changes/Revisions:
> > + *     0.5     08/13/2015 (David Herrmann <dh.herrmann@gmail.com> &
> > + *                         Benjamin Tissoires
> > <benjamin.tissoires@redhat.com>)
> > + *             - add UI_DEV_SETUP ioctl
> > + *             - add UI_ABS_SETUP ioctl
> > + *             - add UI_GET_VERSION ioctl
> >   *     0.4     01/09/2014 (Benjamin Tissoires
> >   <benjamin.tissoires@redhat.com>)
> >   *             - add UI_GET_SYSNAME ioctl
> >   *     0.3     24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
> > @@ -37,8 +42,8 @@
> >  #include <linux/types.h>
> >  #include <linux/input.h>
> >
> > -#define UINPUT_VERSION         4
> > -
> > +#define UINPUT_VERSION         5
> > +#define UINPUT_MAX_NAME_SIZE   80
> >
> >  struct uinput_ff_upload {
> >         __u32                   request_id;
> > @@ -58,6 +63,79 @@ struct uinput_ff_erase {
> >  #define UI_DEV_CREATE          _IO(UINPUT_IOCTL_BASE, 1)
> >  #define UI_DEV_DESTROY         _IO(UINPUT_IOCTL_BASE, 2)
> >
> > +struct uinput_setup {
> > +       struct input_id id;
> > +       char name[UINPUT_MAX_NAME_SIZE];
> > +       __u32 ff_effects_max;
> > +};
> 
> Is there a reason to not follow the same field order as in struct
> uinput_user_dev?

Not really, no.

> I.e., why not:
> 
> struct uinput_setup {
>         char name[UINPUT_MAX_NAME_SIZE];
>         struct input_id id;
>         __u32 ff_effects_max;
> };
> 
> In case you would change this, also make sure to change the order in
> the documentation of UI_DEV_SETUP.
> 

Works for me.
Dmitry, how do you want to handle this change? Me re-sending the whole series or you applying the change directly on your tree?

Cheers,
Benjamin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1266800

FromElias Vanderstuyft <elias.vds@gmail.com>
Date2015-11-10 22:50 +0100
Message-ID<qtoXE-27r-1@gated-at.bofh.it>
In reply to#1265436
On Mon, Nov 9, 2015 at 8:50 AM, Benjamin Tissoires <btissoir@redhat.com> wrote:
>
> ----- Original Message -----
>> From: "Elias Vanderstuyft" <elias.vds@gmail.com>
>> To: "Benjamin Tissoires" <benjamin.tissoires@redhat.com>
>> Cc: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>, "David Herrmann" <dh.herrmann@gmail.com>, "Peter Hutterer"
>> <peter.hutterer@who-t.net>, "open list:HID CORE LAYER" <linux-input@vger.kernel.org>, linux-kernel@vger.kernel.org
>> Sent: Sunday, November 8, 2015 11:55:04 AM
>> Subject: Re: [PATCH v3] Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl
>>
>> I.e., why not:
>>
>> struct uinput_setup {
>>         char name[UINPUT_MAX_NAME_SIZE];
>>         struct input_id id;
>>         __u32 ff_effects_max;
>> };
>>
>> In case you would change this, also make sure to change the order in
>> the documentation of UI_DEV_SETUP.
>>
>
> Works for me.
> Dmitry, how do you want to handle this change? Me re-sending the whole series or you applying the change directly on your tree?

If this is too much of a hassle, please leave it as it was, I was just
being pedantic ;-)

Cheers,
Elias
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web