]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/mce: fix misleading indentation in init_nonfatal_mce_checker()
authorIan Campbell <ian.campbell@citrix.com>
Fri, 22 Jan 2016 15:19:51 +0000 (16:19 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 22 Jan 2016 15:19:51 +0000 (16:19 +0100)
Debian bug 812166[0] reported this build failure due to
Wmisleading-indentation with gcc-6:

non-fatal.c: In function 'init_nonfatal_mce_checker':
non-fatal.c:103:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
  switch (c->x86_vendor) {
  ^~~~~~

non-fatal.c:97:5: note: ...this 'if' clause, but it is not
     if ( __get_cpu_var(poll_bankmask) == NULL )
     ^~

I was unable to reproduce (xen builds cleanly for me with "6.0.0 20160117
(experimental) [trunk revision 232481]") but looking at the code the issue
above is clearly real.

Correctly reindent the if statement.

This file uses Linux coding style (infact the use of Xen style for
this line is the root cause of the wanring) so use tabs and while
there remove the whitespace inside the if as Linux does.

[0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812166

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/cpu/mcheck/non-fatal.c

index 526864ed339d1e2c8bd21d5a65218b64859dde7b..8cd6635060efb798fa2bb762c4fdadcbf6f06023 100644 (file)
@@ -94,8 +94,8 @@ static int __init init_nonfatal_mce_checker(void)
        if (mce_disabled || !mce_available(c))
                return -ENODEV;
 
-    if ( __get_cpu_var(poll_bankmask) == NULL )
-        return -EINVAL;
+       if (__get_cpu_var(poll_bankmask) == NULL)
+               return -EINVAL;
 
        /*
         * Check for non-fatal errors every MCE_RATE s