mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Possible false positive from checkpatch.pl
@ 2010-07-12 17:52 Larry Finger
  2010-07-12 18:28 ` Joe Perches
  2010-07-14 13:13 ` Andy Whitcroft
  0 siblings, 2 replies; 9+ messages in thread
From: Larry Finger @ 2010-07-12 17:52 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: LKML

Andy,

In preparing a vendor driver for submission to staging, I am getting the 
following from checkpatch.pl:

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#377: FILE: staging/rtl8712/rtl871x_mp_ioctl.h:377:
+#define GEN_MP_IOCTL_HANDLER(sz, hdl, oid) {sz, hdl, oid},

ERROR: Macros with multiple statements should be enclosed in a do - while loop
#378: FILE: staging/rtl8712/rtl871x_mp_ioctl.h:378:
+#define EXT_MP_IOCTL_HANDLER(sz, subcode, oid) {sz, &mp_ioctl_ \
+       ## subcode ## _hdl, oid},

total: 2 errors, 0 warnings, 466 lines checked

Enclosing these macros in a do {...} while (0) is definitely wrong and will not 
compile. Moving the comma from the end of the macro to the lines that invoke it 
fixes the problem, but should not be necessary.

Thanks,


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

end of thread, other threads:[~2010-07-14 16:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-12 17:52 Possible false positive from checkpatch.pl Larry Finger
2010-07-12 18:28 ` Joe Perches
2010-07-12 18:35   ` Larry Finger
2010-07-12 19:03     ` Joe Perches
2010-07-12 19:37       ` Larry Finger
2010-07-12 19:49         ` Joe Perches
2010-07-14 13:14           ` Andy Whitcroft
2010-07-14 16:16             ` Joe Perches
2010-07-14 13:13 ` Andy Whitcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®