krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone

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

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