]> err.no Git - linux-2.6/commit
[ETH]: Combine format_addr() with print_mac().
authorMichael Chan <mchan@broadcom.com>
Tue, 25 Dec 2007 05:28:09 +0000 (21:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:00:05 +0000 (15:00 -0800)
commit7ffc49a6ee92b7138c2ee28073a8e10e58335d62
tree6421d389980f3a71b1b53ed6e1548eb08dbf1226
parent21371f768bf7127ee45bfaadd17899df6a439e8f
[ETH]: Combine format_addr() with print_mac().

print_mac() used many most net drivers and format_addr() used by
net-sysfs.c are very similar and they can be intergrated.

format_addr() is also identically redefined in the qla4xxx iscsi
driver.

Export a new function sysfs_format_mac() to be used by net-sysfs,
qla4xxx and others in the future.  Both print_mac() and
sysfs_format_mac() call _format_mac_addr() to do the formatting.

Changed print_mac() to use unsigned char * to be consistent with
net_device struct's dev_addr.  Added buffer length overrun checking
as suggested by Joe Perches.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/scsi/qla4xxx/ql4_os.c
include/linux/if_ether.h
net/core/net-sysfs.c
net/ethernet/eth.c