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