diff options
author | Joe Perches <joe@perches.com> | 2014-01-08 22:42:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-13 11:17:31 -0800 |
commit | f3c0773ff2875af6497c20cf63e42c186e19eef0 (patch) | |
tree | 8314a451384bb41d50056e7c30b63444e29725dd /drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | |
parent | 32e25cb7a68a3543cb9b2a96616ae24c7e23989c (diff) |
qlcnic: Convert vmalloc/memset to kcalloc
vmalloc is a limited resource. Don't use it unnecessarily.
It seems this allocation should work with kcalloc.
Remove unnecessary memset(,0,) of buf as it's completely
overwritten as the previously only unset field in
struct qlcnic_pci_func_cfg is now set to 0.
Use kfree instead of vfree.
Use ETH_ALEN instead of 6.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic.h')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h index 35d48766d84..8d7aa4ceac9 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h @@ -1267,7 +1267,7 @@ struct qlcnic_pci_func_cfg { u16 port_num; u8 pci_func; u8 func_state; - u8 def_mac_addr[6]; + u8 def_mac_addr[ETH_ALEN]; }; struct qlcnic_npar_func_cfg { |