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) {
next reply other threads:[~2009-12-17 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 21:15 Roel Kluin [this message]
2009-12-17 21:17 ` [PATCH] ARM: Wrong size used in dump_mem() Russell King - ARM Linux
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).