Re: [PATCH] drivers: hid: hid-wiimote-modules: fixed code style errors

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

 



Hi

On Wed, Feb 5, 2014 at 12:54 AM, Sebastian Keller
<sebastiankeller@xxxxxxxxxxxx> wrote:
> Realigned the switch case blocks
> Added a space to an (void *) cast
>
> Signed-off-by: Sebastian Keller <sebastiankeller@xxxxxxxxxxxx>
> ---
>  drivers/hid/hid-wiimote-modules.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c
> index 6b61f01..1882bce 100644
> --- a/drivers/hid/hid-wiimote-modules.c
> +++ b/drivers/hid/hid-wiimote-modules.c
> @@ -353,7 +353,7 @@ static int wiimod_led_probe(const struct wiimod_ops *ops,
>         if (!led)
>                 return -ENOMEM;
>
> -       name = (void*)&led[1];
> +       name = (void *)&led[1];

We don't put spaces there if it's a cast. We only do that for type/var
definitions.

>         snprintf(name, namesz, "%s:blue:p%lu", dev_name(dev), ops->arg);
>         led->name = name;
>         led->brightness = 0;
> @@ -689,15 +689,15 @@ static int wiimod_ir_change(struct wiimote_data *wdata, __u16 mode)
>
>         /* put IR cam into desired state */
>         switch (mode) {
> -               case WIIPROTO_FLAG_IR_FULL:
> -                       format = 5;
> -                       break;
> -               case WIIPROTO_FLAG_IR_EXT:
> -                       format = 3;
> -                       break;
> -               case WIIPROTO_FLAG_IR_BASIC:
> -                       format = 1;
> -                       break;
> +       case WIIPROTO_FLAG_IR_FULL:
> +               format = 5;
> +               break;
> +       case WIIPROTO_FLAG_IR_EXT:
> +               format = 3;
> +               break;
> +       case WIIPROTO_FLAG_IR_BASIC:
> +               format = 1;
> +               break;

That one looks good. Can you resend without the cast-change? Feel free
to add my "Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx>".

Thanks
David

>         }
>         ret = wiimote_cmd_write(wdata, 0xb00033, &format, sizeof(format));
>         if (ret)
> --
> 1.8.5.3
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" 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 Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux