aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-core
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-01-28 13:05:52 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-03 15:24:44 -0500
commit4bad5d2d25099a42e146d7b18d2b98950ed287f5 (patch)
tree82da59ae2bb7b24cf182dfac3714db3c8a9533c1 /drivers/media/dvb-core
parent5c7c0ca02f01df4345fcf6c0b60281928d3e775e (diff)
[media] dvb_net: Convert local hex dump to print_hex_dump_debug
Use the generic facility instead of a home-grown one. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r--drivers/media/dvb-core/dvb_net.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index 0b0f97af65d2..686d3277dad1 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -83,33 +83,9 @@ static inline __u32 iov_crc32( __u32 c, struct kvec *iov, unsigned int cnt )
83 83
84#ifdef ULE_DEBUG 84#ifdef ULE_DEBUG
85 85
86#define isprint(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')) 86static void hexdump(const unsigned char *buf, unsigned short len)
87
88static void hexdump( const unsigned char *buf, unsigned short len )
89{ 87{
90 char str[80], octet[10]; 88 print_hex_dump_debug("", DUMP_PREFIX_OFFSET, 16, 1, buf, len, true);
91 int ofs, i, l;
92
93 for (ofs = 0; ofs < len; ofs += 16) {
94 sprintf( str, "%03d: ", ofs );
95
96 for (i = 0; i < 16; i++) {
97 if ((i + ofs) < len)
98 sprintf( octet, "%02x ", buf[ofs + i] );
99 else
100 strcpy( octet, " " );
101
102 strcat( str, octet );
103 }
104 strcat( str, " " );
105 l = strlen( str );
106
107 for (i = 0; (i < 16) && ((i + ofs) < len); i++)
108 str[l++] = isprint( buf[ofs + i] ) ? buf[ofs + i] : '.';
109
110 str[l] = '\0';
111 printk( KERN_WARNING "%s\n", str );
112 }
113} 89}
114 90
115#endif 91#endif