mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH] memory_display: Change address pointer to type const void *
Date: Mon, 22 Jul 2013 12:16:35 +0200	[thread overview]
Message-ID: <1374488195-2318-1-git-send-email-s.hauer@pengutronix.de> (raw)

No need to force a width of the pointer, so use void *. Also it's
not modified in memory_display, so also add a const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/memory_display.c | 2 +-
 include/common.h        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/memory_display.c b/common/memory_display.c
index eb188e1..7e4f4da 100644
--- a/common/memory_display.c
+++ b/common/memory_display.c
@@ -2,7 +2,7 @@
 
 #define DISP_LINE_LEN	16
 
-int memory_display(char *addr, loff_t offs, unsigned nbytes, int size, int swab)
+int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab)
 {
 	ulong linebytes, i;
 	u_char	*cp;
diff --git a/include/common.h b/include/common.h
index 744b19e..e813726 100644
--- a/include/common.h
+++ b/include/common.h
@@ -220,7 +220,7 @@ int run_shell(void);
 #define PAGE_ALIGN(s) (((s) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
 #define PAGE_ALIGN_DOWN(x) ((x) & ~(PAGE_SIZE - 1))
 
-int memory_display(char *addr, loff_t offs, unsigned nbytes, int size, int swab);
+int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab);
 
 int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
 		char **sourcefile, char **destfile, int *swab);
-- 
1.8.3.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

                 reply	other threads:[~2013-07-22 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1374488195-2318-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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