Blame SOURCES/0060-mce-intel-knl-Fix-CodingStyle.patch

ac32bf
From 17f4e17d9870fbd35572ae6bf6c227c787b07fe9 Mon Sep 17 00:00:00 2001
ac32bf
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
ac32bf
Date: Fri, 5 Feb 2016 15:15:18 -0200
ac32bf
Subject: [PATCH 4/5] mce-intel-knl: Fix CodingStyle
ac32bf
ac32bf
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
ac32bf
---
ac32bf
 mce-intel-knl.c | 43 +++++++++++++++++++++++++++----------------
ac32bf
 1 file changed, 27 insertions(+), 16 deletions(-)
ac32bf
ac32bf
diff --git a/mce-intel-knl.c b/mce-intel-knl.c
ac32bf
index 96b0a59..7062fbb 100644
ac32bf
--- a/mce-intel-knl.c
ac32bf
+++ b/mce-intel-knl.c
ac32bf
@@ -48,32 +48,46 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
ac32bf
 			mce_snprintf(e->mcastatus_msg, "VCU Internal Errors");
ac32bf
 			break;
ac32bf
 		case 0x407:
ac32bf
-			mce_snprintf(e->mcastatus_msg, "Other UBOX Internal Errors");
ac32bf
+			mce_snprintf(e->mcastatus_msg,
ac32bf
+				     "Other UBOX Internal Errors");
ac32bf
 			break;
ac32bf
 		}
ac32bf
 		break;
ac32bf
-	case 7: case 8: case 9: case 10:
ac32bf
-	case 11: case 12: case 13: case 14:
ac32bf
-	case 15: case 16:
ac32bf
+	case 7:
ac32bf
+	case 8:
ac32bf
+	case 9:
ac32bf
+	case 10:
ac32bf
+	case 11:
ac32bf
+	case 12:
ac32bf
+	case 13:
ac32bf
+	case 14:
ac32bf
+	case 15:
ac32bf
+	case 16:
ac32bf
 		if ((EXTRACT(status, 0, 15)) == 0x5) {
ac32bf
 			mce_snprintf(e->mcastatus_msg, "Internal Parity error");
ac32bf
 		} else {
ac32bf
 			chan = (EXTRACT(status, 0, 3)) + 3 * (e->bank == 15);
ac32bf
 			switch (EXTRACT(status, 4, 7)) {
ac32bf
 			case 0x0:
ac32bf
-				mce_snprintf(e->mcastatus_msg, "Undefined request on channel %d", chan);
ac32bf
+				mce_snprintf(e->mcastatus_msg,
ac32bf
+					     "Undefined request on channel %d",
ac32bf
+					     chan);
ac32bf
 				break;
ac32bf
 			case 0x1:
ac32bf
-				mce_snprintf(e->mcastatus_msg, "Read on channel %d", chan);
ac32bf
+				mce_snprintf(e->mcastatus_msg,
ac32bf
+					     "Read on channel %d", chan);
ac32bf
 				break;
ac32bf
 			case 0x2:
ac32bf
-				mce_snprintf(e->mcastatus_msg, "Write on channel %d", chan);
ac32bf
+				mce_snprintf(e->mcastatus_msg,
ac32bf
+					     "Write on channel %d", chan);
ac32bf
 				break;
ac32bf
 			case 0x3:
ac32bf
-				mce_snprintf(e->mcastatus_msg, "CA error on channel %d", chan);
ac32bf
+				mce_snprintf(e->mcastatus_msg,
ac32bf
+					     "CA error on channel %d", chan);
ac32bf
 				break;
ac32bf
 			case 0x4:
ac32bf
-				mce_snprintf(e->mcastatus_msg, "Scrub error on channel %d", chan);
ac32bf
+				mce_snprintf(e->mcastatus_msg,
ac32bf
+					     "Scrub error on channel %d", chan);
ac32bf
 				break;
ac32bf
 			}
ac32bf
 		}
ac32bf
@@ -93,7 +107,7 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
ac32bf
 
ac32bf
 	/* Ignore unless this is an corrected extended error from an iMC bank */
ac32bf
 	if (e->bank < 7 || e->bank > 16 || (status & MCI_STATUS_UC) ||
ac32bf
-		!test_prefix(7, status & 0xefff))
ac32bf
+	    !test_prefix(7, status & 0xefff))
ac32bf
 		return;
ac32bf
 
ac32bf
 	/*
ac32bf
@@ -101,12 +115,9 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
ac32bf
 	 */
ac32bf
 
ac32bf
 	chan = EXTRACT(status, 0, 3);
ac32bf
-	if (chan == 0xf)
ac32bf
-	{
ac32bf
+	if (chan == 0xf) {
ac32bf
 		mce_snprintf(e->mc_location, "memory_channel=unspecified");
ac32bf
-	}
ac32bf
-	else
ac32bf
-	{
ac32bf
+	} else {
ac32bf
 		chan = chan + 3 * (e->bank == 15);
ac32bf
 		mce_snprintf(e->mc_location, "memory_channel=%d", chan);
ac32bf
 
ac32bf
@@ -121,7 +132,7 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
ac32bf
 		 */
ac32bf
 		if (rank0 != -1 && rank1 != -1)
ac32bf
 			mce_snprintf(e->mc_location, "ranks=%d and %d",
ac32bf
-					     rank0, rank1);
ac32bf
+				     rank0, rank1);
ac32bf
 		else if (rank0 != -1)
ac32bf
 			mce_snprintf(e->mc_location, "rank=%d", rank0);
ac32bf
 	}
ac32bf
-- 
ac32bf
1.8.3.1
ac32bf