xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: jbeulich@suse.com, andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>,
	812166@bugs.debian.org, Christoph Egger <chegger@amazon.de>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH] x86/mce: fix misleading indentation in init_nonfatal_mce_checker().
Date: Fri, 22 Jan 2016 14:38:36 +0000	[thread overview]
Message-ID: <1453473516-22866-1-git-send-email-ian.campbell@citrix.com> (raw)

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>
Cc: Christoph Egger <chegger@amazon.de>
Cc: Liu Jinsong <jinsong.liu@alibaba-inc.com>
---
 xen/arch/x86/cpu/mcheck/non-fatal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/cpu/mcheck/non-fatal.c b/xen/arch/x86/cpu/mcheck/non-fatal.c
index 526864e..8cd6635 100644
--- a/xen/arch/x86/cpu/mcheck/non-fatal.c
+++ b/xen/arch/x86/cpu/mcheck/non-fatal.c
@@ -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
-- 
2.6.1

             reply	other threads:[~2016-01-22 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 14:38 Ian Campbell [this message]
2016-01-22 14:47 ` [PATCH] x86/mce: fix misleading indentation in init_nonfatal_mce_checker() Andrew Cooper
2016-01-22 15:12   ` Egger, Christoph

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453473516-22866-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=812166@bugs.debian.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=chegger@amazon.de \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).