All of lore.kernel.org
 help / color / mirror / Atom feed
* checkpatch err - questioning adding parens
@ 2015-10-08 17:00 Alison Schofield
  2015-10-08 17:22 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Alison Schofield @ 2015-10-08 17:00 UTC (permalink / raw)
  To: outreachy-kernel

Looking at this checkpatch ERROR and hesitating to change because it
looks worse to my eyes.

ERROR: Macros with complex values should be enclosed in parentheses
FILE: sm750_cursor.c:40:

Here's a short snippet (defines actually go on ~25 lines)

This...
	#define HWC_ADDRESS                         0x0
	#define HWC_ADDRESS_ENABLE                  31:31
	#define HWC_ADDRESS_ENABLE_DISABLE          0
	#define HWC_ADDRESS_ENABLE_ENABLE           1

would become this..
	#define HWC_ADDRESS                         (0x0)
	#define HWC_ADDRESS_ENABLE                  (31:31)
	#define HWC_ADDRESS_ENABLE_DISABLE          (0)
	#define HWC_ADDRESS_ENABLE_ENABLE           (1)

It is an ERROR... so what's my direction?

Thanks,
alisons




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

* Re: [Outreachy kernel] checkpatch err - questioning adding parens
  2015-10-08 17:00 checkpatch err - questioning adding parens Alison Schofield
@ 2015-10-08 17:22 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-10-08 17:22 UTC (permalink / raw)
  To: Alison Schofield; +Cc: outreachy-kernel

On Thu, Oct 08, 2015 at 10:00:13AM -0700, Alison Schofield wrote:
> Looking at this checkpatch ERROR and hesitating to change because it
> looks worse to my eyes.
> 
> ERROR: Macros with complex values should be enclosed in parentheses
> FILE: sm750_cursor.c:40:
> 
> Here's a short snippet (defines actually go on ~25 lines)
> 
> This...
> 	#define HWC_ADDRESS                         0x0
> 	#define HWC_ADDRESS_ENABLE                  31:31
> 	#define HWC_ADDRESS_ENABLE_DISABLE          0
> 	#define HWC_ADDRESS_ENABLE_ENABLE           1
> 
> would become this..
> 	#define HWC_ADDRESS                         (0x0)
> 	#define HWC_ADDRESS_ENABLE                  (31:31)
> 	#define HWC_ADDRESS_ENABLE_DISABLE          (0)
> 	#define HWC_ADDRESS_ENABLE_ENABLE           (1)
> 
> It is an ERROR... so what's my direction?

Just ignore it, it's a "false positive" in checkpatch, sorry about that.

thanks,

greg k-h


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

end of thread, other threads:[~2015-10-08 17:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-08 17:00 checkpatch err - questioning adding parens Alison Schofield
2015-10-08 17:22 ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.