From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Baodong Chen <chenbdchenbd@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fixed a macro coding style issue
Date: Tue, 24 Jul 2012 22:37:55 -0700 [thread overview]
Message-ID: <20120725053755.GA2100@core.coreip.homeip.net> (raw)
In-Reply-To: <1343193656-2643-1-git-send-email-chenbdchenbd@gmail.com>
On Wed, Jul 25, 2012 at 01:20:56PM +0800, Baodong Chen wrote:
> Fixed a coding style issue in driver/input/input.c
>
> Signed-off-by: Baodong Chen <chenbdchenbd@gmail.com>
> ---
> drivers/input/input.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index 8921c61..c96e983 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -845,11 +845,13 @@ int input_set_keycode(struct input_dev *dev,
> EXPORT_SYMBOL(input_set_keycode);
>
> #define MATCH_BIT(bit, max) \
> + do { \
> for (i = 0; i < BITS_TO_LONGS(max); i++) \
> if ((id->bit[i] & dev->bit[i]) != id->bit[i]) \
> break; \
> - if (i != BITS_TO_LONGS(max)) \
> - continue;
> + if (i != BITS_TO_LONGS(max)) \
> + continue; \
> + } while (0)
This changes semantics. While current implementation of MATCH_BIT might
not be great style, it is not supposed to be used outside of
input_match_device(), and the replacement is completely broken.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2012-07-25 5:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <no>
2012-07-25 5:20 ` [PATCH] fixed a macro coding style issue Baodong Chen
2012-07-25 5:27 ` Venu Byravarasu
2012-07-25 5:37 ` Dmitry Torokhov [this message]
2012-07-25 6:09 ` Baodong Chen
2012-07-25 6:15 ` Al Viro
2012-07-25 6:36 ` Dmitry Torokhov
2012-07-31 7:27 ` Dmitry Torokhov
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=20120725053755.GA2100@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=chenbdchenbd@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).