]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: Convert vmalloc/memset to kcalloc
authorJoe Perches <joe@perches.com>
Thu, 9 Jan 2014 06:42:25 +0000 (22:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Jan 2014 19:17:31 +0000 (11:17 -0800)
commit5b82eb559654204ab1ba3abbe4386162dbd5da39
tree8314a451384bb41d50056e7c30b63444e29725dd
parentd20b54b5b6882a396b6707a6a13bf6e60a134fd7
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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c