[PATCH] checkpatch: skip macros when finding missing switch/case break

2020-07-29 Thread Cambda Zhu
: { \+ ... \+ break/return/...; \+ } \+#endif \+#if xxx \+ case xxx: \+ ... \+#endif This patch skips lines starting with whitespaces and #, so the counter of previous statements won't increase in these cases. Signed-off-by: Cambda Zhu --- scripts/checkpatch.pl | 1 + 1 file chang

Re: [PATCH] checkpatch: skip macros when finding missing switch/case break

2020-07-31 Thread Cambda Zhu
now, I think this test should be removed. Regards, Cambda > 在 2020年8月1日,02:05,Joe Perches 写道: > > On Wed, 2020-07-29 at 20:59 +0800, Cambda Zhu wrote: >> The checkpatch.pl only searches 3 previous lines when finding missing >> switch/case break, and macros are treated as norm