linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8712 : osdep_intf.h: fix macro coding style issue
@ 2017-06-22  6:40 Jaya Durga
  2017-06-23 17:24 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jaya Durga @ 2017-06-22  6:40 UTC (permalink / raw)
  To: gregkh
  Cc: Larry.Finger, florian.c.schilhabel, binoy.jayan, arnd, devel,
	linux-kernel, Jaya Durga

From: Jaya Durga <jayad@cdac.in>

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 <jayad@cdac.in>
---
 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)

 struct intf_priv {
	u8 *intf_dev;
--
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: rtl8712 : osdep_intf.h: fix macro coding style issue
  2017-06-22  6:40 [PATCH] Staging: rtl8712 : osdep_intf.h: fix macro coding style issue Jaya Durga
@ 2017-06-23 17:24 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2017-06-23 17:24 UTC (permalink / raw)
  To: Jaya Durga
  Cc: Larry.Finger, florian.c.schilhabel, binoy.jayan, arnd, devel,
	linux-kernel, Jaya Durga

On Thu, Jun 22, 2017 at 12:10:04PM +0530, Jaya Durga wrote:
> From: Jaya Durga <jayad@cdac.in>
> 
> 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 <jayad@cdac.in>
> ---
>  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-23 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22  6:40 [PATCH] Staging: rtl8712 : osdep_intf.h: fix macro coding style issue Jaya Durga
2017-06-23 17:24 ` Greg KH

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).