From: roel.kluin@gmail.com (Roel Kluin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Wrong size used in dump_mem()
Date: Thu, 17 Dec 2009 22:15:58 +0100 [thread overview]
Message-ID: <4B2A9F8E.5080508@gmail.com> (raw)
The sizeof the pointed to should be used rather than of the pointer
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Unless I am mistaken?
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 3f361a7..5e828fa 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -102,7 +102,7 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
unsigned long p;
char str[sizeof(" 12345678") * 8 + 1];
- memset(str, ' ', sizeof(str));
+ memset(str, ' ', sizeof(*str));
str[sizeof(str) - 1] = '\0';
for (p = first, i = 0; i < 8 && p < top; i++, p += 4) {
WARNING: multiple messages have this Message-ID (diff)
From: Roel Kluin <roel.kluin@gmail.com>
To: Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] ARM: Wrong size used in dump_mem()
Date: Thu, 17 Dec 2009 22:15:58 +0100 [thread overview]
Message-ID: <4B2A9F8E.5080508@gmail.com> (raw)
The sizeof the pointed to should be used rather than of the pointer
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Unless I am mistaken?
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 3f361a7..5e828fa 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -102,7 +102,7 @@ static void dump_mem(const char *lvl, const char *str, unsigned long bottom,
unsigned long p;
char str[sizeof(" 12345678") * 8 + 1];
- memset(str, ' ', sizeof(str));
+ memset(str, ' ', sizeof(*str));
str[sizeof(str) - 1] = '\0';
for (p = first, i = 0; i < 8 && p < top; i++, p += 4) {
next reply other threads:[~2009-12-17 21:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 21:15 Roel Kluin [this message]
2009-12-17 21:15 ` [PATCH] ARM: Wrong size used in dump_mem() Roel Kluin
2009-12-17 21:17 ` Russell King - ARM Linux
2009-12-17 21:17 ` Russell King - ARM Linux
2009-12-17 21:20 ` roel kluin
2009-12-17 21:20 ` roel kluin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B2A9F8E.5080508@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.