summaryrefslogtreecommitdiffstats
path: root/lib/hexdump.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-08-07 22:43:14 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-09 17:34:23 +0200
commit6a0ed91e361a93ee1efb4c20c4967024ed2a8dd7 (patch)
treeb4299ccdb180450b5ed7a621dad4f3ed0f4abdae /lib/hexdump.c
parentMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ne... (diff)
downloadlinux-6a0ed91e361a93ee1efb4c20c4967024ed2a8dd7.tar.xz
linux-6a0ed91e361a93ee1efb4c20c4967024ed2a8dd7.zip
hexdump: use const notation
Trivial fix: mark the buffer to hexdump as const so callers could avoid casting their const buffers when calling print_hex_dump(). The patch is really trivial and I suggest to consider it as a fix (it fixes GCC warnings) and push it to current tree. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/hexdump.c')
-rw-r--r--lib/hexdump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hexdump.c b/lib/hexdump.c
index 473f5aed6cae..16f2e2935e87 100644
--- a/lib/hexdump.c
+++ b/lib/hexdump.c
@@ -145,9 +145,9 @@ EXPORT_SYMBOL(hex_dump_to_buffer);
*/
void print_hex_dump(const char *level, const char *prefix_str, int prefix_type,
int rowsize, int groupsize,
- void *buf, size_t len, bool ascii)
+ const void *buf, size_t len, bool ascii)
{
- u8 *ptr = buf;
+ const u8 *ptr = buf;
int i, linelen, remaining = len;
unsigned char linebuf[200];