lkml.org 
[lkml]   [2012]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fixed a macro coding style issue
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


\
 
 \ /
  Last update: 2012-07-25 08:01    [W:0.053 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site