Blob Blame History Raw
From 17f4e17d9870fbd35572ae6bf6c227c787b07fe9 Mon Sep 17 00:00:00 2001
From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Date: Fri, 5 Feb 2016 15:15:18 -0200
Subject: [PATCH 4/5] mce-intel-knl: Fix CodingStyle

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 mce-intel-knl.c | 43 +++++++++++++++++++++++++++----------------
 1 file changed, 27 insertions(+), 16 deletions(-)

diff --git a/mce-intel-knl.c b/mce-intel-knl.c
index 96b0a59..7062fbb 100644
--- a/mce-intel-knl.c
+++ b/mce-intel-knl.c
@@ -48,32 +48,46 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
 			mce_snprintf(e->mcastatus_msg, "VCU Internal Errors");
 			break;
 		case 0x407:
-			mce_snprintf(e->mcastatus_msg, "Other UBOX Internal Errors");
+			mce_snprintf(e->mcastatus_msg,
+				     "Other UBOX Internal Errors");
 			break;
 		}
 		break;
-	case 7: case 8: case 9: case 10:
-	case 11: case 12: case 13: case 14:
-	case 15: case 16:
+	case 7:
+	case 8:
+	case 9:
+	case 10:
+	case 11:
+	case 12:
+	case 13:
+	case 14:
+	case 15:
+	case 16:
 		if ((EXTRACT(status, 0, 15)) == 0x5) {
 			mce_snprintf(e->mcastatus_msg, "Internal Parity error");
 		} else {
 			chan = (EXTRACT(status, 0, 3)) + 3 * (e->bank == 15);
 			switch (EXTRACT(status, 4, 7)) {
 			case 0x0:
-				mce_snprintf(e->mcastatus_msg, "Undefined request on channel %d", chan);
+				mce_snprintf(e->mcastatus_msg,
+					     "Undefined request on channel %d",
+					     chan);
 				break;
 			case 0x1:
-				mce_snprintf(e->mcastatus_msg, "Read on channel %d", chan);
+				mce_snprintf(e->mcastatus_msg,
+					     "Read on channel %d", chan);
 				break;
 			case 0x2:
-				mce_snprintf(e->mcastatus_msg, "Write on channel %d", chan);
+				mce_snprintf(e->mcastatus_msg,
+					     "Write on channel %d", chan);
 				break;
 			case 0x3:
-				mce_snprintf(e->mcastatus_msg, "CA error on channel %d", chan);
+				mce_snprintf(e->mcastatus_msg,
+					     "CA error on channel %d", chan);
 				break;
 			case 0x4:
-				mce_snprintf(e->mcastatus_msg, "Scrub error on channel %d", chan);
+				mce_snprintf(e->mcastatus_msg,
+					     "Scrub error on channel %d", chan);
 				break;
 			}
 		}
@@ -93,7 +107,7 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
 
 	/* Ignore unless this is an corrected extended error from an iMC bank */
 	if (e->bank < 7 || e->bank > 16 || (status & MCI_STATUS_UC) ||
-		!test_prefix(7, status & 0xefff))
+	    !test_prefix(7, status & 0xefff))
 		return;
 
 	/*
@@ -101,12 +115,9 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
 	 */
 
 	chan = EXTRACT(status, 0, 3);
-	if (chan == 0xf)
-	{
+	if (chan == 0xf) {
 		mce_snprintf(e->mc_location, "memory_channel=unspecified");
-	}
-	else
-	{
+	} else {
 		chan = chan + 3 * (e->bank == 15);
 		mce_snprintf(e->mc_location, "memory_channel=%d", chan);
 
@@ -121,7 +132,7 @@ void knl_decode_model(struct ras_events *ras, struct mce_event *e)
 		 */
 		if (rank0 != -1 && rank1 != -1)
 			mce_snprintf(e->mc_location, "ranks=%d and %d",
-					     rank0, rank1);
+				     rank0, rank1);
 		else if (rank0 != -1)
 			mce_snprintf(e->mc_location, "rank=%d", rank0);
 	}
-- 
1.8.3.1