lkml.org 
[lkml]   [2014]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] x86: Fix typo in MSR_IA32_MISC_ENABLE_LIMIT_CPUID macro
From
Date
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.



\
 
 \ /
  Last update: 2014-05-09 19:41    [W:0.055 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site