Commit 02137f2e authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller

isdn: use the common ascii hex helpers

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Acked-by: default avatarKarsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12dac075
...@@ -247,7 +247,6 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, ...@@ -247,7 +247,6 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
#ifdef CONFIG_GIGASET_DEBUG #ifdef CONFIG_GIGASET_DEBUG
unsigned char c; unsigned char c;
static char dbgline[3 * 32 + 1]; static char dbgline[3 * 32 + 1];
static const char hexdigit[] = "0123456789abcdef";
int i = 0; int i = 0;
while (count-- > 0) { while (count-- > 0) {
if (i > sizeof(dbgline) - 4) { if (i > sizeof(dbgline) - 4) {
...@@ -258,8 +257,8 @@ static inline void dump_bytes(enum debuglevel level, const char *tag, ...@@ -258,8 +257,8 @@ static inline void dump_bytes(enum debuglevel level, const char *tag,
c = *bytes++; c = *bytes++;
dbgline[i] = (i && !(i % 12)) ? '-' : ' '; dbgline[i] = (i && !(i % 12)) ? '-' : ' ';
i++; i++;
dbgline[i++] = hexdigit[(c >> 4) & 0x0f]; dbgline[i++] = hex_asc_hi(c);
dbgline[i++] = hexdigit[c & 0x0f]; dbgline[i++] = hex_asc_lo(c);
} }
dbgline[i] = '\0'; dbgline[i] = '\0';
gig_dbg(level, "%s:%s", tag, dbgline); gig_dbg(level, "%s:%s", tag, dbgline);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment