[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4C3B5660.8020405@lwfinger.net>
Date: Mon, 12 Jul 2010 12:52:32 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: Andy Whitcroft <apw@...onical.com>
CC: LKML <linux-kernel@...r.kernel.org>
Subject: Possible false positive from checkpatch.pl
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,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists