On Fri, 2014-05-09 at 12:33 +0200, Borislav Petkov wrote: > On Fri, May 09, 2014 at 09:57:30AM +0200, Borislav Petkov wrote: > > > diff --git a/arch/x86/include/uapi/asm/msr-index.h > > > b/arch/x86/include/uapi/asm/msr-index.h [] > > > -#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1ULL << > > > MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT); > > > +#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1ULL << > > > MSR_IA32_MISC_ENABLE_LIMIT_CPUID_BIT) > > Btw, we should probably be catching typos like that with checkpatch. > Here's an initial version for single-line macros: [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3313,6 +3313,11 @@ sub process { > } > } > > + if ($line =~ /^\+\s*#\s*define\s.*;\s*$/) { > + WARN("TRAILING_SEMICOLON", > + "Trailing semicolon at macro definition\n" . > $herecurr); > + } > +
Seems sensible. I suggest moving the test next to the other macro definition tests for things like unnecessary semicolon around "do {... while (0)" around line 3800. Extending the test to find multiline forms like #define foo \ bar; would also be trivially done there. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/