Blame SOURCES/0022-mce-amd-k8.c-fix-a-warning.patch

97e186
From 78465e5047b226011c1a4c916c79c63fb6e68f71 Mon Sep 17 00:00:00 2001
97e186
From: Mauro Carvalho Chehab <m.chehab@samsung.com>
97e186
Date: Fri, 14 Feb 2014 05:11:26 +0900
97e186
Subject: [PATCH 22/32] mce-amd-k8.c: fix a warning
97e186
MIME-Version: 1.0
97e186
Content-Type: text/plain; charset=UTF-8
97e186
Content-Transfer-Encoding: 8bit
97e186
97e186
mce-amd-k8.c: In function ‘bank_name’:
97e186
mce-amd-k8.c:250:22: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
97e186
  snprintf(buf, sizeof(buf), "%s (bank=%d)", s, e->bank);
97e186
                      ^
97e186
97e186
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
97e186
---
97e186
 mce-amd-k8.c |    3 +--
97e186
 1 files changed, 1 insertions(+), 2 deletions(-)
97e186
97e186
diff --git a/mce-amd-k8.c b/mce-amd-k8.c
97e186
index 5e21b55..8179f74 100644
97e186
--- a/mce-amd-k8.c
97e186
+++ b/mce-amd-k8.c
97e186
@@ -236,7 +236,6 @@ static void decode_k8_threashold(struct mce_event *e)
97e186
 
97e186
 static void bank_name(struct mce_event *e)
97e186
 {
97e186
-	char *buf = e->bank_name;
97e186
 	const char *s;
97e186
 
97e186
 	if (e->bank < ARRAY_SIZE(k8bank))
97e186
@@ -247,7 +246,7 @@ static void bank_name(struct mce_event *e)
97e186
 	else
97e186
 		return;		/* Use the generic parser for bank */
97e186
 
97e186
-	snprintf(buf, sizeof(buf), "%s (bank=%d)", s, e->bank);
97e186
+	mce_snprintf(e->bank_name, "%s (bank=%d)", s, e->bank);
97e186
 }
97e186
 
97e186
 int parse_amd_k8_event(struct ras_events *ras, struct mce_event *e)
97e186
-- 
97e186
1.7.1
97e186