From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH] fixed a macro coding style issue Date: Tue, 24 Jul 2012 22:37:55 -0700 Message-ID: <20120725053755.GA2100@core.coreip.homeip.net> References: <1343193656-2643-1-git-send-email-chenbdchenbd@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:52900 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133Ab2GYFiB (ORCPT ); Wed, 25 Jul 2012 01:38:01 -0400 Content-Disposition: inline In-Reply-To: <1343193656-2643-1-git-send-email-chenbdchenbd@gmail.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Baodong Chen Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org 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 > --- > 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