Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755079AbdFWUYD (ORCPT ); Fri, 23 Jun 2017 16:24:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45938 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755050AbdFWUX7 (ORCPT ); Fri, 23 Jun 2017 16:23:59 -0400 Date: Fri, 23 Jun 2017 19:24:22 +0200 From: Greg KH To: Jaya Durga Cc: Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com, binoy.jayan@linaro.org, arnd@arndb.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jaya Durga Subject: Re: [PATCH] Staging: rtl8712 : osdep_intf.h: fix macro coding style issue Message-ID: <20170623172422.GB19626@kroah.com> References: <1498113604-19754-1-git-send-email-rjdurga@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498113604-19754-1-git-send-email-rjdurga@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 871 Lines: 27 On Thu, Jun 22, 2017 at 12:10:04PM +0530, Jaya Durga wrote: > From: Jaya Durga > > Fix checkpatch.pl warning of the form "CHECK" Macro argument 'x' > may be better as '(x)' to avoid precedence issues. > > Signed-off-by: Jaya Durga > --- > drivers/staging/rtl8712/osdep_intf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8712/osdep_intf.h b/drivers/staging/rtl8712/osdep_intf.h > index 5d37e1f..1985423 100644 > --- a/drivers/staging/rtl8712/osdep_intf.h > +++ b/drivers/staging/rtl8712/osdep_intf.h > @@ -29,7 +29,7 @@ > #include "osdep_service.h" > #include "drv_types.h" > > -#define RND4(x) (((x >> 2) + (((x & 3) == 0) ? 0 : 1)) << 2) > +#define RND4(x) ((((x) >> 2) + ((((x) & 3) == 0) ? 0 : 1)) << 2) Why not move this to use the in-kernel macros instead? thanks, greg k-h