From: David Herrmann <dh.herrmann@gmail.com>
To: Sebastian Keller <sebastiankeller@fastmail.net>
Cc: David Herrmann <dh.herrmann@googlemail.com>,
"open list:HID CORE LAYER" <linux-input@vger.kernel.org>
Subject: Re: [PATCH] drivers: hid: hid-wiimote-modules: fixed code style errors
Date: Wed, 5 Feb 2014 01:18:58 +0100 [thread overview]
Message-ID: <CANq1E4SZz3oUmOqoN7iqF4+gdMDCAf_jwOK8smbS2+vUh51Brg@mail.gmail.com> (raw)
In-Reply-To: <1391558068-10715-1-git-send-email-sebastiankeller@fastmail.net>
Hi
On Wed, Feb 5, 2014 at 12:54 AM, Sebastian Keller
<sebastiankeller@fastmail.net> wrote:
> Realigned the switch case blocks
> Added a space to an (void *) cast
>
> Signed-off-by: Sebastian Keller <sebastiankeller@fastmail.net>
> ---
> 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@gmail.com>".
Thanks
David
> }
> ret = wiimote_cmd_write(wdata, 0xb00033, &format, sizeof(format));
> if (ret)
> --
> 1.8.5.3
>
next prev parent reply other threads:[~2014-02-05 0:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 23:54 [PATCH] drivers: hid: hid-wiimote-modules: fixed code style errors Sebastian Keller
2014-02-05 0:18 ` David Herrmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-02-05 0:45 Sebastian Keller
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=CANq1E4SZz3oUmOqoN7iqF4+gdMDCAf_jwOK8smbS2+vUh51Brg@mail.gmail.com \
--to=dh.herrmann@gmail.com \
--cc=dh.herrmann@googlemail.com \
--cc=linux-input@vger.kernel.org \
--cc=sebastiankeller@fastmail.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).