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

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