mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 11:01:06 -04:00
ixgbe: use kzalloc for allocating one thing
Use kzalloc rather than kcalloc(1..
The semantic patch that makes this change is as follows:
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
and removing checkpatch below CHECK:
CHECK: Prefer kzalloc(sizeof(*fwd_adapter)...) over
kzalloc(sizeof(struct ixgbe_fwd_adapter)...)
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
committed by
Jeff Kirsher
parent
fa888b8913
commit
bc52f951e3
@@ -8261,7 +8261,7 @@ static void *ixgbe_fwd_add(struct net_device *pdev, struct net_device *vdev)
|
||||
(adapter->num_rx_pools > IXGBE_MAX_MACVLANS))
|
||||
return ERR_PTR(-EBUSY);
|
||||
|
||||
fwd_adapter = kcalloc(1, sizeof(struct ixgbe_fwd_adapter), GFP_KERNEL);
|
||||
fwd_adapter = kzalloc(sizeof(*fwd_adapter), GFP_KERNEL);
|
||||
if (!fwd_adapter)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user