net/ipv4/arp.c: Use common hex_asc helpers

Here the local hexbuf is a duplicate of global const char hex_asc from
lib/hexdump.c, except the hex letters' cases:

const char hexbuf[] = "0123456789ABCDEF";

const char hex_asc[] = "0123456789abcdef";

and here to print HW addresses, the hex cases are not significant.

Thanks to Harvey Harrison to introduce the hex_asc_hi/hex_asc_lo helpers.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Denis Cheng and committed by David S. Miller 51f82a2b b1443e2f

+2 -3
+2 -3
net/ipv4/arp.c
··· 1288 struct neighbour *n) 1289 { 1290 char hbuffer[HBUFFERLEN]; 1291 - const char hexbuf[] = "0123456789ABCDEF"; 1292 int k, j; 1293 char tbuf[16]; 1294 struct net_device *dev = n->dev; ··· 1301 else { 1302 #endif 1303 for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) { 1304 - hbuffer[k++] = hexbuf[(n->ha[j] >> 4) & 15]; 1305 - hbuffer[k++] = hexbuf[n->ha[j] & 15]; 1306 hbuffer[k++] = ':'; 1307 } 1308 hbuffer[--k] = 0;
··· 1288 struct neighbour *n) 1289 { 1290 char hbuffer[HBUFFERLEN]; 1291 int k, j; 1292 char tbuf[16]; 1293 struct net_device *dev = n->dev; ··· 1302 else { 1303 #endif 1304 for (k = 0, j = 0; k < HBUFFERLEN - 3 && j < dev->addr_len; j++) { 1305 + hbuffer[k++] = hex_asc_hi(n->ha[j]); 1306 + hbuffer[k++] = hex_asc_lo(n->ha[j]); 1307 hbuffer[k++] = ':'; 1308 } 1309 hbuffer[--k] = 0;