Skip to contentSkip to conversation

x86, mce, severity: Fix warning about intended braces

PATCH Applied Aravind Gopalakrishnan 2 participants 2 messages Mar 31, 2015 – Apr 1, 2015 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, mce, severity: Fix warning about intended braces

Dan reported compiler warnings about intended curly braces around if (!(m->mcgstatus & MCG_STATUS_RIPV)). This can be fixed by reindenting return MCE_AR_SEVERITY correctly to single tab.

While at it, chain ctx == IN_KERNEL check with mcgstatus check to make it cleaner as suggested by Boris.

No functional changes are introduced by the patch

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/x86/kernel/cpu/mcheck/mce-severity.c +5 -5
index 155c926..8329c6b 100644
@@ -208,12 +208,12 @@ static int mce_severity_amd(struct mce *m, int tolerant, char **msg, bool is_exc
 		 */
 		if (mce_flags.overflow_recov) {
 			/* software can try to contain */
-			if (!(m->mcgstatus & MCG_STATUS_RIPV))
-				if (ctx == IN_KERNEL)
-					return MCE_PANIC_SEVERITY;
+			if (!(m->mcgstatus & MCG_STATUS_RIPV) &&
+			      ctx == IN_KERNEL)
+				return MCE_PANIC_SEVERITY;
 
-				/* kill current process */
-				return MCE_AR_SEVERITY;
+			/* kill current process */
+			return MCE_AR_SEVERITY;
 		} else {
 			/* at least one error was not logged */
 			if (m->status & MCI_STATUS_OVER)
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Aravind Gopalakrishnan

Dan reported compiler warnings about intended curly braces around if (!(m->mcgstatus & MCG_STATUS_RIPV)). This can be fixed by reindenting return MCE_AR_SEVERITY correctly to single tab.

While at it, chain ctx == IN_KERNEL check with mcgstatus check to make it cleaner as suggested by Boris.

Quoted 7 lines

No functional changes are introduced by the patch

---
 arch/x86/kernel/cpu/mcheck/mce-severity.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Applied, thanks.

Signature · 5 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--