summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bonding/bond_main.c6
-rw-r--r--drivers/net/dsa/ocelot/felix.c3
-rw-r--r--drivers/net/dsa/sja1105/sja1105_devlink.c3
-rw-r--r--drivers/net/ethernet/amd/pcnet32.c6
-rw-r--r--drivers/net/ethernet/apm/xgene-v2/main.c3
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_ptp.c3
-rw-r--r--drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c3
-rw-r--r--drivers/net/ethernet/broadcom/bcm63xx_enet.c6
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c3
-rw-r--r--drivers/net/ethernet/broadcom/bnge/bnge_netdev.c18
-rw-r--r--drivers/net/ethernet/broadcom/bnge/bnge_rmem.c3
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c9
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c3
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c6
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c12
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c3
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c9
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c6
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c3
-rw-r--r--drivers/net/ethernet/brocade/bna/bnad.c3
-rw-r--r--drivers/net/ethernet/calxeda/xgmac.c6
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_core.c6
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c3
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c3
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c3
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c6
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c9
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_main.c9
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c6
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c6
-rw-r--r--drivers/net/ethernet/freescale/enetc/enetc.c3
-rw-r--r--drivers/net/ethernet/freescale/gianfar.c6
-rw-r--r--drivers/net/ethernet/google/gve/gve_ethtool.c3
-rw-r--r--drivers/net/ethernet/google/gve/gve_main.c3
-rw-r--r--drivers/net/ethernet/google/gve/gve_rx.c3
-rw-r--r--drivers/net/ethernet/google/gve/gve_rx_dqo.c3
-rw-r--r--drivers/net/ethernet/google/gve/gve_tx.c3
-rw-r--r--drivers/net/ethernet/google/gve/gve_tx_dqo.c3
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hnae.c3
-rw-r--r--drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c3
-rw-r--r--drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c3
-rw-r--r--drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c3
-rw-r--r--drivers/net/ethernet/huawei/hinic3/hinic3_rx.c3
-rw-r--r--drivers/net/ethernet/huawei/hinic3/hinic3_tx.c3
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c15
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_ethtool.c12
-rw-r--r--drivers/net/ethernet/intel/e1000e/ethtool.c6
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_main.c3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_debugfs.c3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c3
-rw-r--r--drivers/net/ethernet/intel/iavf/iavf_main.c9
-rw-r--r--drivers/net/ethernet/intel/ice/ice_arfs.c6
-rw-r--r--drivers/net/ethernet/intel/ice/ice_common.c3
-rw-r--r--drivers/net/ethernet/intel/ice/ice_lib.c9
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_controlq.c3
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c6
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_lib.c3
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_txrx.c24
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_virtchnl.c12
-rw-r--r--drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c3
-rw-r--r--drivers/net/ethernet/intel/igc/igc_main.c3
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c6
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c3
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c3
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c3
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c3
-rw-r--r--drivers/net/ethernet/intel/libie/fwlog.c3
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c3
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_main.c3
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c3
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c6
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_counter.c3
-rw-r--r--drivers/net/ethernet/marvell/sky2.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/alloc.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/cmd.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_netdev.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c12
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/qos.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/rl.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core_thermal.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/pci.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c6
-rw-r--r--drivers/net/ethernet/micrel/ksz884x.c3
-rw-r--r--drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c3
-rw-r--r--drivers/net/ethernet/microchip/sparx5/sparx5_main.c3
-rw-r--r--drivers/net/ethernet/microsoft/mana/mana_en.c6
-rw-r--r--drivers/net/ethernet/myricom/myri10ge/myri10ge.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/bpf/offload.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/lag_conf.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfd3/rings.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfdk/rings.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_main.c3
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c3
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c6
-rw-r--r--drivers/net/ethernet/pasemi/pasemi_mac.c6
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c3
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_cxt.c6
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_debug.c3
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c3
-rw-r--r--drivers/net/ethernet/qlogic/qede/qede_main.c9
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c3
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c3
-rw-r--r--drivers/net/ethernet/renesas/ravb_main.c3
-rw-r--r--drivers/net/ethernet/renesas/rswitch_main.c6
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.c6
-rw-r--r--drivers/net/ethernet/rocker/rocker_main.c3
-rw-r--r--drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c3
-rw-r--r--drivers/net/ethernet/sfc/falcon/rx.c3
-rw-r--r--drivers/net/ethernet/sfc/falcon/selftest.c3
-rw-r--r--drivers/net/ethernet/sfc/mcdi_mon.c3
-rw-r--r--drivers/net/ethernet/sfc/rx_common.c3
-rw-r--r--drivers/net/ethernet/sfc/selftest.c3
-rw-r--r--drivers/net/ethernet/sfc/siena/mcdi_mon.c3
-rw-r--r--drivers/net/ethernet/sfc/siena/rx_common.c3
-rw-r--r--drivers/net/ethernet/sfc/siena/selftest.c3
-rw-r--r--drivers/net/ethernet/smsc/smsc9420.c6
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c6
-rw-r--r--drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c9
-rw-r--r--drivers/net/ethernet/ti/k3-cppi-desc-pool.c3
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_axienet_main.c6
-rw-r--r--drivers/net/hyperv/netvsc_drv.c3
-rw-r--r--drivers/net/ieee802154/ca8210.c3
-rw-r--r--drivers/net/ipa/gsi_trans.c3
-rw-r--r--drivers/net/pcs/pcs-rzn1-miic.c3
-rw-r--r--drivers/net/usb/hso.c3
-rw-r--r--drivers/net/usb/smsc75xx.c3
-rw-r--r--drivers/net/wan/fsl_ucc_hdlc.c6
-rw-r--r--drivers/net/wireless/ath/ath10k/ce.c12
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c3
-rw-r--r--drivers/net/wireless/ath/ath12k/dp.c3
-rw-r--r--drivers/net/wireless/ath/ath12k/mac.c6
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c12
-rw-r--r--drivers/net/wireless/ath/wil6210/fw_inc.c3
-rw-r--r--drivers/net/wireless/ath/wil6210/pmc.c3
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx_edma.c3
-rw-r--r--drivers/net/wireless/broadcom/b43/debugfs.c3
-rw-r--r--drivers/net/wireless/broadcom/b43/dma.c3
-rw-r--r--drivers/net/wireless/broadcom/b43legacy/dma.c3
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c3
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2100.c3
-rw-r--r--drivers/net/wireless/intel/ipw2x00/libipw_module.c3
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c9
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/dbg.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c15
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/d3.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/sta.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/time_sync.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c3
-rw-r--r--drivers/net/wireless/intersil/p54/eeprom.c6
-rw-r--r--drivers/net/wireless/marvell/mwifiex/scan.c3
-rw-r--r--drivers/net/wireless/microchip/wilc1000/cfg80211.c9
-rw-r--r--drivers/net/wireless/quantenna/qtnfmac/commands.c12
-rw-r--r--drivers/net/wireless/ralink/rt2x00/rt2800lib.c3
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c6
-rw-r--r--drivers/net/wireless/realtek/rtw88/sdio.c3
-rw-r--r--drivers/net/wireless/realtek/rtw89/usb.c3
-rw-r--r--drivers/net/wireless/st/cw1200/debug.c3
-rw-r--r--drivers/net/wireless/st/cw1200/queue.c6
-rw-r--r--drivers/net/wireless/st/cw1200/scan.c3
-rw-r--r--drivers/net/wireless/ti/wl1251/init.c3
-rw-r--r--drivers/net/wwan/iosm/iosm_ipc_protocol.c3
-rw-r--r--drivers/net/xen-netfront.c3
184 files changed, 290 insertions, 580 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 93b7f38f59a8..a1de08ee3815 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1723,8 +1723,7 @@ static struct slave *bond_alloc_slave(struct bonding *bond,
return NULL;
if (BOND_MODE(bond) == BOND_MODE_8023AD) {
- SLAVE_AD_INFO(slave) = kzalloc_obj(struct ad_slave_info,
- GFP_KERNEL);
+ SLAVE_AD_INFO(slave) = kzalloc_obj(struct ad_slave_info);
if (!SLAVE_AD_INFO(slave)) {
kobject_put(&slave->kobj);
return NULL;
@@ -5097,8 +5096,7 @@ int bond_update_slave_arr(struct bonding *bond, struct slave *skipslave)
might_sleep();
- usable_slaves = kzalloc_flex(*usable_slaves, arr, bond->slave_cnt,
- GFP_KERNEL);
+ usable_slaves = kzalloc_flex(*usable_slaves, arr, bond->slave_cnt);
all_slaves = kzalloc_flex(*all_slaves, arr, bond->slave_cnt);
if (!usable_slaves || !all_slaves) {
ret = -ENOMEM;
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 0904323b016d..84cf8e7fb17a 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -1539,8 +1539,7 @@ static int felix_init_structs(struct felix *felix, int num_phys_ports)
ocelot->npi_xtr_prefix = OCELOT_TAG_PREFIX_SHORT;
ocelot->devlink = felix->ds->devlink;
- port_phy_modes = kzalloc_objs(phy_interface_t, num_phys_ports,
- GFP_KERNEL);
+ port_phy_modes = kzalloc_objs(phy_interface_t, num_phys_ports);
if (!port_phy_modes)
return -ENOMEM;
diff --git a/drivers/net/dsa/sja1105/sja1105_devlink.c b/drivers/net/dsa/sja1105/sja1105_devlink.c
index c1dd9ccc32d0..f8580508e0e2 100644
--- a/drivers/net/dsa/sja1105/sja1105_devlink.c
+++ b/drivers/net/dsa/sja1105/sja1105_devlink.c
@@ -82,8 +82,7 @@ static int sja1105_setup_devlink_regions(struct dsa_switch *ds)
struct devlink_region *region;
u64 size;
- priv->regions = kzalloc_objs(struct devlink_region *, num_regions,
- GFP_KERNEL);
+ priv->regions = kzalloc_objs(struct devlink_region *, num_regions);
if (!priv->regions)
return -ENOMEM;
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
index 58dc56671fb4..911808ab13a7 100644
--- a/drivers/net/ethernet/amd/pcnet32.c
+++ b/drivers/net/ethernet/amd/pcnet32.c
@@ -2043,13 +2043,11 @@ static int pcnet32_alloc_ring(struct net_device *dev, const char *name)
if (!lp->rx_dma_addr)
return -ENOMEM;
- lp->tx_skbuff = kzalloc_objs(struct sk_buff *, lp->tx_ring_size,
- GFP_KERNEL);
+ lp->tx_skbuff = kzalloc_objs(struct sk_buff *, lp->tx_ring_size);
if (!lp->tx_skbuff)
return -ENOMEM;
- lp->rx_skbuff = kzalloc_objs(struct sk_buff *, lp->rx_ring_size,
- GFP_KERNEL);
+ lp->rx_skbuff = kzalloc_objs(struct sk_buff *, lp->rx_ring_size);
if (!lp->rx_skbuff)
return -ENOMEM;
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 2b2de6e2bc5b..b51f320149e5 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -417,8 +417,7 @@ static struct xge_desc_ring *xge_create_desc_ring(struct net_device *ndev)
if (!ring->desc_addr)
goto err;
- ring->pkt_info = kzalloc_objs(*ring->pkt_info, XGENE_ENET_NUM_DESC,
- GFP_KERNEL);
+ ring->pkt_info = kzalloc_objs(*ring->pkt_info, XGENE_ENET_NUM_DESC);
if (!ring->pkt_info)
goto err;
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
index 05af57750b6a..9df8918216f6 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
@@ -1130,8 +1130,7 @@ static void aq_ptp_gpio_init(struct ptp_clock_info *info,
if (!info->n_pins)
return;
- info->pin_config = kzalloc_objs(struct ptp_pin_desc, info->n_pins,
- GFP_KERNEL);
+ info->pin_config = kzalloc_objs(struct ptp_pin_desc, info->n_pins);
if (!info->pin_config)
return;
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
index 612abed61fff..b368ec2fea43 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
@@ -689,8 +689,7 @@ static int bcmasp_alloc_buffers(struct bcmasp_intf *intf)
if (!intf->tx_spb_cpu)
goto free_rx_edpkt_dma;
- intf->tx_cbs = kzalloc_objs(struct bcmasp_tx_cb, DESC_RING_COUNT,
- GFP_KERNEL);
+ intf->tx_cbs = kzalloc_objs(struct bcmasp_tx_cb, DESC_RING_COUNT);
if (!intf->tx_cbs)
goto free_tx_spb_dma;
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 00408af127e1..7ef1babfeca6 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -981,8 +981,7 @@ static int bcm_enet_open(struct net_device *dev)
priv->tx_desc_alloc_size = size;
priv->tx_desc_cpu = p;
- priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size,
- GFP_KERNEL);
+ priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size);
if (!priv->tx_skb) {
ret = -ENOMEM;
goto out_free_tx_ring;
@@ -2149,8 +2148,7 @@ static int bcm_enetsw_open(struct net_device *dev)
priv->tx_desc_alloc_size = size;
priv->tx_desc_cpu = p;
- priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size,
- GFP_KERNEL);
+ priv->tx_skb = kzalloc_objs(struct sk_buff *, priv->tx_ring_size);
if (!priv->tx_skb) {
dev_err(kdev, "cannot allocate tx skb queue\n");
ret = -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 3594496dd5a6..4d06c6ba6641 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -1665,8 +1665,7 @@ static int bcm_sysport_init_rx_ring(struct bcm_sysport_priv *priv)
priv->rx_bds = priv->base + SYS_PORT_RDMA_OFFSET;
priv->rx_c_index = 0;
priv->rx_read_ptr = 0;
- priv->rx_cbs = kzalloc_objs(struct bcm_sysport_cb, priv->num_rx_bds,
- GFP_KERNEL);
+ priv->rx_cbs = kzalloc_objs(struct bcm_sysport_cb, priv->num_rx_bds);
if (!priv->rx_cbs) {
netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
return -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
index 8c099682d3db..a20dc3ca640c 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_netdev.c
@@ -509,8 +509,7 @@ static int bnge_alloc_tpa_info(struct bnge_net *bn)
for (i = 0; i < bd->rx_nr_rings; i++) {
struct bnge_rx_ring_info *rxr = &bn->rx_ring[i];
- rxr->rx_tpa = kzalloc_objs(struct bnge_tpa_info, bn->max_tpa,
- GFP_KERNEL);
+ rxr->rx_tpa = kzalloc_objs(struct bnge_tpa_info, bn->max_tpa);
if (!rxr->rx_tpa)
goto err_free_tpa_info;
@@ -522,8 +521,7 @@ static int bnge_alloc_tpa_info(struct bnge_net *bn)
goto err_free_tpa_info;
rxr->rx_tpa[j].agg_arr = agg;
}
- rxr->rx_tpa_idx_map = kzalloc_obj(*rxr->rx_tpa_idx_map,
- GFP_KERNEL);
+ rxr->rx_tpa_idx_map = kzalloc_obj(*rxr->rx_tpa_idx_map);
if (!rxr->rx_tpa_idx_map)
goto err_free_tpa_info;
}
@@ -812,8 +810,7 @@ static int bnge_alloc_vnics(struct bnge_net *bn)
*/
num_vnics = 1;
- bn->vnic_info = kzalloc_objs(struct bnge_vnic_info, num_vnics,
- GFP_KERNEL);
+ bn->vnic_info = kzalloc_objs(struct bnge_vnic_info, num_vnics);
if (!bn->vnic_info)
return -ENOMEM;
@@ -840,8 +837,7 @@ static int bnge_init_ring_grps(struct bnge_net *bn)
struct bnge_dev *bd = bn->bd;
int i;
- bn->grp_info = kzalloc_objs(struct bnge_ring_grp_info, bd->nq_nr_rings,
- GFP_KERNEL);
+ bn->grp_info = kzalloc_objs(struct bnge_ring_grp_info, bd->nq_nr_rings);
if (!bn->grp_info)
return -ENOMEM;
for (i = 0; i < bd->nq_nr_rings; i++) {
@@ -901,8 +897,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
nqr->ring_struct.ring_mem.flags = BNGE_RMEM_RING_PTE_FLAG;
}
- bn->rx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd->rx_nr_rings,
- GFP_KERNEL);
+ bn->rx_ring = kzalloc_objs(struct bnge_rx_ring_info, bd->rx_nr_rings);
if (!bn->rx_ring)
goto err_free_core;
@@ -917,8 +912,7 @@ static int bnge_alloc_core(struct bnge_net *bn)
bn->bnapi[i]->rx_ring = &bn->rx_ring[i];
}
- bn->tx_ring = kzalloc_objs(struct bnge_tx_ring_info, bd->tx_nr_rings,
- GFP_KERNEL);
+ bn->tx_ring = kzalloc_objs(struct bnge_tx_ring_info, bd->tx_nr_rings);
if (!bn->tx_ring)
goto err_free_core;
diff --git a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
index 2950a804fa02..94f15e08a88c 100644
--- a/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
+++ b/drivers/net/ethernet/broadcom/bnge/bnge_rmem.c
@@ -158,8 +158,7 @@ static int bnge_alloc_ctx_pg_tbls(struct bnge_dev *bd,
int nr_tbls, i;
rmem->depth = 2;
- ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES,
- GFP_KERNEL);
+ ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES);
if (!ctx_pg->ctx_pg_tbl)
return -ENOMEM;
nr_tbls = DIV_ROUND_UP(ctx_pg->nr_pages, MAX_CTX_PAGES);
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 942a33ae55ee..8c3dd7331bfd 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -4761,14 +4761,12 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp)
bp->fp = fp;
/* allocate sp objs */
- bp->sp_objs = kzalloc_objs(struct bnx2x_sp_objs, bp->fp_array_size,
- GFP_KERNEL);
+ bp->sp_objs = kzalloc_objs(struct bnx2x_sp_objs, bp->fp_array_size);
if (!bp->sp_objs)
goto alloc_err;
/* allocate fp_stats */
- bp->fp_stats = kzalloc_objs(struct bnx2x_fp_stats, bp->fp_array_size,
- GFP_KERNEL);
+ bp->fp_stats = kzalloc_objs(struct bnx2x_fp_stats, bp->fp_array_size);
if (!bp->fp_stats)
goto alloc_err;
@@ -4777,8 +4775,7 @@ int bnx2x_alloc_mem_bp(struct bnx2x *bp)
BNX2X_MAX_RSS_COUNT(bp) * BNX2X_MULTI_TX_COS + CNIC_SUPPORT(bp);
BNX2X_DEV_INFO("txq_array_size %d", txq_array_size);
- bp->bnx2x_txq = kzalloc_objs(struct bnx2x_fp_txdata, txq_array_size,
- GFP_KERNEL);
+ bp->bnx2x_txq = kzalloc_objs(struct bnx2x_fp_txdata, txq_array_size);
if (!bp->bnx2x_txq)
goto alloc_err;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 8120cafdad2f..da0f8c353e6a 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -8396,8 +8396,7 @@ int bnx2x_alloc_mem(struct bnx2x *bp)
goto alloc_mem_err;
allocated += bp->context[i].size;
}
- bp->ilt->lines = kzalloc_objs(struct ilt_line, ILT_MAX_LINES,
- GFP_KERNEL);
+ bp->ilt->lines = kzalloc_objs(struct ilt_line, ILT_MAX_LINES);
if (!bp->ilt->lines)
goto alloc_mem_err;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 605a7853e0cf..b638f94094a9 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -551,8 +551,7 @@ int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf,
else
set_bit(RAMROD_COMP_WAIT, &mcast.ramrod_flags);
if (mc_num) {
- mc = kzalloc_objs(struct bnx2x_mcast_list_elem, mc_num,
- GFP_KERNEL);
+ mc = kzalloc_objs(struct bnx2x_mcast_list_elem, mc_num);
if (!mc) {
BNX2X_ERR("Cannot Configure multicasts due to lack of memory\n");
return -ENOMEM;
@@ -1247,8 +1246,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
num_vfs_param, iov->nr_virtfn);
/* allocate the vf array */
- bp->vfdb->vfs = kzalloc_objs(struct bnx2x_virtf, BNX2X_NR_VIRTFN(bp),
- GFP_KERNEL);
+ bp->vfdb->vfs = kzalloc_objs(struct bnx2x_virtf, BNX2X_NR_VIRTFN(bp));
if (!bp->vfdb->vfs) {
BNX2X_ERR("failed to allocate vf array\n");
err = -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 37c02ed32ad5..c2f05a9abb88 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -3752,8 +3752,7 @@ static int bnxt_alloc_one_tpa_info(struct bnxt *bp,
struct rx_agg_cmp *agg;
int i;
- rxr->rx_tpa = kzalloc_objs(struct bnxt_tpa_info, bp->max_tpa,
- GFP_KERNEL);
+ rxr->rx_tpa = kzalloc_objs(struct bnxt_tpa_info, bp->max_tpa);
if (!rxr->rx_tpa)
return -ENOMEM;
@@ -4083,8 +4082,7 @@ static int bnxt_alloc_cp_arrays(struct bnxt_cp_ring_info *cpr, int n)
cpr->cp_desc_ring = kzalloc_objs(*cpr->cp_desc_ring, n);
if (!cpr->cp_desc_ring)
return -ENOMEM;
- cpr->cp_desc_mapping = kzalloc_objs(*cpr->cp_desc_mapping, n,
- GFP_KERNEL);
+ cpr->cp_desc_mapping = kzalloc_objs(*cpr->cp_desc_mapping, n);
if (!cpr->cp_desc_mapping)
return -ENOMEM;
return 0;
@@ -4664,8 +4662,7 @@ static int bnxt_alloc_vnics(struct bnxt *bp)
if (BNXT_CHIP_TYPE_NITRO_A0(bp))
num_vnics++;
- bp->vnic_info = kzalloc_objs(struct bnxt_vnic_info, num_vnics,
- GFP_KERNEL);
+ bp->vnic_info = kzalloc_objs(struct bnxt_vnic_info, num_vnics);
if (!bp->vnic_info)
return -ENOMEM;
@@ -9043,8 +9040,7 @@ static int bnxt_alloc_ctx_pg_tbls(struct bnxt *bp,
int nr_tbls, i;
rmem->depth = 2;
- ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES,
- GFP_KERNEL);
+ ctx_pg->ctx_pg_tbl = kzalloc_objs(ctx_pg, MAX_CTX_PAGES);
if (!ctx_pg->ctx_pg_tbl)
return -ENOMEM;
nr_tbls = DIV_ROUND_UP(ctx_pg->nr_pages, MAX_CTX_PAGES);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
index e0b9b55c0d3c..e1e82a72cf1b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c
@@ -333,8 +333,7 @@ void bnxt_ulp_irq_restart(struct bnxt *bp, int err)
return;
if (!err) {
- ent = kzalloc_objs(*ent, ulp->msix_requested,
- GFP_KERNEL);
+ ent = kzalloc_objs(*ent, ulp->msix_requested);
if (!ent)
return;
bnxt_fill_msix_vecs(bp, ent);
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 7fb78df3d8ab..51addf829188 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -1261,13 +1261,11 @@ static int cnic_alloc_bnx2x_resc(struct cnic_dev *dev)
cp->fcoe_init_cid = 0x10;
}
- cp->iscsi_tbl = kzalloc_objs(struct cnic_iscsi, MAX_ISCSI_TBL_SZ,
- GFP_KERNEL);
+ cp->iscsi_tbl = kzalloc_objs(struct cnic_iscsi, MAX_ISCSI_TBL_SZ);
if (!cp->iscsi_tbl)
goto error;
- cp->ctx_tbl = kzalloc_objs(struct cnic_context, cp->max_cid_space,
- GFP_KERNEL);
+ cp->ctx_tbl = kzalloc_objs(struct cnic_context, cp->max_cid_space);
if (!cp->ctx_tbl)
goto error;
@@ -4105,8 +4103,7 @@ static int cnic_cm_alloc_mem(struct cnic_dev *dev)
u32 port_id;
int i;
- cp->csk_tbl = kvzalloc_objs(struct cnic_sock, MAX_CM_SK_TBL_SZ,
- GFP_KERNEL);
+ cp->csk_tbl = kvzalloc_objs(struct cnic_sock, MAX_CM_SK_TBL_SZ);
if (!cp->csk_tbl)
return -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index a6f8805e1932..a71cd729fde6 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3083,8 +3083,7 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv, bool flush_rx)
/* Initialize common Rx ring structures */
priv->rx_bds = priv->base + priv->hw_params->rdma_offset;
priv->num_rx_bds = TOTAL_DESC;
- priv->rx_cbs = kzalloc_objs(struct enet_cb, priv->num_rx_bds,
- GFP_KERNEL);
+ priv->rx_cbs = kzalloc_objs(struct enet_cb, priv->num_rx_bds);
if (!priv->rx_cbs)
return -ENOMEM;
@@ -3096,8 +3095,7 @@ static int bcmgenet_init_dma(struct bcmgenet_priv *priv, bool flush_rx)
/* Initialize common TX ring structures */
priv->tx_bds = priv->base + priv->hw_params->tdma_offset;
priv->num_tx_bds = TOTAL_DESC;
- priv->tx_cbs = kzalloc_objs(struct enet_cb, priv->num_tx_bds,
- GFP_KERNEL);
+ priv->tx_cbs = kzalloc_objs(struct enet_cb, priv->num_tx_bds);
if (!priv->tx_cbs) {
kfree(priv->rx_cbs);
return -ENOMEM;
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 4787ea610edc..a8dca32ba877 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -642,8 +642,7 @@ static void sbdma_initctx(struct sbmacdma *d, struct sbmac_softc *s, int chan,
* And context table
*/
- d->sbdma_ctxtable = kzalloc_objs(*d->sbdma_ctxtable, d->sbdma_maxdescr,
- GFP_KERNEL);
+ d->sbdma_ctxtable = kzalloc_objs(*d->sbdma_ctxtable, d->sbdma_maxdescr);
#ifdef CONFIG_SBMAC_COALESCE
/*
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 5018cc5f6393..5743c9a98005 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -1345,8 +1345,7 @@ bnad_mem_alloc(struct bnad *bnad,
return 0;
}
- mem_info->mdl = kzalloc_objs(struct bna_mem_descr, mem_info->num,
- GFP_KERNEL);
+ mem_info->mdl = kzalloc_objs(struct bna_mem_descr, mem_info->num);
if (mem_info->mdl == NULL)
return -ENOMEM;
diff --git a/drivers/net/ethernet/calxeda/xgmac.c b/drivers/net/ethernet/calxeda/xgmac.c
index 283948d784da..ef5174eb01ec 100644
--- a/drivers/net/ethernet/calxeda/xgmac.c
+++ b/drivers/net/ethernet/calxeda/xgmac.c
@@ -729,8 +729,7 @@ static int xgmac_dma_desc_rings_init(struct net_device *dev)
netdev_dbg(priv->dev, "mtu [%d] bfsize [%d]\n", dev->mtu, bfsize);
- priv->rx_skbuff = kzalloc_objs(struct sk_buff *, DMA_RX_RING_SZ,
- GFP_KERNEL);
+ priv->rx_skbuff = kzalloc_objs(struct sk_buff *, DMA_RX_RING_SZ);
if (!priv->rx_skbuff)
return -ENOMEM;
@@ -742,8 +741,7 @@ static int xgmac_dma_desc_rings_init(struct net_device *dev)
if (!priv->dma_rx)
goto err_dma_rx;
- priv->tx_skbuff = kzalloc_objs(struct sk_buff *, DMA_TX_RING_SZ,
- GFP_KERNEL);
+ priv->tx_skbuff = kzalloc_objs(struct sk_buff *, DMA_TX_RING_SZ);
if (!priv->tx_skbuff)
goto err_tx_skb;
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c
index a74d0205efda..6062497827ac 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_core.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c
@@ -107,10 +107,8 @@ int lio_setup_glists(struct octeon_device *oct, struct lio *lio, int num_iqs)
/* allocate memory to store virtual and dma base address of
* per glist consistent memory
*/
- lio->glists_virt_base = kzalloc_objs(*lio->glists_virt_base, num_iqs,
- GFP_KERNEL);
- lio->glists_dma_base = kzalloc_objs(*lio->glists_dma_base, num_iqs,
- GFP_KERNEL);
+ lio->glists_virt_base = kzalloc_objs(*lio->glists_virt_base, num_iqs);
+ lio->glists_dma_base = kzalloc_objs(*lio->glists_dma_base, num_iqs);
if (!lio->glists_virt_base || !lio->glists_dma_base) {
lio_delete_glists(lio);
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
index 7db3dbc488a7..0092bc16f887 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
@@ -2254,8 +2254,7 @@ int cxgb4_init_ethtool_filters(struct adapter *adap)
if (!eth_filter)
return -ENOMEM;
- eth_filter_info = kzalloc_objs(*eth_filter_info, adap->params.nports,
- GFP_KERNEL);
+ eth_filter_info = kzalloc_objs(*eth_filter_info, adap->params.nports);
if (!eth_filter_info) {
ret = -ENOMEM;
goto free_eth_filter;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 701936b28167..0055ca7236e1 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5021,8 +5021,7 @@ static int adap_init0(struct adapter *adap, int vpd_skip)
adap->sge.egr_sz = val[0] - adap->sge.egr_start + 1;
adap->sge.ingr_sz = val[1] - adap->sge.ingr_start + 1;
- adap->sge.egr_map = kzalloc_objs(*adap->sge.egr_map, adap->sge.egr_sz,
- GFP_KERNEL);
+ adap->sge.egr_map = kzalloc_objs(*adap->sge.egr_map, adap->sge.egr_sz);
if (!adap->sge.egr_map) {
ret = -ENOMEM;
goto bye;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
index 104d92a3db28..bc290430245e 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_matchall.c
@@ -535,8 +535,7 @@ int cxgb4_init_tc_matchall(struct adapter *adap)
if (!tc_matchall)
return -ENOMEM;
- tc_port_matchall = kzalloc_objs(*tc_port_matchall, adap->params.nports,
- GFP_KERNEL);
+ tc_port_matchall = kzalloc_objs(*tc_port_matchall, adap->params.nports);
if (!tc_port_matchall) {
ret = -ENOMEM;
goto out_free_matchall;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
index 724cd8be1003..b826eb2827aa 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
@@ -658,8 +658,7 @@ int cxgb4_init_tc_mqprio(struct adapter *adap)
if (!tc_mqprio)
return -ENOMEM;
- tc_port_mqprio = kzalloc_objs(*tc_port_mqprio, adap->params.nports,
- GFP_KERNEL);
+ tc_port_mqprio = kzalloc_objs(*tc_port_mqprio, adap->params.nports);
if (!tc_port_mqprio) {
ret = -ENOMEM;
goto out_free_mqprio;
@@ -670,8 +669,7 @@ int cxgb4_init_tc_mqprio(struct adapter *adap)
tc_mqprio->port_mqprio = tc_port_mqprio;
for (i = 0; i < adap->params.nports; i++) {
port_mqprio = &tc_mqprio->port_mqprio[i];
- eosw_txq = kzalloc_objs(*eosw_txq, adap->tids.neotids,
- GFP_KERNEL);
+ eosw_txq = kzalloc_objs(*eosw_txq, adap->tids.neotids);
if (!eosw_txq) {
ret = -ENOMEM;
goto out_free_ports;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
index 1b91c3448f22..23244cdfc1bc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c
@@ -488,8 +488,7 @@ setup_sge_txq_uld(struct adapter *adap, unsigned int uld_type,
i = min_t(int, uld_info->ntxq, num_online_cpus());
txq_info->ntxq = roundup(i, adap->params.nports);
}
- txq_info->uldtxq = kzalloc_objs(struct sge_uld_txq, txq_info->ntxq,
- GFP_KERNEL);
+ txq_info->uldtxq = kzalloc_objs(struct sge_uld_txq, txq_info->ntxq);
if (!txq_info->uldtxq) {
kfree(txq_info);
return -ENOMEM;
@@ -528,13 +527,11 @@ int t4_uld_mem_alloc(struct adapter *adap)
if (!adap->uld)
return -ENOMEM;
- s->uld_rxq_info = kzalloc_objs(struct sge_uld_rxq_info *, CXGB4_ULD_MAX,
- GFP_KERNEL);
+ s->uld_rxq_info = kzalloc_objs(struct sge_uld_rxq_info *, CXGB4_ULD_MAX);
if (!s->uld_rxq_info)
goto err_uld;
- s->uld_txq_info = kzalloc_objs(struct sge_uld_txq_info *, CXGB4_TX_MAX,
- GFP_KERNEL);
+ s->uld_txq_info = kzalloc_objs(struct sge_uld_txq_info *, CXGB4_TX_MAX);
if (!s->uld_txq_info)
goto err_uld_rx;
return 0;
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 2b812dd1b9ce..bfc76b5f5350 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2473,18 +2473,15 @@ static int enic_alloc_enic_resources(struct enic *enic)
if (!enic->napi)
goto free_queues;
- enic->msix_entry = kzalloc_objs(struct msix_entry, enic->intr_avail,
- GFP_KERNEL);
+ enic->msix_entry = kzalloc_objs(struct msix_entry, enic->intr_avail);
if (!enic->msix_entry)
goto free_queues;
- enic->msix = kzalloc_objs(struct enic_msix_entry, enic->intr_avail,
- GFP_KERNEL);
+ enic->msix = kzalloc_objs(struct enic_msix_entry, enic->intr_avail);
if (!enic->msix)
goto free_queues;
- enic->intr = kzalloc_objs(struct vnic_intr, enic->intr_avail,
- GFP_KERNEL);
+ enic->intr = kzalloc_objs(struct vnic_intr, enic->intr_avail);
if (!enic->intr)
goto free_queues;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 4940b40f472d..ed302f5ec476 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4685,13 +4685,11 @@ static int be_if_create(struct be_adapter *adapter)
if (!adapter->pmac_id)
return -ENOMEM;
- adapter->mc_list = kzalloc_objs(*adapter->mc_list, be_max_mc(adapter),
- GFP_KERNEL);
+ adapter->mc_list = kzalloc_objs(*adapter->mc_list, be_max_mc(adapter));
if (!adapter->mc_list)
return -ENOMEM;
- adapter->uc_list = kzalloc_objs(*adapter->uc_list, be_max_uc(adapter),
- GFP_KERNEL);
+ adapter->uc_list = kzalloc_objs(*adapter->uc_list, be_max_uc(adapter));
if (!adapter->uc_list)
return -ENOMEM;
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index b91687c55a65..91adbb5cba92 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -3408,15 +3408,13 @@ static int dpaa2_switch_probe(struct fsl_mc_device *sw_dev)
if (err)
goto err_free_cmdport;
- ethsw->ports = kzalloc_objs(*ethsw->ports, ethsw->sw_attr.num_ifs,
- GFP_KERNEL);
+ ethsw->ports = kzalloc_objs(*ethsw->ports, ethsw->sw_attr.num_ifs);
if (!(ethsw->ports)) {
err = -ENOMEM;
goto err_teardown;
}
- ethsw->fdbs = kzalloc_objs(*ethsw->fdbs, ethsw->sw_attr.num_ifs,
- GFP_KERNEL);
+ ethsw->fdbs = kzalloc_objs(*ethsw->fdbs, ethsw->sw_attr.num_ifs);
if (!ethsw->fdbs) {
err = -ENOMEM;
goto err_free_ports;
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 7cad3da8a243..70768392912c 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -2562,8 +2562,7 @@ int enetc_alloc_si_resources(struct enetc_ndev_priv *priv)
{
struct enetc_si *si = priv->si;
- priv->cls_rules = kzalloc_objs(*priv->cls_rules, si->num_fs_entries,
- GFP_KERNEL);
+ priv->cls_rules = kzalloc_objs(*priv->cls_rules, si->num_fs_entries);
if (!priv->cls_rules)
return -ENOMEM;
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index a363817993ab..c0a495e2a6bd 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -413,8 +413,7 @@ static int gfar_alloc_tx_queues(struct gfar_private *priv)
int i;
for (i = 0; i < priv->num_tx_queues; i++) {
- priv->tx_queue[i] = kzalloc_obj(struct gfar_priv_tx_q,
- GFP_KERNEL);
+ priv->tx_queue[i] = kzalloc_obj(struct gfar_priv_tx_q);
if (!priv->tx_queue[i])
return -ENOMEM;
@@ -431,8 +430,7 @@ static int gfar_alloc_rx_queues(struct gfar_private *priv)
int i;
for (i = 0; i < priv->num_rx_queues; i++) {
- priv->rx_queue[i] = kzalloc_obj(struct gfar_priv_rx_q,
- GFP_KERNEL);
+ priv->rx_queue[i] = kzalloc_obj(struct gfar_priv_rx_q);
if (!priv->rx_queue[i])
return -ENOMEM;
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 08f55f437c99..dc2213b5ce24 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -176,8 +176,7 @@ gve_get_ethtool_stats(struct net_device *netdev,
priv = netdev_priv(netdev);
num_tx_queues = gve_num_tx_queues(priv);
report_stats = priv->stats_report->stats;
- rx_qid_to_stats_idx = kmalloc_objs(int, priv->rx_cfg.num_queues,
- GFP_KERNEL);
+ rx_qid_to_stats_idx = kmalloc_objs(int, priv->rx_cfg.num_queues);
if (!rx_qid_to_stats_idx)
return;
for (ring = 0; ring < priv->rx_cfg.num_queues; ring++) {
diff --git a/drivers/net/ethernet/google/gve/gve_main.c b/drivers/net/ethernet/google/gve/gve_main.c
index 4eebbeb29bee..9d4ef4d42be3 100644
--- a/drivers/net/ethernet/google/gve/gve_main.c
+++ b/drivers/net/ethernet/google/gve/gve_main.c
@@ -666,8 +666,7 @@ static int gve_setup_device_resources(struct gve_priv *priv)
}
if (!gve_is_gqi(priv)) {
- priv->ptype_lut_dqo = kvzalloc_obj(*priv->ptype_lut_dqo,
- GFP_KERNEL);
+ priv->ptype_lut_dqo = kvzalloc_obj(*priv->ptype_lut_dqo);
if (!priv->ptype_lut_dqo) {
err = -ENOMEM;
goto abort_with_stats_report;
diff --git a/drivers/net/ethernet/google/gve/gve_rx.c b/drivers/net/ethernet/google/gve/gve_rx.c
index 197513da0fe5..4eb6ed29d3cc 100644
--- a/drivers/net/ethernet/google/gve/gve_rx.c
+++ b/drivers/net/ethernet/google/gve/gve_rx.c
@@ -390,8 +390,7 @@ int gve_rx_alloc_rings_gqi(struct gve_priv *priv,
int err = 0;
int i, j;
- rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues,
- GFP_KERNEL);
+ rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues);
if (!rx)
return -ENOMEM;
diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
index 282c10e50d53..c706c7932159 100644
--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
@@ -320,8 +320,7 @@ int gve_rx_alloc_rings_dqo(struct gve_priv *priv,
int err;
int i;
- rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues,
- GFP_KERNEL);
+ rx = kvzalloc_objs(struct gve_rx_ring, cfg->qcfg_rx->max_queues);
if (!rx)
return -ENOMEM;
diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c
index d2023cee1f35..0b856e269eac 100644
--- a/drivers/net/ethernet/google/gve/gve_tx.c
+++ b/drivers/net/ethernet/google/gve/gve_tx.c
@@ -345,8 +345,7 @@ int gve_tx_alloc_rings_gqi(struct gve_priv *priv,
return -EINVAL;
}
- tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues,
- GFP_KERNEL);
+ tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues);
if (!tx)
return -ENOMEM;
diff --git a/drivers/net/ethernet/google/gve/gve_tx_dqo.c b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
index 44980f61e330..529ab21a3b56 100644
--- a/drivers/net/ethernet/google/gve/gve_tx_dqo.c
+++ b/drivers/net/ethernet/google/gve/gve_tx_dqo.c
@@ -416,8 +416,7 @@ int gve_tx_alloc_rings_dqo(struct gve_priv *priv,
return -EINVAL;
}
- tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues,
- GFP_KERNEL);
+ tx = kvzalloc_objs(struct gve_tx_ring, cfg->qcfg->max_queues);
if (!tx)
return -ENOMEM;
diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c
index 5c3b4eaf144b..f7653aa9a24a 100644
--- a/drivers/net/ethernet/hisilicon/hns/hnae.c
+++ b/drivers/net/ethernet/hisilicon/hns/hnae.c
@@ -208,8 +208,7 @@ hnae_init_ring(struct hnae_queue *q, struct hnae_ring *ring, int flags)
assert(ring->next_to_use == 0);
assert(ring->next_to_clean == 0);
- ring->desc_cb = kzalloc_objs(ring->desc_cb[0], ring->desc_num,
- GFP_KERNEL);
+ ring->desc_cb = kzalloc_objs(ring->desc_cb[0], ring->desc_num);
if (!ring->desc_cb) {
ret = -ENOMEM;
goto out;
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c b/drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c
index 11b16799103d..bc5b80c31693 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.c
@@ -614,8 +614,7 @@ static int init_cmdq(struct hinic3_cmdq *cmdq, struct hinic3_hwdev *hwdev,
spin_lock_init(&cmdq->cmdq_lock);
- cmdq->cmd_infos = kzalloc_objs(*cmdq->cmd_infos, cmdq->wq.q_depth,
- GFP_KERNEL);
+ cmdq->cmd_infos = kzalloc_objs(*cmdq->cmd_infos, cmdq->wq.q_depth);
if (!cmdq->cmd_infos) {
err = -ENOMEM;
return err;
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
index 7830bff30859..8a1ad3ed42bd 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_netdev_ops.c
@@ -138,8 +138,7 @@ static int hinic3_alloc_txrxq_resources(struct net_device *netdev,
goto err_free_txqs_res_arr;
}
- q_params->irq_cfg = kzalloc_objs(*q_params->irq_cfg, q_params->num_qps,
- GFP_KERNEL);
+ q_params->irq_cfg = kzalloc_objs(*q_params->irq_cfg, q_params->num_qps);
if (!q_params->irq_cfg) {
err = -ENOMEM;
goto err_free_rxqs_res_arr;
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c b/drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c
index 9c00d1ed825a..4ac3ad681ffa 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_queue_common.c
@@ -44,8 +44,7 @@ int hinic3_queue_pages_alloc(struct hinic3_hwdev *hwdev,
u32 pg_idx;
int err;
- qpages->pages = kzalloc_objs(qpages->pages[0], qpages->num_pages,
- GFP_KERNEL);
+ qpages->pages = kzalloc_objs(qpages->pages[0], qpages->num_pages);
if (!qpages->pages)
return -ENOMEM;
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
index fa3e6b3488fd..1236ec233b7f 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_rx.c
@@ -419,8 +419,7 @@ int hinic3_alloc_rxqs_res(struct net_device *netdev, u16 num_rq,
for (idx = 0; idx < num_rq; idx++) {
rqres = &rxqs_res[idx];
- rqres->rx_info = kzalloc_objs(*rqres->rx_info, rq_depth,
- GFP_KERNEL);
+ rqres->rx_info = kzalloc_objs(*rqres->rx_info, rq_depth);
if (!rqres->rx_info)
goto err_free_rqres;
diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
index 3bef50ca4432..a25fd8799a2f 100644
--- a/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
+++ b/drivers/net/ethernet/huawei/hinic3/hinic3_tx.c
@@ -681,8 +681,7 @@ int hinic3_alloc_txqs_res(struct net_device *netdev, u16 num_sq,
for (idx = 0; idx < num_sq; idx++) {
tqres = &txqs_res[idx];
- tqres->tx_info = kzalloc_objs(*tqres->tx_info, sq_depth,
- GFP_KERNEL);
+ tqres->tx_info = kzalloc_objs(*tqres->tx_info, sq_depth);
if (!tqres->tx_info)
goto err_free_tqres;
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 2aeea250a49b..37d8523ac05b 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1094,8 +1094,7 @@ static int init_rx_pools(struct net_device *netdev)
/* Allocate/populate the pools. */
release_rx_pools(adapter);
- adapter->rx_pool = kzalloc_objs(struct ibmvnic_rx_pool, num_pools,
- GFP_KERNEL);
+ adapter->rx_pool = kzalloc_objs(struct ibmvnic_rx_pool, num_pools);
if (!adapter->rx_pool) {
dev_err(dev, "Failed to allocate rx pools\n");
return -ENOMEM;
@@ -1238,8 +1237,7 @@ static int init_one_tx_pool(struct net_device *netdev,
{
int i;
- tx_pool->tx_buff = kzalloc_objs(struct ibmvnic_tx_buff, pool_size,
- GFP_KERNEL);
+ tx_pool->tx_buff = kzalloc_objs(struct ibmvnic_tx_buff, pool_size);
if (!tx_pool->tx_buff)
return -ENOMEM;
@@ -1335,13 +1333,11 @@ static int init_tx_pools(struct net_device *netdev)
pool_size = adapter->req_tx_entries_per_subcrq;
num_pools = adapter->num_active_tx_scrqs;
- adapter->tx_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools,
- GFP_KERNEL);
+ adapter->tx_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools);
if (!adapter->tx_pool)
return -ENOMEM;
- adapter->tso_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools,
- GFP_KERNEL);
+ adapter->tso_pool = kzalloc_objs(struct ibmvnic_tx_pool, num_pools);
/* To simplify release_tx_pools() ensure that ->tx_pool and
* ->tso_pool are either both NULL or both non-NULL.
*/
@@ -1465,8 +1461,7 @@ static int init_napi(struct ibmvnic_adapter *adapter)
{
int i;
- adapter->napi = kzalloc_objs(struct napi_struct, adapter->req_rx_queues,
- GFP_KERNEL);
+ adapter->napi = kzalloc_objs(struct napi_struct, adapter->req_rx_queues);
if (!adapter->napi)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
index 132644a387ef..ab232b3fbbd0 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_ethtool.c
@@ -582,13 +582,11 @@ static int e1000_set_ringparam(struct net_device *netdev,
rx_old = adapter->rx_ring;
err = -ENOMEM;
- txdr = kzalloc_objs(struct e1000_tx_ring, adapter->num_tx_queues,
- GFP_KERNEL);
+ txdr = kzalloc_objs(struct e1000_tx_ring, adapter->num_tx_queues);
if (!txdr)
goto err_alloc_tx;
- rxdr = kzalloc_objs(struct e1000_rx_ring, adapter->num_rx_queues,
- GFP_KERNEL);
+ rxdr = kzalloc_objs(struct e1000_rx_ring, adapter->num_rx_queues);
if (!rxdr)
goto err_alloc_rx;
@@ -984,8 +982,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
if (!txdr->count)
txdr->count = E1000_DEFAULT_TXD;
- txdr->buffer_info = kzalloc_objs(struct e1000_tx_buffer, txdr->count,
- GFP_KERNEL);
+ txdr->buffer_info = kzalloc_objs(struct e1000_tx_buffer, txdr->count);
if (!txdr->buffer_info) {
ret_val = 1;
goto err_nomem;
@@ -1043,8 +1040,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
if (!rxdr->count)
rxdr->count = E1000_DEFAULT_RXD;
- rxdr->buffer_info = kzalloc_objs(struct e1000_rx_buffer, rxdr->count,
- GFP_KERNEL);
+ rxdr->buffer_info = kzalloc_objs(struct e1000_rx_buffer, rxdr->count);
if (!rxdr->buffer_info) {
ret_val = 5;
goto err_nomem;
diff --git a/drivers/net/ethernet/intel/e1000e/ethtool.c b/drivers/net/ethernet/intel/e1000e/ethtool.c
index 21094a03189a..dbed30943ef4 100644
--- a/drivers/net/ethernet/intel/e1000e/ethtool.c
+++ b/drivers/net/ethernet/intel/e1000e/ethtool.c
@@ -1173,8 +1173,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
if (!tx_ring->count)
tx_ring->count = E1000_DEFAULT_TXD;
- tx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, tx_ring->count,
- GFP_KERNEL);
+ tx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, tx_ring->count);
if (!tx_ring->buffer_info) {
ret_val = 1;
goto err_nomem;
@@ -1234,8 +1233,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
if (!rx_ring->count)
rx_ring->count = E1000_DEFAULT_RXD;
- rx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, rx_ring->count,
- GFP_KERNEL);
+ rx_ring->buffer_info = kzalloc_objs(struct e1000_buffer, rx_ring->count);
if (!rx_ring->buffer_info) {
ret_val = 5;
goto err_nomem;
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 9fee3a511e4b..898deb3f11c4 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -1825,8 +1825,7 @@ static int fm10k_init_msix_capability(struct fm10k_intfc *interface)
v_budget = min_t(int, v_budget, hw->mac.max_msix_vectors);
/* A failure in MSI-X entry allocation is fatal. */
- interface->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
- GFP_KERNEL);
+ interface->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
if (!interface->msix_entries)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 7b9aa330e220..0b52509cb14c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -983,8 +983,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
int i, ret;
u16 switch_id;
- bw_data = kzalloc_obj(struct i40e_aqc_query_port_ets_config_resp,
- GFP_KERNEL);
+ bw_data = kzalloc_obj(struct i40e_aqc_query_port_ets_config_resp);
if (!bw_data) {
ret = -ENOMEM;
goto command_write_done;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4b299142e4b9..21c666dbb129 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2120,8 +2120,7 @@ static int i40e_set_ringparam(struct net_device *netdev,
netdev_info(netdev,
"Changing Tx descriptor count from %d to %d.\n",
vsi->tx_rings[0]->count, new_tx_count);
- tx_rings = kzalloc_objs(struct i40e_ring, tx_alloc_queue_pairs,
- GFP_KERNEL);
+ tx_rings = kzalloc_objs(struct i40e_ring, tx_alloc_queue_pairs);
if (!tx_rings) {
err = -ENOMEM;
goto done;
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 9841c65f3790..bceaf4b1b85d 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -1585,12 +1585,10 @@ static int iavf_alloc_queues(struct iavf_adapter *adapter)
(int)(num_online_cpus()));
- adapter->tx_rings = kzalloc_objs(struct iavf_ring, num_active_queues,
- GFP_KERNEL);
+ adapter->tx_rings = kzalloc_objs(struct iavf_ring, num_active_queues);
if (!adapter->tx_rings)
goto err_out;
- adapter->rx_rings = kzalloc_objs(struct iavf_ring, num_active_queues,
- GFP_KERNEL);
+ adapter->rx_rings = kzalloc_objs(struct iavf_ring, num_active_queues);
if (!adapter->rx_rings)
goto err_out;
@@ -1653,8 +1651,7 @@ static int iavf_set_interrupt_capability(struct iavf_adapter *adapter)
v_budget = min_t(int, pairs + NONQ_VECS,
(int)adapter->vf_res->max_vectors);
- adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
- GFP_KERNEL);
+ adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
if (!adapter->msix_entries) {
err = -ENOMEM;
goto out;
diff --git a/drivers/net/ethernet/intel/ice/ice_arfs.c b/drivers/net/ethernet/intel/ice/ice_arfs.c
index 7f2bef053703..53b6e2b09eb9 100644
--- a/drivers/net/ethernet/intel/ice/ice_arfs.c
+++ b/drivers/net/ethernet/intel/ice/ice_arfs.c
@@ -538,8 +538,7 @@ static int ice_init_arfs_cntrs(struct ice_vsi *vsi)
if (!vsi->arfs_fltr_cntrs)
return -ENOMEM;
- vsi->arfs_last_fltr_id = kzalloc_obj(*vsi->arfs_last_fltr_id,
- GFP_KERNEL);
+ vsi->arfs_last_fltr_id = kzalloc_obj(*vsi->arfs_last_fltr_id);
if (!vsi->arfs_last_fltr_id) {
kfree(vsi->arfs_fltr_cntrs);
vsi->arfs_fltr_cntrs = NULL;
@@ -561,8 +560,7 @@ void ice_init_arfs(struct ice_vsi *vsi)
if (!vsi || vsi->type != ICE_VSI_PF || ice_is_arfs_active(vsi))
return;
- arfs_fltr_list = kzalloc_objs(*arfs_fltr_list, ICE_MAX_ARFS_LIST,
- GFP_KERNEL);
+ arfs_fltr_list = kzalloc_objs(*arfs_fltr_list, ICE_MAX_ARFS_LIST);
if (!arfs_fltr_list)
return;
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index 9bb07355bf28..6cd63190f55d 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1103,8 +1103,7 @@ int ice_init_hw(struct ice_hw *hw)
/* Get MAC information */
/* A single port can report up to two (LAN and WoL) addresses */
- mac_buf = kzalloc_objs(struct ice_aqc_manage_mac_read_resp, 2,
- GFP_KERNEL);
+ mac_buf = kzalloc_objs(struct ice_aqc_manage_mac_read_resp, 2);
if (!mac_buf) {
status = -ENOMEM;
goto err_unroll_fltr_mgmt_struct;
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index bd0134b6e920..f91f8b672b02 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -538,14 +538,12 @@ static int ice_vsi_alloc_stat_arrays(struct ice_vsi *vsi)
return -ENOMEM;
vsi_stat->tx_ring_stats =
- kzalloc_objs(*vsi_stat->tx_ring_stats, vsi->alloc_txq,
- GFP_KERNEL);
+ kzalloc_objs(*vsi_stat->tx_ring_stats, vsi->alloc_txq);
if (!vsi_stat->tx_ring_stats)
goto err_alloc_tx;
vsi_stat->rx_ring_stats =
- kzalloc_objs(*vsi_stat->rx_ring_stats, vsi->alloc_rxq,
- GFP_KERNEL);
+ kzalloc_objs(*vsi_stat->rx_ring_stats, vsi->alloc_rxq);
if (!vsi_stat->rx_ring_stats)
goto err_alloc_rx;
@@ -3104,8 +3102,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, u32 vsi_flags)
if (ret)
goto unlock;
- coalesce = kzalloc_objs(struct ice_coalesce_stored, vsi->num_q_vectors,
- GFP_KERNEL);
+ coalesce = kzalloc_objs(struct ice_coalesce_stored, vsi->num_q_vectors);
if (!coalesce) {
ret = -ENOMEM;
goto decfg;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_controlq.c b/drivers/net/ethernet/intel/idpf/idpf_controlq.c
index a964828ba46c..d2dde43269e9 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_controlq.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_controlq.c
@@ -159,8 +159,7 @@ int idpf_ctlq_add(struct idpf_hw *hw,
idpf_ctlq_init_rxq_bufs(cq);
} else {
/* Allocate the array of msg pointers for TX queues */
- cq->bi.tx_msg = kzalloc_objs(struct idpf_ctlq_msg *, qinfo->len,
- GFP_KERNEL);
+ cq->bi.tx_msg = kzalloc_objs(struct idpf_ctlq_msg *, qinfo->len);
if (!cq->bi.tx_msg) {
err = -ENOMEM;
goto init_dealloc_q_mem;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c b/drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
index dfdbfb89b090..d4d488c7cfd6 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_controlq_setup.c
@@ -40,8 +40,7 @@ static int idpf_ctlq_alloc_bufs(struct idpf_hw *hw,
/* We'll be allocating the buffer info memory first, then we can
* allocate the mapped buffers for the event processing
*/
- cq->bi.rx_buff = kzalloc_objs(struct idpf_dma_mem *, cq->ring_size,
- GFP_KERNEL);
+ cq->bi.rx_buff = kzalloc_objs(struct idpf_dma_mem *, cq->ring_size);
if (!cq->bi.rx_buff)
return -ENOMEM;
@@ -50,8 +49,7 @@ static int idpf_ctlq_alloc_bufs(struct idpf_hw *hw,
struct idpf_dma_mem *bi;
int num = 1; /* number of idpf_dma_mem to be allocated */
- cq->bi.rx_buff[i] = kzalloc_objs(struct idpf_dma_mem, num,
- GFP_KERNEL);
+ cq->bi.rx_buff[i] = kzalloc_objs(struct idpf_dma_mem, num);
if (!cq->bi.rx_buff[i])
goto unwind_alloc_cq_bufs;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_lib.c b/drivers/net/ethernet/intel/idpf/idpf_lib.c
index e17de31bb3bf..04fc8d309b04 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_lib.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_lib.c
@@ -369,8 +369,7 @@ int idpf_intr_req(struct idpf_adapter *adapter)
}
num_lan_vecs = actual_vecs - num_rdma_vecs;
- adapter->msix_entries = kzalloc_objs(struct msix_entry, num_lan_vecs,
- GFP_KERNEL);
+ adapter->msix_entries = kzalloc_objs(struct msix_entry, num_lan_vecs);
if (!adapter->msix_entries) {
err = -ENOMEM;
goto free_rdma_msix;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
index 3eeac3fa3b89..b3c0ae2ea6a3 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
@@ -183,8 +183,7 @@ static int idpf_tx_buf_alloc_all(struct idpf_tx_queue *tx_q)
tx_q->buf_pool_size = U16_MAX;
else
tx_q->buf_pool_size = tx_q->desc_count;
- tx_q->tx_buf = kzalloc_objs(*tx_q->tx_buf, tx_q->buf_pool_size,
- GFP_KERNEL);
+ tx_q->tx_buf = kzalloc_objs(*tx_q->tx_buf, tx_q->buf_pool_size);
if (!tx_q->tx_buf)
return -ENOMEM;
@@ -1710,8 +1709,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vport,
{
bool split, flow_sch_en;
- rsrc->txq_grps = kzalloc_objs(*rsrc->txq_grps, rsrc->num_txq_grp,
- GFP_KERNEL);
+ rsrc->txq_grps = kzalloc_objs(*rsrc->txq_grps, rsrc->num_txq_grp);
if (!rsrc->txq_grps)
return -ENOMEM;
@@ -1727,8 +1725,7 @@ static int idpf_txq_group_alloc(struct idpf_vport *vport,
tx_qgrp->num_txq = num_txq;
for (unsigned int j = 0; j < tx_qgrp->num_txq; j++) {
- tx_qgrp->txqs[j] = kzalloc_obj(*tx_qgrp->txqs[j],
- GFP_KERNEL);
+ tx_qgrp->txqs[j] = kzalloc_obj(*tx_qgrp->txqs[j]);
if (!tx_qgrp->txqs[j])
goto err_alloc;
}
@@ -1805,8 +1802,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
bool hs, rsc;
int err = 0;
- rsrc->rxq_grps = kzalloc_objs(struct idpf_rxq_group, rsrc->num_rxq_grp,
- GFP_KERNEL);
+ rsrc->rxq_grps = kzalloc_objs(struct idpf_rxq_group, rsrc->num_rxq_grp);
if (!rsrc->rxq_grps)
return -ENOMEM;
@@ -1820,8 +1816,7 @@ static int idpf_rxq_group_alloc(struct idpf_vport *vport,
if (!idpf_is_queue_model_split(rsrc->rxq_model)) {
rx_qgrp->singleq.num_rxq = num_rxq;
for (unsigned int j = 0; j < num_rxq; j++) {
- rx_qgrp->singleq.rxqs[j] = kzalloc_obj(*rx_qgrp->singleq.rxqs[j],
- GFP_KERNEL);
+ rx_qgrp->singleq.rxqs[j] = kzalloc_obj(*rx_qgrp->singleq.rxqs[j]);
if (!rx_qgrp->singleq.rxqs[j]) {
err = -ENOMEM;
goto err_alloc;
@@ -4592,21 +4587,18 @@ int idpf_vport_intr_alloc(struct idpf_vport *vport,
q_vector->rx_intr_mode = q_coal->rx_intr_mode;
q_vector->rx_itr_idx = VIRTCHNL2_ITR_IDX_0;
- q_vector->tx = kzalloc_objs(*q_vector->tx, txqs_per_vector,
- GFP_KERNEL);
+ q_vector->tx = kzalloc_objs(*q_vector->tx, txqs_per_vector);
if (!q_vector->tx)
goto error;
- q_vector->rx = kzalloc_objs(*q_vector->rx, rxqs_per_vector,
- GFP_KERNEL);
+ q_vector->rx = kzalloc_objs(*q_vector->rx, rxqs_per_vector);
if (!q_vector->rx)
goto error;
if (!idpf_is_queue_model_split(rsrc->rxq_model))
continue;
- q_vector->bufq = kzalloc_objs(*q_vector->bufq, bufqs_per_vector,
- GFP_KERNEL);
+ q_vector->bufq = kzalloc_objs(*q_vector->bufq, bufqs_per_vector);
if (!q_vector->bufq)
goto error;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
index cf655af6c4f0..412f71306406 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c
@@ -1290,8 +1290,7 @@ idpf_vport_init_queue_reg_chunks(struct idpf_vport_config *vport_config,
kfree(q_info->queue_chunks);
- q_info->queue_chunks = kzalloc_objs(*q_info->queue_chunks, num_chunks,
- GFP_KERNEL);
+ q_info->queue_chunks = kzalloc_objs(*q_info->queue_chunks, num_chunks);
if (!q_info->queue_chunks) {
q_info->num_chunks = 0;
return -ENOMEM;
@@ -3197,8 +3196,7 @@ static int idpf_send_get_rx_ptype_msg(struct idpf_adapter *adapter)
u16 next_ptype_id = 0;
ssize_t reply_sz;
- singleq_pt_lkup = kzalloc_objs(*singleq_pt_lkup, IDPF_RX_MAX_BASE_PTYPE,
- GFP_KERNEL);
+ singleq_pt_lkup = kzalloc_objs(*singleq_pt_lkup, IDPF_RX_MAX_BASE_PTYPE);
if (!singleq_pt_lkup)
return -ENOMEM;
@@ -3484,8 +3482,7 @@ int idpf_vc_core_init(struct idpf_adapter *adapter)
int err = 0;
if (!adapter->vcxn_mngr) {
- adapter->vcxn_mngr = kzalloc_obj(*adapter->vcxn_mngr,
- GFP_KERNEL);
+ adapter->vcxn_mngr = kzalloc_obj(*adapter->vcxn_mngr);
if (!adapter->vcxn_mngr) {
err = -ENOMEM;
goto init_failed;
@@ -3557,8 +3554,7 @@ restart:
pci_sriov_set_totalvfs(adapter->pdev, idpf_get_max_vfs(adapter));
num_max_vports = idpf_get_max_vports(adapter);
adapter->max_vports = num_max_vports;
- adapter->vports = kzalloc_objs(*adapter->vports, num_max_vports,
- GFP_KERNEL);
+ adapter->vports = kzalloc_objs(*adapter->vports, num_max_vports);
if (!adapter->vports)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
index 1c4ce3ac6bbf..d9bcc3f61c65 100644
--- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
+++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl_ptp.c
@@ -39,8 +39,7 @@ int idpf_ptp_get_caps(struct idpf_adapter *adapter)
u32 temp_offset;
int reply_sz;
- recv_ptp_caps_msg = kzalloc_obj(struct virtchnl2_ptp_get_caps,
- GFP_KERNEL);
+ recv_ptp_caps_msg = kzalloc_obj(struct virtchnl2_ptp_get_caps);
if (!recv_ptp_caps_msg)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e31072dd0863..27e5c2109138 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -4633,8 +4633,7 @@ static void igc_set_interrupt_capability(struct igc_adapter *adapter,
/* add 1 vector for link status interrupts */
numvecs++;
- adapter->msix_entries = kzalloc_objs(struct msix_entry, numvecs,
- GFP_KERNEL);
+ adapter->msix_entries = kzalloc_objs(struct msix_entry, numvecs);
if (!adapter->msix_entries)
return;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
index 0ecc4f7d0288..382d097e4b11 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c
@@ -516,8 +516,7 @@ static int ixgbe_dcbnl_ieee_setets(struct net_device *dev,
return -EINVAL;
if (!adapter->ixgbe_ieee_ets) {
- adapter->ixgbe_ieee_ets = kmalloc_obj(struct ieee_ets,
- GFP_KERNEL);
+ adapter->ixgbe_ieee_ets = kmalloc_obj(struct ieee_ets);
if (!adapter->ixgbe_ieee_ets)
return -ENOMEM;
@@ -593,8 +592,7 @@ static int ixgbe_dcbnl_ieee_setpfc(struct net_device *dev,
return -EINVAL;
if (!adapter->ixgbe_ieee_pfc) {
- adapter->ixgbe_ieee_pfc = kmalloc_obj(struct ieee_pfc,
- GFP_KERNEL);
+ adapter->ixgbe_ieee_pfc = kmalloc_obj(struct ieee_pfc);
if (!adapter->ixgbe_ieee_pfc)
return -ENOMEM;
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
index 030085d878d9..87abb36f50c1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
@@ -768,8 +768,7 @@ static int ixgbe_acquire_msix_vectors(struct ixgbe_adapter *adapter)
*/
vector_threshold = MIN_MSIX_COUNT;
- adapter->msix_entries = kzalloc_objs(struct msix_entry, vectors,
- GFP_KERNEL);
+ adapter->msix_entries = kzalloc_objs(struct msix_entry, vectors);
if (!adapter->msix_entries)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e0e6234000bc..1e3ad275b88c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6895,8 +6895,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
#endif /* IXGBE_FCOE */
/* initialize static ixgbe jump table entries */
- adapter->jump_tables[0] = kzalloc_obj(*adapter->jump_tables[0],
- GFP_KERNEL);
+ adapter->jump_tables[0] = kzalloc_obj(*adapter->jump_tables[0]);
if (!adapter->jump_tables[0])
return -ENOMEM;
adapter->jump_tables[0]->mat = ixgbe_ipv4_fields;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index e222627b7855..431d77da15a5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -64,8 +64,7 @@ static int __ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
IXGBE_FLAG_VMDQ_ENABLED;
/* Allocate memory for per VF control structures */
- adapter->vfinfo = kzalloc_objs(struct vf_data_storage, num_vfs,
- GFP_KERNEL);
+ adapter->vfinfo = kzalloc_objs(struct vf_data_storage, num_vfs);
if (!adapter->vfinfo)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 38af1f35b339..42f89a179a3f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2716,8 +2716,7 @@ static int ixgbevf_set_interrupt_capability(struct ixgbevf_adapter *adapter)
v_budget = min_t(int, v_budget, num_online_cpus());
v_budget += NON_Q_VECTORS;
- adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget,
- GFP_KERNEL);
+ adapter->msix_entries = kzalloc_objs(struct msix_entry, v_budget);
if (!adapter->msix_entries)
return -ENOMEM;
diff --git a/drivers/net/ethernet/intel/libie/fwlog.c b/drivers/net/ethernet/intel/libie/fwlog.c
index 5df25e5fbabd..fb61f98b8b30 100644
--- a/drivers/net/ethernet/intel/libie/fwlog.c
+++ b/drivers/net/ethernet/intel/libie/fwlog.c
@@ -838,8 +838,7 @@ static void libie_debugfs_fwlog_init(struct libie_fwlog *fwlog,
/* allocate space for this first because if it fails then we don't
* need to unwind
*/
- fw_modules = kzalloc_objs(*fw_modules, LIBIE_NR_FW_LOG_MODULES,
- GFP_KERNEL);
+ fw_modules = kzalloc_objs(*fw_modules, LIBIE_NR_FW_LOG_MODULES);
if (!fw_modules)
return;
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 58f77972c86a..d1b8650cb4b4 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -3151,8 +3151,7 @@ static int mvpp2_txq_init(struct mvpp2_port *port,
for (thread = 0; thread < port->priv->nthreads; thread++) {
txq_pcpu = per_cpu_ptr(txq->pcpu, thread);
txq_pcpu->size = txq->size;
- txq_pcpu->buffs = kmalloc_objs(*txq_pcpu->buffs, txq_pcpu->size,
- GFP_KERNEL);
+ txq_pcpu->buffs = kmalloc_objs(*txq_pcpu->buffs, txq_pcpu->size);
if (!txq_pcpu->buffs)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index 3dab841f64ff..ec55eb2a6c04 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -115,8 +115,7 @@ static int octep_enable_msix_range(struct octep_device *oct)
/* Generic interrupts apart from input/output queues */
num_msix = oct->num_oqs + CFG_GET_NON_IOQ_MSIX(oct->conf);
- oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix,
- GFP_KERNEL);
+ oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix);
if (!oct->msix_entries)
goto msix_alloc_err;
diff --git a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
index 4bf13cc76a9f..562fe945b422 100644
--- a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c
@@ -113,8 +113,7 @@ static int octep_vf_enable_msix_range(struct octep_vf_device *oct)
/* Generic interrupts apart from input/output queues */
//num_msix = oct->num_oqs + CFG_GET_NON_IOQ_MSIX(oct->conf);
num_msix = oct->num_oqs;
- oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix,
- GFP_KERNEL);
+ oct->msix_entries = kzalloc_objs(struct msix_entry, num_msix);
if (!oct->msix_entries)
goto msix_alloc_err;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index e8334a347960..29e7786c4434 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1945,8 +1945,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
/* CQ size of SQ */
qset->sqe_cnt = qset->sqe_cnt ? qset->sqe_cnt : Q_COUNT(Q_SIZE_4K);
- qset->cq = kzalloc_objs(struct otx2_cq_queue, pf->qset.cq_cnt,
- GFP_KERNEL);
+ qset->cq = kzalloc_objs(struct otx2_cq_queue, pf->qset.cq_cnt);
if (!qset->cq)
goto err_free_mem;
@@ -1955,8 +1954,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
if (!qset->sq)
goto err_free_mem;
- qset->rq = kzalloc_objs(struct otx2_rcv_queue, pf->hw.rx_queues,
- GFP_KERNEL);
+ qset->rq = kzalloc_objs(struct otx2_rcv_queue, pf->hw.rx_queues);
if (!qset->rq)
goto err_free_mem;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_counter.c b/drivers/net/ethernet/marvell/prestera/prestera_counter.c
index 89f0ac592d70..3a762d17ba6c 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_counter.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_counter.c
@@ -157,8 +157,7 @@ prestera_counter_block_get(struct prestera_counter *counter, u32 client)
if (err)
goto err_block;
- block->stats = kzalloc_objs(*block->stats, block->num_counters,
- GFP_KERNEL);
+ block->stats = kzalloc_objs(*block->stats, block->num_counters);
if (!block->stats) {
err = -ENOMEM;
goto err_stats;
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 27af9627394a..30facdece3e2 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -1601,8 +1601,7 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
if (!sky2->tx_le)
goto nomem;
- sky2->tx_ring = kzalloc_objs(struct tx_ring_info, sky2->tx_ring_size,
- GFP_KERNEL);
+ sky2->tx_ring = kzalloc_objs(struct tx_ring_info, sky2->tx_ring_size);
if (!sky2->tx_ring)
goto nomem;
@@ -1611,8 +1610,7 @@ static int sky2_alloc_buffers(struct sky2_port *sky2)
if (!sky2->rx_le)
goto nomem;
- sky2->rx_ring = kzalloc_objs(struct rx_ring_info, sky2->rx_pending,
- GFP_KERNEL);
+ sky2->rx_ring = kzalloc_objs(struct rx_ring_info, sky2->rx_pending);
if (!sky2->rx_ring)
goto nomem;
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index 4ed63950fd9d..7ed4452e20a9 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -594,8 +594,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
buf->nbufs = DIV_ROUND_UP(size, PAGE_SIZE);
buf->npages = buf->nbufs;
buf->page_shift = PAGE_SHIFT;
- buf->page_list = kzalloc_objs(*buf->page_list, buf->nbufs,
- GFP_KERNEL);
+ buf->page_list = kzalloc_objs(*buf->page_list, buf->nbufs);
if (!buf->page_list)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c
index 4872931eb118..3aa5765139d8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c
@@ -2368,8 +2368,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
struct mlx4_vf_admin_state *vf_admin;
priv->mfunc.master.slave_state =
- kzalloc_objs(struct mlx4_slave_state, dev->num_slaves,
- GFP_KERNEL);
+ kzalloc_objs(struct mlx4_slave_state, dev->num_slaves);
if (!priv->mfunc.master.slave_state)
goto err_comm;
@@ -2380,8 +2379,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
goto err_comm_admin;
priv->mfunc.master.vf_oper =
- kzalloc_objs(struct mlx4_vf_oper_state, dev->num_slaves,
- GFP_KERNEL);
+ kzalloc_objs(struct mlx4_vf_oper_state, dev->num_slaves);
if (!priv->mfunc.master.vf_oper)
goto err_comm_oper;
@@ -2405,8 +2403,7 @@ int mlx4_multi_func_init(struct mlx4_dev *dev)
struct mlx4_vport_state *oper_vport;
s_state->vlan_filter[port] =
- kzalloc_obj(struct mlx4_vlan_fltr,
- GFP_KERNEL);
+ kzalloc_obj(struct mlx4_vlan_fltr);
if (!s_state->vlan_filter[port]) {
if (--port)
kfree(s_state->vlan_filter[port]);
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 4e151865fa7b..b9b8142d99a3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -2245,8 +2245,7 @@ static int mlx4_en_copy_priv(struct mlx4_en_priv *dst,
if (!dst->tx_ring[t])
goto err_free_tx;
- dst->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS,
- GFP_KERNEL);
+ dst->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS);
if (!dst->tx_cq[t]) {
kfree(dst->tx_ring[t]);
goto err_free_tx;
@@ -3221,8 +3220,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
err = -ENOMEM;
goto out;
}
- priv->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS,
- GFP_KERNEL);
+ priv->tx_cq[t] = kzalloc_objs(struct mlx4_en_cq *, MAX_TX_RINGS);
if (!priv->tx_cq[t]) {
err = -ENOMEM;
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 982e9866d8e0..e6b7e75894ff 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -868,8 +868,7 @@ static int mlx4_slave_special_qp_cap(struct mlx4_dev *dev)
int i, err = 0;
func_cap = kzalloc_obj(*func_cap);
- caps->spec_qps = kzalloc_objs(*caps->spec_qps, caps->num_ports,
- GFP_KERNEL);
+ caps->spec_qps = kzalloc_objs(*caps->spec_qps, caps->num_ports);
if (!func_cap || !caps->spec_qps) {
mlx4_err(dev, "Failed to allocate memory for special qps cap\n");
@@ -3279,8 +3278,7 @@ static u64 mlx4_enable_sriov(struct mlx4_dev *dev, struct pci_dev *pdev,
MLX4_MAX_NUM_VF);
if (reset_flow) {
- dev->dev_vfs = kzalloc_objs(*dev->dev_vfs, total_vfs,
- GFP_KERNEL);
+ dev->dev_vfs = kzalloc_objs(*dev->dev_vfs, total_vfs);
if (!dev->dev_vfs)
goto free_mem;
return dev_flags;
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index 870f97c79991..cdd9023e860a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -524,8 +524,7 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
for (i = 0; i < MLX4_NUM_OF_RESOURCE_TYPE; i++) {
struct resource_allocator *res_alloc =
&priv->mfunc.master.res_tracker.res_alloc[i];
- res_alloc->quota = kmalloc_objs(int, dev->persist->num_vfs + 1,
- GFP_KERNEL);
+ res_alloc->quota = kmalloc_objs(int, dev->persist->num_vfs + 1);
res_alloc->guaranteed = kmalloc_objs(int,
dev->persist->num_vfs + 1,
GFP_KERNEL);
@@ -536,8 +535,7 @@ int mlx4_init_resource_tracker(struct mlx4_dev *dev)
GFP_KERNEL);
else
res_alloc->allocated =
- kzalloc_objs(int, dev->persist->num_vfs + 1,
- GFP_KERNEL);
+ kzalloc_objs(int, dev->persist->num_vfs + 1);
/* Reduce the sink counter */
if (i == RES_COUNTER)
res_alloc->res_free = dev->caps.max_counters - 1;
@@ -1238,8 +1236,7 @@ int mlx4_calc_vf_counters(struct mlx4_dev *dev, int slave, int port,
memset(data, 0, sizeof(*data));
- counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters,
- GFP_KERNEL);
+ counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters);
if (!counters_arr)
return -ENOMEM;
@@ -5185,8 +5182,7 @@ static void rem_slave_counters(struct mlx4_dev *dev, int slave)
mlx4_warn(dev, "rem_slave_counters: Could not move all counters - too busy for slave %d\n",
slave);
- counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters,
- GFP_KERNEL);
+ counters_arr = kmalloc_objs(*counters_arr, dev->caps.max_counters);
if (!counters_arr)
return;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
index d720bcd70373..1b2742174082 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/qos.c
@@ -277,8 +277,7 @@ int mlx5e_qos_alloc_queues(struct mlx5e_priv *priv, struct mlx5e_channels *chs)
for (i = 0; i < chs->num; i++) {
struct mlx5e_txqsq **sqs;
- sqs = kvzalloc_objs(struct mlx5e_txqsq *, qos_sqs_size,
- GFP_KERNEL);
+ sqs = kvzalloc_objs(struct mlx5e_txqsq *, qos_sqs_size);
if (!sqs)
goto err_free;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c
index 52de57d7c7dc..c5ba22eed8f1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/pool.c
@@ -23,8 +23,7 @@ static void mlx5e_xsk_unmap_pool(struct mlx5e_priv *priv,
static int mlx5e_xsk_get_pools(struct mlx5e_xsk *xsk)
{
if (!xsk->pools) {
- xsk->pools = kzalloc_objs(*xsk->pools, MLX5E_MAX_NUM_CHANNELS,
- GFP_KERNEL);
+ xsk->pools = kzalloc_objs(*xsk->pools, MLX5E_MAX_NUM_CHANNELS);
if (unlikely(!xsk->pools))
return -ENOMEM;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index e844ffa4d6b7..b6c12460b54a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -6258,8 +6258,7 @@ int mlx5e_priv_init(struct mlx5e_priv *priv,
if (!priv->channel_stats)
goto err_free_tx_rates;
- priv->fec_ranges = kzalloc_objs(*priv->fec_ranges, ETHTOOL_FEC_HIST_MAX,
- GFP_KERNEL);
+ priv->fec_ranges = kzalloc_objs(*priv->fec_ranges, ETHTOOL_FEC_HIST_MAX);
if (!priv->fec_ranges)
goto err_free_channel_stats;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
index 3f5d16875b34..1f6bde5d7626 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
@@ -531,15 +531,13 @@ static int mlx5_fpga_conn_create_qp(struct mlx5_fpga_conn *conn,
if (err)
goto out;
- conn->qp.rq.bufs = kvzalloc_objs(conn->qp.rq.bufs[0], conn->qp.rq.size,
- GFP_KERNEL);
+ conn->qp.rq.bufs = kvzalloc_objs(conn->qp.rq.bufs[0], conn->qp.rq.size);
if (!conn->qp.rq.bufs) {
err = -ENOMEM;
goto err_wq;
}
- conn->qp.sq.bufs = kvzalloc_objs(conn->qp.sq.bufs[0], conn->qp.sq.size,
- GFP_KERNEL);
+ conn->qp.sq.bufs = kvzalloc_objs(conn->qp.sq.bufs[0], conn->qp.sq.size);
if (!conn->qp.sq.bufs) {
err = -ENOMEM;
goto err_rq_bufs;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rl.c b/drivers/net/ethernet/mellanox/mlx5/core/rl.c
index 477526f04cd9..f2a96d5b45f5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rl.c
@@ -247,8 +247,7 @@ static int mlx5_rl_table_get(struct mlx5_rl_table *table)
return 0;
}
- table->rl_entry = kzalloc_objs(struct mlx5_rl_entry, table->max_size,
- GFP_KERNEL);
+ table->rl_entry = kzalloc_objs(struct mlx5_rl_entry, table->max_size);
if (!table->rl_entry)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
index f1b117ea1c65..23e86f292022 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c
@@ -2629,8 +2629,7 @@ mlx5hws_action_template_create(enum mlx5hws_action_type action_type[])
;
at->num_actions = num_actions - 1;
- at->action_type_arr = kzalloc_objs(*action_type, num_actions,
- GFP_KERNEL);
+ at->action_type_arr = kzalloc_objs(*action_type, num_actions);
if (!at->action_type_arr)
goto free_at;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
index 8f0dd304cefa..dea21c11ade7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c
@@ -236,8 +236,7 @@ int mlx5hws_bwc_matcher_create_simple(struct mlx5hws_bwc_matcher *bwc_matcher,
struct mlx5hws_matcher_attr attr = {0};
int i;
- bwc_matcher->rules = kzalloc_objs(*bwc_matcher->rules, bwc_queues,
- GFP_KERNEL);
+ bwc_matcher->rules = kzalloc_objs(*bwc_matcher->rules, bwc_queues);
if (!bwc_matcher->rules)
goto err;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
index 11ceaa97fa4f..aca77853abb8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c
@@ -759,22 +759,19 @@ static int mlx5_fs_fte_get_hws_actions(struct mlx5_flow_root_namespace *ns,
int num_actions = 0;
int err;
- *ractions = kzalloc_objs(**ractions, MLX5_FLOW_CONTEXT_ACTION_MAX,
- GFP_KERNEL);
+ *ractions = kzalloc_objs(**ractions, MLX5_FLOW_CONTEXT_ACTION_MAX);
if (!*ractions) {
err = -ENOMEM;
goto out_err;
}
- fs_actions = kzalloc_objs(*fs_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
- GFP_KERNEL);
+ fs_actions = kzalloc_objs(*fs_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
if (!fs_actions) {
err = -ENOMEM;
goto free_actions_alloc;
}
- dest_actions = kzalloc_objs(*dest_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
- GFP_KERNEL);
+ dest_actions = kzalloc_objs(*dest_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
if (!dest_actions) {
err = -ENOMEM;
goto free_fs_actions_alloc;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
index 663224454268..51aae5a6857a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/matcher.c
@@ -1090,8 +1090,7 @@ hws_matcher_set_templates(struct mlx5hws_matcher *matcher,
matcher->size_of_at_array =
num_of_at + matcher->attr.max_num_of_at_attach;
- matcher->at = kvzalloc_objs(*matcher->at, matcher->size_of_at_array,
- GFP_KERNEL);
+ matcher->at = kvzalloc_objs(*matcher->at, matcher->size_of_at_array);
if (!matcher->at) {
mlx5hws_err(ctx, "Failed to allocate action template array\n");
ret = -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c
index 2d34fe465d13..367fb62458a5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/send.c
@@ -1132,8 +1132,7 @@ int mlx5hws_send_queues_open(struct mlx5hws_context *ctx,
if (err)
return err;
- ctx->send_queue = kzalloc_objs(*ctx->send_queue, ctx->queues,
- GFP_KERNEL);
+ ctx->send_queue = kzalloc_objs(*ctx->send_queue, ctx->queues);
if (!ctx->send_queue) {
err = -ENOMEM;
goto free_bwc_locks;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c
index 3af4218381a1..bd3cf1a4cee1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_buddy.c
@@ -16,10 +16,8 @@ int mlx5dr_buddy_init(struct mlx5dr_icm_buddy_mem *buddy,
INIT_LIST_HEAD(&buddy->list_node);
- buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1,
- GFP_KERNEL);
- buddy->num_free = kzalloc_objs(*buddy->num_free, buddy->max_order + 1,
- GFP_KERNEL);
+ buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1);
+ buddy->num_free = kzalloc_objs(*buddy->num_free, buddy->max_order + 1);
if (!buddy->bitmap || !buddy->num_free)
goto err_free_all;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c
index 1c314df256c9..d7c2074e9a89 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/dr_icm_pool.c
@@ -227,8 +227,7 @@ static int dr_icm_buddy_init_ste_cache(struct mlx5dr_icm_buddy_mem *buddy)
int num_of_entries =
mlx5dr_icm_pool_chunk_size_to_entries(buddy->pool->max_log_chunk_sz);
- buddy->ste_arr = kvzalloc_objs(struct mlx5dr_ste, num_of_entries,
- GFP_KERNEL);
+ buddy->ste_arr = kvzalloc_objs(struct mlx5dr_ste, num_of_entries);
if (!buddy->ste_arr)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c
index 4d29c6347902..2782e955d3ac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/fs_dr.c
@@ -275,8 +275,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
if (mlx5_fs_cmd_is_fw_term_table(ft))
return mlx5_fs_cmd_get_fw_cmds()->create_fte(ns, ft, group, fte);
- actions = kzalloc_objs(*actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
- GFP_KERNEL);
+ actions = kzalloc_objs(*actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
if (!actions) {
err = -ENOMEM;
goto out_err;
@@ -289,8 +288,7 @@ static int mlx5_cmd_dr_create_fte(struct mlx5_flow_root_namespace *ns,
goto free_actions_alloc;
}
- term_actions = kzalloc_objs(*term_actions, MLX5_FLOW_CONTEXT_ACTION_MAX,
- GFP_KERNEL);
+ term_actions = kzalloc_objs(*term_actions, MLX5_FLOW_CONTEXT_ACTION_MAX);
if (!term_actions) {
err = -ENOMEM;
goto free_fs_dr_actions_alloc;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c
index bbd8b61180eb..6722de0a3315 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.c
@@ -327,8 +327,7 @@ mlxsw_afk_key_info_create(struct mlxsw_afk *mlxsw_afk,
struct mlxsw_afk_key_info *key_info;
int err;
- key_info = kzalloc_flex(*key_info, blocks, mlxsw_afk->max_blocks,
- GFP_KERNEL);
+ key_info = kzalloc_flex(*key_info, blocks, mlxsw_afk->max_blocks);
if (!key_info)
return ERR_PTR(-ENOMEM);
err = mlxsw_afk_picker(mlxsw_afk, key_info, elusage);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
index e7081614f597..30f172ce822c 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
@@ -871,8 +871,7 @@ int mlxsw_hwmon_init(struct mlxsw_core *mlxsw_core,
mlxsw_reg_mgpir_unpack(mgpir_pl, NULL, NULL, NULL, NULL,
&num_of_slots);
- mlxsw_hwmon = kzalloc_flex(*mlxsw_hwmon, line_cards, num_of_slots + 1,
- GFP_KERNEL);
+ mlxsw_hwmon = kzalloc_flex(*mlxsw_hwmon, line_cards, num_of_slots + 1);
if (!mlxsw_hwmon)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
index 4c9b04ca5154..3900a73cfffb 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
@@ -642,8 +642,7 @@ int mlxsw_thermal_init(struct mlxsw_core *core,
mlxsw_reg_mgpir_unpack(mgpir_pl, NULL, NULL, NULL, NULL,
&num_of_slots);
- thermal = kzalloc_flex(*thermal, line_cards, num_of_slots + 1,
- GFP_KERNEL);
+ thermal = kzalloc_flex(*thermal, line_cards, num_of_slots + 1);
if (!thermal)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c
index be6b7f9508ed..0da85d36647d 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c
@@ -1667,8 +1667,7 @@ static int mlxsw_pci_fw_area_init(struct mlxsw_pci *mlxsw_pci, char *mbox,
int i;
int err;
- mlxsw_pci->fw_area.items = kzalloc_objs(*mem_item, num_pages,
- GFP_KERNEL);
+ mlxsw_pci->fw_area.items = kzalloc_objs(*mem_item, num_pages);
if (!mlxsw_pci->fw_area.items)
return -ENOMEM;
mlxsw_pci->fw_area.count = num_pages;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index b405584fa8a0..560f5ee531d2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2489,8 +2489,7 @@ static int mlxsw_sp_traps_init(struct mlxsw_sp *mlxsw_sp)
if (!MLXSW_CORE_RES_VALID(mlxsw_sp->core, MAX_CPU_POLICERS))
return -EIO;
max_policers = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_CPU_POLICERS);
- trap = kzalloc_flex(*trap, policers_usage, BITS_TO_LONGS(max_policers),
- GFP_KERNEL);
+ trap = kzalloc_flex(*trap, policers_usage, BITS_TO_LONGS(max_policers));
if (!trap)
return -ENOMEM;
trap->max_policers = max_policers;
@@ -2623,8 +2622,7 @@ static int mlxsw_sp_lag_init(struct mlxsw_sp *mlxsw_sp)
if (err)
return err;
- mlxsw_sp->lags = kzalloc_objs(struct mlxsw_sp_lag, mlxsw_sp->max_lag,
- GFP_KERNEL);
+ mlxsw_sp->lags = kzalloc_objs(struct mlxsw_sp_lag, mlxsw_sp->max_lag);
if (!mlxsw_sp->lags) {
err = -ENOMEM;
goto err_kcalloc;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c
index d6c55a80a7ce..275763642529 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c
@@ -513,8 +513,7 @@ mlxsw_sp_acl_bf_init(struct mlxsw_sp *mlxsw_sp, unsigned int num_erp_banks)
* is 2^ACL_MAX_BF_LOG
*/
bf_bank_size = 1 << MLXSW_CORE_RES_GET(mlxsw_sp->core, ACL_MAX_BF_LOG);
- bf = kzalloc_flex(*bf, refcnt, size_mul(bf_bank_size, num_erp_banks),
- GFP_KERNEL);
+ bf = kzalloc_flex(*bf, refcnt, size_mul(bf_bank_size, num_erp_banks));
if (!bf)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
index d1358c716079..e2ba919fa6fd 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
@@ -647,8 +647,7 @@ static int mlxsw_sp_sb_ports_init(struct mlxsw_sp *mlxsw_sp)
int i;
int err;
- mlxsw_sp->sb->ports = kzalloc_objs(struct mlxsw_sp_sb_port, max_ports,
- GFP_KERNEL);
+ mlxsw_sp->sb->ports = kzalloc_objs(struct mlxsw_sp_sb_port, max_ports);
if (!mlxsw_sp->sb->ports)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
index 69ab4f8cf05d..f1ad937405a3 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c
@@ -654,8 +654,7 @@ static const struct dcbnl_rtnl_ops mlxsw_sp_dcbnl_ops = {
static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
{
- mlxsw_sp_port->dcb.ets = kzalloc_obj(*mlxsw_sp_port->dcb.ets,
- GFP_KERNEL);
+ mlxsw_sp_port->dcb.ets = kzalloc_obj(*mlxsw_sp_port->dcb.ets);
if (!mlxsw_sp_port->dcb.ets)
return -ENOMEM;
@@ -673,8 +672,7 @@ static int mlxsw_sp_port_maxrate_init(struct mlxsw_sp_port *mlxsw_sp_port)
{
int i;
- mlxsw_sp_port->dcb.maxrate = kmalloc_obj(*mlxsw_sp_port->dcb.maxrate,
- GFP_KERNEL);
+ mlxsw_sp_port->dcb.maxrate = kmalloc_obj(*mlxsw_sp_port->dcb.maxrate);
if (!mlxsw_sp_port->dcb.maxrate)
return -ENOMEM;
@@ -691,8 +689,7 @@ static void mlxsw_sp_port_maxrate_fini(struct mlxsw_sp_port *mlxsw_sp_port)
static int mlxsw_sp_port_pfc_init(struct mlxsw_sp_port *mlxsw_sp_port)
{
- mlxsw_sp_port->dcb.pfc = kzalloc_obj(*mlxsw_sp_port->dcb.pfc,
- GFP_KERNEL);
+ mlxsw_sp_port->dcb.pfc = kzalloc_obj(*mlxsw_sp_port->dcb.pfc);
if (!mlxsw_sp_port->dcb.pfc)
return -ENOMEM;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c
index 874659d5eb97..84942c1ea726 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c
@@ -277,8 +277,7 @@ mlxsw_sp_nve_mc_record_create(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_nve_mc_record *mc_record;
int err;
- mc_record = kzalloc_flex(*mc_record, entries, num_max_entries,
- GFP_KERNEL);
+ mc_record = kzalloc_flex(*mc_record, entries, num_max_entries);
if (!mc_record)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index a7ed770d49cc..143fdd8aae49 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -1038,8 +1038,7 @@ static int mlxsw_sp_vrs_init(struct mlxsw_sp *mlxsw_sp)
return -EIO;
max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS);
- mlxsw_sp->router->vrs = kzalloc_objs(struct mlxsw_sp_vr, max_vrs,
- GFP_KERNEL);
+ mlxsw_sp->router->vrs = kzalloc_objs(struct mlxsw_sp_vr, max_vrs);
if (!mlxsw_sp->router->vrs)
return -ENOMEM;
@@ -11068,8 +11067,7 @@ static int mlxsw_sp_rifs_init(struct mlxsw_sp *mlxsw_sp)
mlxsw_sp->router->max_rif_mac_profile =
MLXSW_CORE_RES_GET(core, MAX_RIF_MAC_PROFILES);
- mlxsw_sp->router->rifs = kzalloc_objs(struct mlxsw_sp_rif *, max_rifs,
- GFP_KERNEL);
+ mlxsw_sp->router->rifs = kzalloc_objs(struct mlxsw_sp_rif *, max_rifs);
if (!mlxsw_sp->router->rifs)
return -ENOMEM;
diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 4b15fe4c30fb..26557cd32008 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -3991,8 +3991,7 @@ static void ksz_update_timer(struct ksz_timer_info *info)
*/
static int ksz_alloc_soft_desc(struct ksz_desc_info *desc_info, int transmit)
{
- desc_info->ring = kzalloc_objs(struct ksz_desc, desc_info->alloc,
- GFP_KERNEL);
+ desc_info->ring = kzalloc_objs(struct ksz_desc, desc_info->alloc);
if (!desc_info->ring)
return 1;
hw_init_desc(desc_info, transmit);
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
index 13e22179f57a..7b6369e43451 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_fdma.c
@@ -200,8 +200,7 @@ static int lan966x_fdma_tx_alloc(struct lan966x_tx *tx)
struct fdma *fdma = &tx->fdma;
int err;
- tx->dcbs_buf = kzalloc_objs(struct lan966x_tx_dcb_buf, fdma->n_dcbs,
- GFP_KERNEL);
+ tx->dcbs_buf = kzalloc_objs(struct lan966x_tx_dcb_buf, fdma->n_dcbs);
if (!tx->dcbs_buf)
return -ENOMEM;
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index 8c7894a69e5c..9befd0719f74 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -889,8 +889,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
}
sparx5->port_count = of_get_child_count(ports);
- configs = kzalloc_objs(struct initial_port_config, sparx5->port_count,
- GFP_KERNEL);
+ configs = kzalloc_objs(struct initial_port_config, sparx5->port_count);
if (!configs) {
err = -ENOMEM;
goto cleanup_pnode;
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
index 0422a1c2535b..9919183ad39e 100644
--- a/drivers/net/ethernet/microsoft/mana/mana_en.c
+++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
@@ -2326,8 +2326,7 @@ static int mana_create_txq(struct mana_port_context *apc,
int err;
int i;
- apc->tx_qp = kzalloc_objs(struct mana_tx_qp, apc->num_queues,
- GFP_KERNEL);
+ apc->tx_qp = kzalloc_objs(struct mana_tx_qp, apc->num_queues);
if (!apc->tx_qp)
return -ENOMEM;
@@ -2852,8 +2851,7 @@ static int mana_rss_table_alloc(struct mana_port_context *apc)
if (!apc->indir_table)
return -ENOMEM;
- apc->rxobj_table = kzalloc_objs(mana_handle_t, apc->indir_table_sz,
- GFP_KERNEL);
+ apc->rxobj_table = kzalloc_objs(mana_handle_t, apc->indir_table_sz);
if (!apc->rxobj_table) {
kfree(apc->indir_table);
return -ENOMEM;
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 75ee09571af6..e5e51d021b2c 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3703,8 +3703,7 @@ static void myri10ge_probe_slices(struct myri10ge_priv *mgp)
* slices. We give up on MSI-X if we can only get a single
* vector. */
- mgp->msix_vectors = kzalloc_objs(*mgp->msix_vectors, mgp->num_slices,
- GFP_KERNEL);
+ mgp->msix_vectors = kzalloc_objs(*mgp->msix_vectors, mgp->num_slices);
if (mgp->msix_vectors == NULL)
goto no_msix;
for (i = 0; i < mgp->num_slices; i++) {
diff --git a/drivers/net/ethernet/netronome/nfp/bpf/offload.c b/drivers/net/ethernet/netronome/nfp/bpf/offload.c
index 1fcd53af4479..8a1773defd1b 100644
--- a/drivers/net/ethernet/netronome/nfp/bpf/offload.c
+++ b/drivers/net/ethernet/netronome/nfp/bpf/offload.c
@@ -123,8 +123,7 @@ nfp_map_ptrs_record(struct nfp_app_bpf *bpf, struct nfp_prog *nfp_prog,
if (!cnt)
goto out;
- nfp_prog->map_records = kmalloc_objs(nfp_prog->map_records[0], cnt,
- GFP_KERNEL);
+ nfp_prog->map_records = kmalloc_objs(nfp_prog->map_records[0], cnt);
if (!nfp_prog->map_records) {
err = -ENOMEM;
goto out;
diff --git a/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c b/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
index 1c61d4a83e8b..eb436362d384 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/lag_conf.c
@@ -335,8 +335,7 @@ static void nfp_fl_lag_do_work(struct work_struct *work)
continue;
}
- acti_netdevs = kmalloc_objs(*acti_netdevs, entry->slave_cnt,
- GFP_KERNEL);
+ acti_netdevs = kmalloc_objs(*acti_netdevs, entry->slave_cnt);
if (!acti_netdevs) {
schedule_delayed_work(&lag->work,
NFP_FL_LAG_DELAY);
diff --git a/drivers/net/ethernet/netronome/nfp/nfd3/rings.c b/drivers/net/ethernet/netronome/nfp/nfd3/rings.c
index 480b644afed5..2560c4edee2e 100644
--- a/drivers/net/ethernet/netronome/nfp/nfd3/rings.c
+++ b/drivers/net/ethernet/netronome/nfp/nfd3/rings.c
@@ -140,8 +140,7 @@ nfp_nfd3_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring)
goto err_alloc;
}
- tx_ring->txbufs = kvzalloc_objs(*tx_ring->txbufs, tx_ring->cnt,
- GFP_KERNEL);
+ tx_ring->txbufs = kvzalloc_objs(*tx_ring->txbufs, tx_ring->cnt);
if (!tx_ring->txbufs)
goto err_alloc;
diff --git a/drivers/net/ethernet/netronome/nfp/nfdk/rings.c b/drivers/net/ethernet/netronome/nfp/nfdk/rings.c
index c0905469911c..10d162e7ae11 100644
--- a/drivers/net/ethernet/netronome/nfp/nfdk/rings.c
+++ b/drivers/net/ethernet/netronome/nfp/nfdk/rings.c
@@ -105,8 +105,7 @@ nfp_nfdk_tx_ring_alloc(struct nfp_net_dp *dp, struct nfp_net_tx_ring *tx_ring)
goto err_alloc;
}
- tx_ring->ktxbufs = kvzalloc_objs(*tx_ring->ktxbufs, tx_ring->cnt,
- GFP_KERNEL);
+ tx_ring->ktxbufs = kvzalloc_objs(*tx_ring->ktxbufs, tx_ring->cnt);
if (!tx_ring->ktxbufs)
goto err_alloc;
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index a9c7bab489b2..7928e76da723 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -2537,8 +2537,7 @@ nfp_net_alloc(struct pci_dev *pdev, const struct nfp_dev_info *dev_info,
nn->dp.num_r_vecs, num_online_cpus());
nn->max_r_vecs = nn->dp.num_r_vecs;
- nn->dp.xsk_pools = kzalloc_objs(*nn->dp.xsk_pools, nn->max_r_vecs,
- GFP_KERNEL);
+ nn->dp.xsk_pools = kzalloc_objs(*nn->dp.xsk_pools, nn->max_r_vecs);
if (!nn->dp.xsk_pools) {
err = -ENOMEM;
goto err_free_nn;
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
index aeaa998e2f75..06cfabfaa0f7 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_main.c
@@ -229,8 +229,7 @@ static int nfp_net_pf_alloc_irqs(struct nfp_pf *pf)
wanted_irqs = 0;
list_for_each_entry(nn, &pf->vnics, vnic_list)
wanted_irqs += NFP_NET_NON_Q_VECTORS + nn->dp.num_r_vecs;
- pf->irq_entries = kzalloc_objs(*pf->irq_entries, wanted_irqs,
- GFP_KERNEL);
+ pf->irq_entries = kzalloc_objs(*pf->irq_entries, wanted_irqs);
if (!pf->irq_entries)
return -ENOMEM;
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c b/drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c
index eb5f9c2bf445..4ca692727b11 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_shared_buf.c
@@ -99,8 +99,7 @@ int nfp_shared_buf_register(struct nfp_pf *pf)
entry_sz = nfp_cpp_area_size(sb_desc_area) / num_entries;
- pf->shared_bufs = kmalloc_objs(pf->shared_bufs[0], num_entries,
- GFP_KERNEL);
+ pf->shared_bufs = kmalloc_objs(pf->shared_bufs[0], num_entries);
if (!pf->shared_bufs) {
err = -ENOMEM;
goto err_release_area;
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index bff27b223f5d..5b0435d7bc39 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -5854,10 +5854,8 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
goto out_unmap;
np->tx_ring.ex = &np->rx_ring.ex[np->rx_ring_size];
}
- np->rx_skb = kzalloc_objs(struct nv_skb_map, np->rx_ring_size,
- GFP_KERNEL);
- np->tx_skb = kzalloc_objs(struct nv_skb_map, np->tx_ring_size,
- GFP_KERNEL);
+ np->rx_skb = kzalloc_objs(struct nv_skb_map, np->rx_ring_size);
+ np->tx_skb = kzalloc_objs(struct nv_skb_map, np->tx_ring_size);
if (!np->rx_skb || !np->tx_skb)
goto out_freering;
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c
index f9a6471b36d0..3c798e598bc5 100644
--- a/drivers/net/ethernet/pasemi/pasemi_mac.c
+++ b/drivers/net/ethernet/pasemi/pasemi_mac.c
@@ -381,8 +381,7 @@ static int pasemi_mac_setup_rx_resources(const struct net_device *dev)
spin_lock_init(&ring->lock);
ring->size = RX_RING_SIZE;
- ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, RX_RING_SIZE,
- GFP_KERNEL);
+ ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, RX_RING_SIZE);
if (!ring->ring_info)
goto out_ring_info;
@@ -464,8 +463,7 @@ pasemi_mac_setup_tx_resources(const struct net_device *dev)
spin_lock_init(&ring->lock);
ring->size = TX_RING_SIZE;
- ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, TX_RING_SIZE,
- GFP_KERNEL);
+ ring->ring_info = kzalloc_objs(struct pasemi_mac_buffer, TX_RING_SIZE);
if (!ring->ring_info)
goto out_ring_info;
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
index 163eabd47f55..8bc4e2b69569 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
@@ -202,8 +202,7 @@ int netxen_alloc_sw_resources(struct netxen_adapter *adapter)
recv_ctx = &adapter->recv_ctx;
- rds_ring = kzalloc_objs(struct nx_host_rds_ring, adapter->max_rds_rings,
- GFP_KERNEL);
+ rds_ring = kzalloc_objs(struct nx_host_rds_ring, adapter->max_rds_rings);
if (rds_ring == NULL)
goto err_out;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index 4826f44ebced..9861daa82d9e 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -845,8 +845,7 @@ static int qed_cxt_src_t2_alloc(struct qed_hwfn *p_hwfn)
p_t2->num_pages = DIV_ROUND_UP(total_size, psz);
/* allocate t2 */
- p_t2->dma_mem = kzalloc_objs(struct phys_mem_desc, p_t2->num_pages,
- GFP_KERNEL);
+ p_t2->dma_mem = kzalloc_objs(struct phys_mem_desc, p_t2->num_pages);
if (!p_t2->dma_mem) {
DP_NOTICE(p_hwfn, "Failed to allocate t2 table\n");
rc = -ENOMEM;
@@ -994,8 +993,7 @@ static int qed_ilt_shadow_alloc(struct qed_hwfn *p_hwfn)
int rc;
size = qed_cxt_ilt_shadow_size(clients);
- p_mngr->ilt_shadow = kzalloc_objs(struct phys_mem_desc, size,
- GFP_KERNEL);
+ p_mngr->ilt_shadow = kzalloc_objs(struct phys_mem_desc, size);
if (!p_mngr->ilt_shadow) {
rc = -ENOMEM;
goto ilt_shadow_fail;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c
index 83d043d62231..4fb38e47c652 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_debug.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c
@@ -6821,8 +6821,7 @@ qed_mcp_trace_alloc_meta_data(struct qed_hwfn *p_hwfn,
/* Read number of formats and allocate memory for all formats */
meta->formats_num = qed_read_dword_from_buf(meta_buf_bytes, &offset);
- meta->formats = kzalloc_objs(struct mcp_trace_format, meta->formats_num,
- GFP_KERNEL);
+ meta->formats = kzalloc_objs(struct mcp_trace_format, meta->formats_num);
if (!meta->formats)
return DBG_STATUS_VIRT_MEM_ALLOC_FAILED;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c b/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
index 9b7b05362c68..79ea53bc1a32 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
@@ -1692,8 +1692,7 @@ struct phys_mem_desc *qed_fw_overlay_mem_alloc(struct qed_hwfn *p_hwfn,
if (!buf_size)
return NULL;
- allocated_mem = kzalloc_objs(struct phys_mem_desc, NUM_STORMS,
- GFP_KERNEL);
+ allocated_mem = kzalloc_objs(struct phys_mem_desc, NUM_STORMS);
if (!allocated_mem)
return NULL;
diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c
index 19319956ca13..e71eed756091 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_main.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_main.c
@@ -963,8 +963,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
struct qede_fastpath *fp;
int i;
- edev->fp_array = kzalloc_objs(*edev->fp_array, QEDE_QUEUE_CNT(edev),
- GFP_KERNEL);
+ edev->fp_array = kzalloc_objs(*edev->fp_array, QEDE_QUEUE_CNT(edev));
if (!edev->fp_array) {
DP_NOTICE(edev, "fp array allocation failed\n");
goto err;
@@ -1007,8 +1006,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
}
if (fp->type & QEDE_FASTPATH_TX) {
- fp->txq = kzalloc_objs(*fp->txq, edev->dev_info.num_tc,
- GFP_KERNEL);
+ fp->txq = kzalloc_objs(*fp->txq, edev->dev_info.num_tc);
if (!fp->txq)
goto err;
}
@@ -1019,8 +1017,7 @@ static int qede_alloc_fp_array(struct qede_dev *edev)
goto err;
if (edev->xdp_prog) {
- fp->xdp_tx = kzalloc_obj(*fp->xdp_tx,
- GFP_KERNEL);
+ fp->xdp_tx = kzalloc_obj(*fp->xdp_tx);
if (!fp->xdp_tx)
goto err;
fp->type |= QEDE_FASTPATH_XDP;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 106cbe12398a..688cb578e865 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -994,8 +994,7 @@ int qlcnic_init_pci_info(struct qlcnic_adapter *adapter)
act_pci_func = ahw->total_nic_func;
- adapter->npars = kzalloc_objs(struct qlcnic_npar_info, act_pci_func,
- GFP_KERNEL);
+ adapter->npars = kzalloc_objs(struct qlcnic_npar_info, act_pci_func);
if (!adapter->npars) {
ret = -ENOMEM;
goto err_pci_info;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index e2f1169e05fa..0704dbc52d82 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -156,8 +156,7 @@ int qlcnic_sriov_init(struct qlcnic_adapter *adapter, int num_vfs)
adapter->ahw->sriov = sriov;
sriov->num_vfs = num_vfs;
bc = &sriov->bc;
- sriov->vf_info = kzalloc_objs(struct qlcnic_vf_info, num_vfs,
- GFP_KERNEL);
+ sriov->vf_info = kzalloc_objs(struct qlcnic_vf_info, num_vfs);
if (!sriov->vf_info) {
err = -ENOMEM;
goto qlcnic_free_sriov;
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 85f2e23f2638..fb689bd4374c 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -442,8 +442,7 @@ static int ravb_ring_init(struct net_device *ndev, int q)
goto error;
/* Allocate TX skb rings */
- priv->tx_skb[q] = kzalloc_objs(*priv->tx_skb[q], priv->num_tx_ring[q],
- GFP_KERNEL);
+ priv->tx_skb[q] = kzalloc_objs(*priv->tx_skb[q], priv->num_tx_ring[q]);
if (!priv->tx_skb[q])
goto error;
diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c
index 65b84ea060d1..6fe964816322 100644
--- a/drivers/net/ethernet/renesas/rswitch_main.c
+++ b/drivers/net/ethernet/renesas/rswitch_main.c
@@ -346,8 +346,7 @@ static int rswitch_gwca_queue_alloc(struct net_device *ndev,
gq->ndev = ndev;
if (!dir_tx) {
- gq->rx_bufs = kzalloc_objs(*gq->rx_bufs, gq->ring_size,
- GFP_KERNEL);
+ gq->rx_bufs = kzalloc_objs(*gq->rx_bufs, gq->ring_size);
if (!gq->rx_bufs)
return -ENOMEM;
if (rswitch_gwca_queue_alloc_rx_buf(gq, 0, gq->ring_size) < 0)
@@ -360,8 +359,7 @@ static int rswitch_gwca_queue_alloc(struct net_device *ndev,
gq->skbs = kzalloc_objs(*gq->skbs, gq->ring_size);
if (!gq->skbs)
return -ENOMEM;
- gq->unmap_addrs = kzalloc_objs(*gq->unmap_addrs, gq->ring_size,
- GFP_KERNEL);
+ gq->unmap_addrs = kzalloc_objs(*gq->unmap_addrs, gq->ring_size);
if (!gq->unmap_addrs)
goto out;
gq->tx_ring = dma_alloc_coherent(ndev->dev.parent,
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index 019828d3713f..bfaa9aa63fa1 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1410,13 +1410,11 @@ static int sh_eth_ring_init(struct net_device *ndev)
mdp->rx_buf_sz += NET_IP_ALIGN;
/* Allocate RX and TX skb rings */
- mdp->rx_skbuff = kzalloc_objs(*mdp->rx_skbuff, mdp->num_rx_ring,
- GFP_KERNEL);
+ mdp->rx_skbuff = kzalloc_objs(*mdp->rx_skbuff, mdp->num_rx_ring);
if (!mdp->rx_skbuff)
return -ENOMEM;
- mdp->tx_skbuff = kzalloc_objs(*mdp->tx_skbuff, mdp->num_tx_ring,
- GFP_KERNEL);
+ mdp->tx_skbuff = kzalloc_objs(*mdp->tx_skbuff, mdp->num_tx_ring);
if (!mdp->tx_skbuff)
goto ring_free;
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 32eb56335c63..ff6ca7b2cd4f 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2647,8 +2647,7 @@ static int rocker_msix_init(struct rocker *rocker)
if (msix_entries != ROCKER_MSIX_VEC_COUNT(rocker->port_count))
return -EINVAL;
- rocker->msix_entries = kmalloc_objs(struct msix_entry, msix_entries,
- GFP_KERNEL);
+ rocker->msix_entries = kmalloc_objs(struct msix_entry, msix_entries);
if (!rocker->msix_entries)
return -ENOMEM;
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
index 4f16779f2e3e..5051ada43d2f 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c
@@ -495,8 +495,7 @@ static int init_rx_ring(struct net_device *dev, u8 queue_no,
goto err_free_dma_rx;
}
- rx_ring->rx_skbuff = kmalloc_objs(struct sk_buff *, rx_rsize,
- GFP_KERNEL);
+ rx_ring->rx_skbuff = kmalloc_objs(struct sk_buff *, rx_rsize);
if (!rx_ring->rx_skbuff) {
ret = -ENOMEM;
goto err_free_skbuff_dma;
diff --git a/drivers/net/ethernet/sfc/falcon/rx.c b/drivers/net/ethernet/sfc/falcon/rx.c
index f7cc47b9b234..e7e955bc9631 100644
--- a/drivers/net/ethernet/sfc/falcon/rx.c
+++ b/drivers/net/ethernet/sfc/falcon/rx.c
@@ -733,8 +733,7 @@ static void ef4_init_rx_recycle_ring(struct ef4_nic *efx,
page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
efx->rx_bufs_per_page);
- rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
- GFP_KERNEL);
+ rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
if (!rx_queue->page_ring)
rx_queue->page_ptr_mask = 0;
else
diff --git a/drivers/net/ethernet/sfc/falcon/selftest.c b/drivers/net/ethernet/sfc/falcon/selftest.c
index ddea1e715f00..db4dd7fb77f5 100644
--- a/drivers/net/ethernet/sfc/falcon/selftest.c
+++ b/drivers/net/ethernet/sfc/falcon/selftest.c
@@ -545,8 +545,7 @@ ef4_test_loopback(struct ef4_tx_queue *tx_queue,
/* Determine how many packets to send */
state->packet_count = efx->txq_entries / 3;
state->packet_count = min(1 << (i << 2), state->packet_count);
- state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
- GFP_KERNEL);
+ state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
if (!state->skbs)
return -ENOMEM;
state->flush = false;
diff --git a/drivers/net/ethernet/sfc/mcdi_mon.c b/drivers/net/ethernet/sfc/mcdi_mon.c
index 68eb11117c2d..e574f91f624c 100644
--- a/drivers/net/ethernet/sfc/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/mcdi_mon.c
@@ -355,8 +355,7 @@ int efx_mcdi_mon_probe(struct efx_nic *efx)
rc = -ENOMEM;
goto fail;
}
- hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1,
- GFP_KERNEL);
+ hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1);
if (!hwmon->group.attrs) {
rc = -ENOMEM;
goto fail;
diff --git a/drivers/net/ethernet/sfc/rx_common.c b/drivers/net/ethernet/sfc/rx_common.c
index aa3647422f83..fd0a1a8ac2a1 100644
--- a/drivers/net/ethernet/sfc/rx_common.c
+++ b/drivers/net/ethernet/sfc/rx_common.c
@@ -138,8 +138,7 @@ static void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue)
bufs_in_recycle_ring = efx_rx_recycle_ring_size(efx);
page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
efx->rx_bufs_per_page);
- rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
- GFP_KERNEL);
+ rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
if (!rx_queue->page_ring)
rx_queue->page_ptr_mask = 0;
else
diff --git a/drivers/net/ethernet/sfc/selftest.c b/drivers/net/ethernet/sfc/selftest.c
index 26bff77f743b..8ec76329237a 100644
--- a/drivers/net/ethernet/sfc/selftest.c
+++ b/drivers/net/ethernet/sfc/selftest.c
@@ -542,8 +542,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
/* Determine how many packets to send */
state->packet_count = efx->txq_entries / 3;
state->packet_count = min(1 << (i << 2), state->packet_count);
- state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
- GFP_KERNEL);
+ state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
if (!state->skbs)
return -ENOMEM;
state->flush = false;
diff --git a/drivers/net/ethernet/sfc/siena/mcdi_mon.c b/drivers/net/ethernet/sfc/siena/mcdi_mon.c
index 9d3df883656b..0216a2a600a3 100644
--- a/drivers/net/ethernet/sfc/siena/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/siena/mcdi_mon.c
@@ -355,8 +355,7 @@ int efx_siena_mcdi_mon_probe(struct efx_nic *efx)
rc = -ENOMEM;
goto fail;
}
- hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1,
- GFP_KERNEL);
+ hwmon->group.attrs = kzalloc_objs(struct attribute *, n_attrs + 1);
if (!hwmon->group.attrs) {
rc = -ENOMEM;
goto fail;
diff --git a/drivers/net/ethernet/sfc/siena/rx_common.c b/drivers/net/ethernet/sfc/siena/rx_common.c
index 83dfd6aae9fe..4ceb108fad48 100644
--- a/drivers/net/ethernet/sfc/siena/rx_common.c
+++ b/drivers/net/ethernet/sfc/siena/rx_common.c
@@ -141,8 +141,7 @@ static void efx_init_rx_recycle_ring(struct efx_rx_queue *rx_queue)
bufs_in_recycle_ring = efx_rx_recycle_ring_size(efx);
page_ring_size = roundup_pow_of_two(bufs_in_recycle_ring /
efx->rx_bufs_per_page);
- rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size,
- GFP_KERNEL);
+ rx_queue->page_ring = kzalloc_objs(*rx_queue->page_ring, page_ring_size);
if (!rx_queue->page_ring)
rx_queue->page_ptr_mask = 0;
else
diff --git a/drivers/net/ethernet/sfc/siena/selftest.c b/drivers/net/ethernet/sfc/siena/selftest.c
index 864632a07851..930643612df5 100644
--- a/drivers/net/ethernet/sfc/siena/selftest.c
+++ b/drivers/net/ethernet/sfc/siena/selftest.c
@@ -543,8 +543,7 @@ efx_test_loopback(struct efx_tx_queue *tx_queue,
/* Determine how many packets to send */
state->packet_count = efx->txq_entries / 3;
state->packet_count = min(1 << (i << 2), state->packet_count);
- state->skbs = kzalloc_objs(state->skbs[0], state->packet_count,
- GFP_KERNEL);
+ state->skbs = kzalloc_objs(state->skbs[0], state->packet_count);
if (!state->skbs)
return -ENOMEM;
state->flush = false;
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index 02482de18b56..0c97211b6254 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1179,8 +1179,7 @@ static int smsc9420_alloc_tx_ring(struct smsc9420_pdata *pd)
BUG_ON(!pd->tx_ring);
- pd->tx_buffers = kmalloc_objs(struct smsc9420_ring_info, TX_RING_SIZE,
- GFP_KERNEL);
+ pd->tx_buffers = kmalloc_objs(struct smsc9420_ring_info, TX_RING_SIZE);
if (!pd->tx_buffers)
return -ENOMEM;
@@ -1211,8 +1210,7 @@ static int smsc9420_alloc_rx_ring(struct smsc9420_pdata *pd)
BUG_ON(!pd->rx_ring);
- pd->rx_buffers = kmalloc_objs(struct smsc9420_ring_info, RX_RING_SIZE,
- GFP_KERNEL);
+ pd->rx_buffers = kmalloc_objs(struct smsc9420_ring_info, RX_RING_SIZE);
if (pd->rx_buffers == NULL)
goto out;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3dc05dfaa983..3b3532cc12d7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2212,8 +2212,7 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
return ret;
}
- rx_q->buf_pool = kzalloc_objs(*rx_q->buf_pool, dma_conf->dma_rx_size,
- GFP_KERNEL);
+ rx_q->buf_pool = kzalloc_objs(*rx_q->buf_pool, dma_conf->dma_rx_size);
if (!rx_q->buf_pool)
return -ENOMEM;
@@ -2301,8 +2300,7 @@ static int __alloc_dma_tx_desc_resources(struct stmmac_priv *priv,
if (!tx_q->tx_skbuff_dma)
return -ENOMEM;
- tx_q->tx_skbuff = kzalloc_objs(struct sk_buff *, dma_conf->dma_tx_size,
- GFP_KERNEL);
+ tx_q->tx_skbuff = kzalloc_objs(struct sk_buff *, dma_conf->dma_tx_size);
if (!tx_q->tx_skbuff)
return -ENOMEM;
diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c
index cda6ee474400..aa7c90d191f4 100644
--- a/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c
+++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-desc.c
@@ -233,21 +233,18 @@ static int xlgmac_alloc_channels(struct xlgmac_pdata *pdata)
int ret = -ENOMEM;
unsigned int i;
- channel_head = kzalloc_objs(struct xlgmac_channel, pdata->channel_count,
- GFP_KERNEL);
+ channel_head = kzalloc_objs(struct xlgmac_channel, pdata->channel_count);
if (!channel_head)
return ret;
netif_dbg(pdata, drv, pdata->netdev,
"channel_head=%p\n", channel_head);
- tx_ring = kzalloc_objs(struct xlgmac_ring, pdata->tx_ring_count,
- GFP_KERNEL);
+ tx_ring = kzalloc_objs(struct xlgmac_ring, pdata->tx_ring_count);
if (!tx_ring)
goto err_tx_ring;
- rx_ring = kzalloc_objs(struct xlgmac_ring, pdata->rx_ring_count,
- GFP_KERNEL);
+ rx_ring = kzalloc_objs(struct xlgmac_ring, pdata->rx_ring_count);
if (!rx_ring)
goto err_rx_ring;
diff --git a/drivers/net/ethernet/ti/k3-cppi-desc-pool.c b/drivers/net/ethernet/ti/k3-cppi-desc-pool.c
index 36d8244252bd..71de14abf6f9 100644
--- a/drivers/net/ethernet/ti/k3-cppi-desc-pool.c
+++ b/drivers/net/ethernet/ti/k3-cppi-desc-pool.c
@@ -77,8 +77,7 @@ k3_cppi_desc_pool_create_name(struct device *dev, size_t size,
pool->gen_pool->name = pool_name;
- pool->desc_infos = kzalloc_objs(*pool->desc_infos, pool->num_desc,
- GFP_KERNEL);
+ pool->desc_infos = kzalloc_objs(*pool->desc_infos, pool->num_desc);
if (!pool->desc_infos)
goto gen_pool_desc_infos_alloc_fail;
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index cb286ba821db..b06e4c37ff61 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -1542,8 +1542,7 @@ static int axienet_init_dmaengine(struct net_device *ndev)
lp->tx_ring_head = 0;
lp->rx_ring_tail = 0;
lp->rx_ring_head = 0;
- lp->tx_skb_ring = kzalloc_objs(*lp->tx_skb_ring, TX_BD_NUM_MAX,
- GFP_KERNEL);
+ lp->tx_skb_ring = kzalloc_objs(*lp->tx_skb_ring, TX_BD_NUM_MAX);
if (!lp->tx_skb_ring) {
ret = -ENOMEM;
goto err_dma_release_rx;
@@ -1557,8 +1556,7 @@ static int axienet_init_dmaengine(struct net_device *ndev)
lp->tx_skb_ring[i] = skbuf_dma;
}
- lp->rx_skb_ring = kzalloc_objs(*lp->rx_skb_ring, RX_BUF_NUM_DEFAULT,
- GFP_KERNEL);
+ lp->rx_skb_ring = kzalloc_objs(*lp->rx_skb_ring, RX_BUF_NUM_DEFAULT);
if (!lp->rx_skb_ring) {
ret = -ENOMEM;
goto err_free_tx_skb_ring;
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 1a3f2a35519f..ee5ab5ceb2be 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -1524,8 +1524,7 @@ static void netvsc_get_ethtool_stats(struct net_device *dev,
data[i++] = xdp_tx;
}
- pcpu_sum = kvmalloc_objs(struct netvsc_ethtool_pcpu_stats, nr_cpu_ids,
- GFP_KERNEL);
+ pcpu_sum = kvmalloc_objs(struct netvsc_ethtool_pcpu_stats, nr_cpu_ids);
if (!pcpu_sum)
return;
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 97c69f522a82..ed4178155a5d 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -720,8 +720,7 @@ static void ca8210_rx_done(struct cas_control *cas_ctl)
&priv->spi->dev,
"Resetting MAC...\n");
- mlme_reset_wpc = kmalloc_obj(*mlme_reset_wpc,
- GFP_KERNEL);
+ mlme_reset_wpc = kmalloc_obj(*mlme_reset_wpc);
if (!mlme_reset_wpc)
goto finish;
INIT_WORK(
diff --git a/drivers/net/ipa/gsi_trans.c b/drivers/net/ipa/gsi_trans.c
index d0b10a2020ea..ecd9a3b8754f 100644
--- a/drivers/net/ipa/gsi_trans.c
+++ b/drivers/net/ipa/gsi_trans.c
@@ -730,8 +730,7 @@ int gsi_channel_trans_init(struct gsi *gsi, u32 channel_id)
* modulo that number to determine the next one that's free.
* Transactions are allocated one at a time.
*/
- trans_info->trans = kzalloc_objs(*trans_info->trans, tre_count,
- GFP_KERNEL);
+ trans_info->trans = kzalloc_objs(*trans_info->trans, tre_count);
if (!trans_info->trans)
return -ENOMEM;
trans_info->free_id = 0; /* all modulo channel->tre_count */
diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
index 4652dc7dd604..2b72fa98ddf1 100644
--- a/drivers/net/pcs/pcs-rzn1-miic.c
+++ b/drivers/net/pcs/pcs-rzn1-miic.c
@@ -679,8 +679,7 @@ static int miic_parse_dt(struct miic *miic, u32 *mode_cfg)
s8 *dt_val;
u32 conf;
- dt_val = kmalloc_objs(*dt_val, miic->of_data->conf_conv_count,
- GFP_KERNEL);
+ dt_val = kmalloc_objs(*dt_val, miic->of_data->conf_conv_count);
if (!dt_val)
return -ENOMEM;
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c
index e7f66e4f63b5..1825f7cf5dc0 100644
--- a/drivers/net/usb/hso.c
+++ b/drivers/net/usb/hso.c
@@ -2630,8 +2630,7 @@ static struct hso_device *hso_create_bulk_serial_device(
if (!serial->tiocmget)
goto exit;
serial->tiocmget->serial_state_notification
- = kzalloc_obj(struct hso_serial_state_notification,
- GFP_KERNEL);
+ = kzalloc_obj(struct hso_serial_state_notification);
if (!serial->tiocmget->serial_state_notification)
goto exit;
tiocmget = serial->tiocmget;
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 8fb6bb58b589..6f72a3f15907 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -1450,8 +1450,7 @@ static int smsc75xx_bind(struct usbnet *dev, struct usb_interface *intf)
return ret;
}
- dev->data[0] = (unsigned long) kzalloc_obj(struct smsc75xx_priv,
- GFP_KERNEL);
+ dev->data[0] = (unsigned long) kzalloc_obj(struct smsc75xx_priv);
pdata = (struct smsc75xx_priv *)(dev->data[0]);
if (!pdata)
diff --git a/drivers/net/wan/fsl_ucc_hdlc.c b/drivers/net/wan/fsl_ucc_hdlc.c
index f26233d4bcbb..b72ab9951875 100644
--- a/drivers/net/wan/fsl_ucc_hdlc.c
+++ b/drivers/net/wan/fsl_ucc_hdlc.c
@@ -203,15 +203,13 @@ static int uhdlc_init(struct ucc_hdlc_private *priv)
goto free_tx_bd;
}
- priv->rx_skbuff = kzalloc_objs(*priv->rx_skbuff, priv->rx_ring_size,
- GFP_KERNEL);
+ priv->rx_skbuff = kzalloc_objs(*priv->rx_skbuff, priv->rx_ring_size);
if (!priv->rx_skbuff) {
ret = -ENOMEM;
goto free_ucc_pram;
}
- priv->tx_skbuff = kzalloc_objs(*priv->tx_skbuff, priv->tx_ring_size,
- GFP_KERNEL);
+ priv->tx_skbuff = kzalloc_objs(*priv->tx_skbuff, priv->tx_ring_size);
if (!priv->tx_skbuff) {
ret = -ENOMEM;
goto free_rx_skbuff;
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c
index 23e5163acc9a..a9cbe955e084 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -1461,8 +1461,7 @@ ath10k_ce_alloc_src_ring(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(nentries);
- src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries,
- GFP_KERNEL);
+ src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
if (src_ring == NULL)
return ERR_PTR(-ENOMEM);
@@ -1519,8 +1518,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(nentries);
- src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries,
- GFP_KERNEL);
+ src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
if (!src_ring)
return ERR_PTR(-ENOMEM);
@@ -1575,8 +1573,7 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(attr->dest_nentries);
- dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries,
- GFP_KERNEL);
+ dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
if (dest_ring == NULL)
return ERR_PTR(-ENOMEM);
@@ -1619,8 +1616,7 @@ ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(attr->dest_nentries);
- dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries,
- GFP_KERNEL);
+ dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
if (!dest_ring)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index cf7424be9f4b..8e604697d6c2 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7559,8 +7559,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
}
if (ath10k_debug_is_extd_tx_stats_enabled(ar)) {
- arsta->tx_stats = kzalloc_obj(*arsta->tx_stats,
- GFP_KERNEL);
+ arsta->tx_stats = kzalloc_obj(*arsta->tx_stats);
if (!arsta->tx_stats) {
ath10k_mac_dec_num_stations(arvif, sta);
ret = -ENOMEM;
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index 43f8ef03b1cf..715e561bf8ca 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -1362,8 +1362,7 @@ static int ath12k_dp_cc_init(struct ath12k_base *ab)
if (dp->num_spt_pages > ATH12K_MAX_PPT_ENTRIES)
dp->num_spt_pages = ATH12K_MAX_PPT_ENTRIES;
- dp->spt_info = kzalloc_objs(struct ath12k_spt_info, dp->num_spt_pages,
- GFP_KERNEL);
+ dp->spt_info = kzalloc_objs(struct ath12k_spt_info, dp->num_spt_pages);
if (!dp->spt_info) {
ath12k_warn(ab, "SPT page allocation failure");
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index c6d64b467898..c6b88909b6b7 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5024,8 +5024,7 @@ static struct ath12k_vif_cache *ath12k_ahvif_get_link_cache(struct ath12k_vif *a
u8 link_id)
{
if (!ahvif->cache[link_id]) {
- ahvif->cache[link_id] = kzalloc_obj(*ahvif->cache[0],
- GFP_KERNEL);
+ ahvif->cache[link_id] = kzalloc_obj(*ahvif->cache[0]);
if (ahvif->cache[link_id])
INIT_LIST_HEAD(&ahvif->cache[link_id]->key_conf.list);
}
@@ -14250,8 +14249,7 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
if (ar->ab->hw_params->single_pdev_only)
n_combinations = 2;
- combinations = kzalloc_objs(*combinations, n_combinations,
- GFP_KERNEL);
+ combinations = kzalloc_objs(*combinations, n_combinations);
if (!combinations)
return -ENOMEM;
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index a8b9c346c74b..9e4983d31628 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -760,8 +760,7 @@ ath5k_eeprom_convert_pcal_info_5111(struct ath5k_hw *ah, int mode,
if (!pd->pd_step)
goto err_out;
- pd->pd_pwr = kzalloc_objs(s16, AR5K_EEPROM_N_PWR_POINTS_5111,
- GFP_KERNEL);
+ pd->pd_pwr = kzalloc_objs(s16, AR5K_EEPROM_N_PWR_POINTS_5111);
if (!pd->pd_pwr)
goto err_out;
@@ -942,8 +941,7 @@ ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode,
if (!pd->pd_step)
goto err_out;
- pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
- GFP_KERNEL);
+ pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
if (!pd->pd_pwr)
goto err_out;
@@ -980,8 +978,7 @@ ath5k_eeprom_convert_pcal_info_5112(struct ath5k_hw *ah, int mode,
if (!pd->pd_step)
goto err_out;
- pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
- GFP_KERNEL);
+ pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
if (!pd->pd_pwr)
goto err_out;
@@ -1236,8 +1233,7 @@ ath5k_eeprom_convert_pcal_info_2413(struct ath5k_hw *ah, int mode,
if (!pd->pd_step)
goto err_out;
- pd->pd_pwr = kzalloc_objs(s16, pd->pd_points,
- GFP_KERNEL);
+ pd->pd_pwr = kzalloc_objs(s16, pd->pd_points);
if (!pd->pd_pwr)
goto err_out;
diff --git a/drivers/net/wireless/ath/wil6210/fw_inc.c b/drivers/net/wireless/ath/wil6210/fw_inc.c
index bc172f5a70c9..e998627141a0 100644
--- a/drivers/net/wireless/ath/wil6210/fw_inc.c
+++ b/drivers/net/wireless/ath/wil6210/fw_inc.c
@@ -160,8 +160,7 @@ fw_handle_brd_file(struct wil6210_priv *wil, const void *data,
return -EINVAL;
}
- wil->brd_info = kzalloc_objs(struct wil_brd_info, max_num_ent,
- GFP_KERNEL);
+ wil->brd_info = kzalloc_objs(struct wil_brd_info, max_num_ent);
if (!wil->brd_info)
return -ENOMEM;
diff --git a/drivers/net/wireless/ath/wil6210/pmc.c b/drivers/net/wireless/ath/wil6210/pmc.c
index 8d368c901122..cdc38ebf8d41 100644
--- a/drivers/net/wireless/ath/wil6210/pmc.c
+++ b/drivers/net/wireless/ath/wil6210/pmc.c
@@ -85,8 +85,7 @@ void wil_pmc_alloc(struct wil6210_priv *wil,
num_descriptors, descriptor_size);
/* allocate descriptors info list in pmc context*/
- pmc->descriptors = kzalloc_objs(struct desc_alloc_info, num_descriptors,
- GFP_KERNEL);
+ pmc->descriptors = kzalloc_objs(struct desc_alloc_info, num_descriptors);
if (!pmc->descriptors) {
wil_err(wil, "ERROR allocating pmc skb list\n");
goto no_release_err;
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index c4c6b3088a7a..1c54f50d0cc5 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -314,8 +314,7 @@ static int wil_init_rx_buff_arr(struct wil6210_priv *wil,
struct list_head *free = &wil->rx_buff_mgmt.free;
int i;
- wil->rx_buff_mgmt.buff_arr = kzalloc_objs(struct wil_rx_buff, size + 1,
- GFP_KERNEL);
+ wil->rx_buff_mgmt.buff_arr = kzalloc_objs(struct wil_rx_buff, size + 1);
if (!wil->rx_buff_mgmt.buff_arr)
return -ENOMEM;
diff --git a/drivers/net/wireless/broadcom/b43/debugfs.c b/drivers/net/wireless/broadcom/b43/debugfs.c
index 3d1c94d2d999..acddae68947a 100644
--- a/drivers/net/wireless/broadcom/b43/debugfs.c
+++ b/drivers/net/wireless/broadcom/b43/debugfs.c
@@ -677,8 +677,7 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
}
e->dev = dev;
log = &e->txstatlog;
- log->log = kzalloc_objs(struct b43_txstatus, B43_NR_LOGGED_TXSTATUS,
- GFP_KERNEL);
+ log->log = kzalloc_objs(struct b43_txstatus, B43_NR_LOGGED_TXSTATUS);
if (!log->log) {
b43err(dev->wl, "debugfs: add device txstatus OOM\n");
kfree(e);
diff --git a/drivers/net/wireless/broadcom/b43/dma.c b/drivers/net/wireless/broadcom/b43/dma.c
index 6eabe78c938a..3a8df7a18042 100644
--- a/drivers/net/wireless/broadcom/b43/dma.c
+++ b/drivers/net/wireless/broadcom/b43/dma.c
@@ -846,8 +846,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
if (for_tx)
ring->nr_slots = B43_TXRING_SLOTS;
- ring->meta = kzalloc_objs(struct b43_dmadesc_meta, ring->nr_slots,
- GFP_KERNEL);
+ ring->meta = kzalloc_objs(struct b43_dmadesc_meta, ring->nr_slots);
if (!ring->meta)
goto err_kfree_ring;
for (i = 0; i < ring->nr_slots; i++)
diff --git a/drivers/net/wireless/broadcom/b43legacy/dma.c b/drivers/net/wireless/broadcom/b43legacy/dma.c
index 1608fd0a582b..a9557356c9ab 100644
--- a/drivers/net/wireless/broadcom/b43legacy/dma.c
+++ b/drivers/net/wireless/broadcom/b43legacy/dma.c
@@ -620,8 +620,7 @@ struct b43legacy_dmaring *b43legacy_setup_dmaring(struct b43legacy_wldev *dev,
if (for_tx)
nr_slots = B43legacy_TXRING_SLOTS;
- ring->meta = kzalloc_objs(struct b43legacy_dmadesc_meta, nr_slots,
- GFP_KERNEL);
+ ring->meta = kzalloc_objs(struct b43legacy_dmadesc_meta, nr_slots);
if (!ring->meta)
goto err_kfree_ring;
if (for_tx) {
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index beb33003fe54..45b342ea0637 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -2199,8 +2199,7 @@ static void brcmf_pcie_setup(struct device *dev, int ret,
bus->msgbuf->commonrings[i] =
&devinfo->shared.commonrings[i]->commonring;
- flowrings = kzalloc_objs(*flowrings, devinfo->shared.max_flowrings,
- GFP_KERNEL);
+ flowrings = kzalloc_objs(*flowrings, devinfo->shared.max_flowrings);
if (!flowrings)
goto fail;
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index 029459df3343..8837f44fd06b 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -3412,8 +3412,7 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
dma_addr_t p;
priv->msg_buffers =
- kmalloc_objs(struct ipw2100_tx_packet, IPW_COMMAND_POOL_SIZE,
- GFP_KERNEL);
+ kmalloc_objs(struct ipw2100_tx_packet, IPW_COMMAND_POOL_SIZE);
if (!priv->msg_buffers)
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/ipw2x00/libipw_module.c b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
index cc771ee9bac3..22358b2c2ecd 100644
--- a/drivers/net/wireless/intel/ipw2x00/libipw_module.c
+++ b/drivers/net/wireless/intel/ipw2x00/libipw_module.c
@@ -57,8 +57,7 @@ static int libipw_networks_allocate(struct libipw_device *ieee)
int i, j;
for (i = 0; i < MAX_NETWORK_COUNT; i++) {
- ieee->networks[i] = kzalloc_obj(struct libipw_network,
- GFP_KERNEL);
+ ieee->networks[i] = kzalloc_obj(struct libipw_network);
if (!ieee->networks[i]) {
LIBIPW_ERROR("Out of memory allocating beacons\n");
for (j = 0; j < i; j++)
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index c9efb948f6c7..8d0ff339ad08 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -2968,8 +2968,7 @@ il_tx_queue_alloc(struct il_priv *il, struct il_tx_queue *txq, u32 id)
/* Driver ilate data, only for Tx (not command) queues,
* not shared with device. */
if (id != il->cmd_queue) {
- txq->skbs = kzalloc_objs(struct sk_buff *, TFD_QUEUE_SIZE_MAX,
- GFP_KERNEL);
+ txq->skbs = kzalloc_objs(struct sk_buff *, TFD_QUEUE_SIZE_MAX);
if (!txq->skbs) {
IL_ERR("Fail to alloc skbs\n");
goto error;
@@ -3442,8 +3441,7 @@ il_init_geos(struct il_priv *il)
}
channels =
- kzalloc_objs(struct ieee80211_channel, il->channel_count,
- GFP_KERNEL);
+ kzalloc_objs(struct ieee80211_channel, il->channel_count);
if (!channels)
return -ENOMEM;
@@ -4609,8 +4607,7 @@ il_alloc_txq_mem(struct il_priv *il)
{
if (!il->txq)
il->txq =
- kzalloc_objs(struct il_tx_queue, il->cfg->num_of_queues,
- GFP_KERNEL);
+ kzalloc_objs(struct il_tx_queue, il->cfg->num_of_queues);
if (!il->txq) {
IL_ERR("Not enough memory for txq\n");
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index 402842e0dad4..1f26d89fc908 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2958,8 +2958,7 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
struct iwl_fw_dump_desc *iwl_dump_error_desc;
int ret;
- iwl_dump_error_desc = kmalloc_obj(*iwl_dump_error_desc,
- GFP_KERNEL);
+ iwl_dump_error_desc = kmalloc_obj(*iwl_dump_error_desc);
if (!iwl_dump_error_desc)
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 9e8977f4f072..6d235c417fdd 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -1377,11 +1377,9 @@ iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
u8 tx_chains = fw->valid_rx_ant;
if (cfg->uhb_supported)
- data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB,
- GFP_KERNEL);
+ data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB);
else
- data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT,
- GFP_KERNEL);
+ data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT);
if (!data)
return NULL;
@@ -1444,14 +1442,11 @@ iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg,
const __le16 *ch_section;
if (cfg->uhb_supported)
- data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB,
- GFP_KERNEL);
+ data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_UHB);
else if (cfg->nvm_type != IWL_NVM_EXT)
- data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS,
- GFP_KERNEL);
+ data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS);
else
- data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT,
- GFP_KERNEL);
+ data = kzalloc_flex(*data, channels, IWL_NVM_NUM_CHANNELS_EXT);
if (!data)
return NULL;
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/d3.c b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
index 467211014977..ef98efc8fb1b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/d3.c
@@ -1249,8 +1249,7 @@ iwl_mld_process_netdetect_res(struct iwl_mld *mld,
goto out;
}
n_matches = hweight_long(matched_profiles);
- netdetect_info = kzalloc_flex(*netdetect_info, matches, n_matches,
- GFP_KERNEL);
+ netdetect_info = kzalloc_flex(*netdetect_info, matches, n_matches);
if (netdetect_info)
iwl_mld_set_netdetect_info(mld, netdetect_cfg, netdetect_info,
resume_data->netdetect_res,
@@ -2000,8 +1999,7 @@ int iwl_mld_wowlan_resume(struct iwl_mld *mld)
iwl_fw_dbg_read_d3_debug_data(&mld->fwrt);
- resume_data.wowlan_status = kzalloc_obj(*resume_data.wowlan_status,
- GFP_KERNEL);
+ resume_data.wowlan_status = kzalloc_obj(*resume_data.wowlan_status);
if (!resume_data.wowlan_status)
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c
index 3f0d093f2c5e..3b8ff0744e7c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c
@@ -660,8 +660,7 @@ iwl_mld_alloc_dup_data(struct iwl_mld *mld, struct iwl_mld_sta *mld_sta)
if (mld->fw_status.in_hw_restart)
return 0;
- dup_data = kzalloc_objs(*dup_data, mld->trans->info.num_rxqs,
- GFP_KERNEL);
+ dup_data = kzalloc_objs(*dup_data, mld->trans->info.num_rxqs);
if (!dup_data)
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/time_sync.c b/drivers/net/wireless/intel/iwlwifi/mld/time_sync.c
index ad6f5c40f23d..897ab65b71aa 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/time_sync.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/time_sync.c
@@ -12,8 +12,7 @@
static int iwl_mld_init_time_sync(struct iwl_mld *mld, u32 protocols,
const u8 *addr)
{
- struct iwl_mld_time_sync_data *time_sync = kzalloc_obj(*time_sync,
- GFP_KERNEL);
+ struct iwl_mld_time_sync_data *time_sync = kzalloc_obj(*time_sync);
if (!time_sync)
return -ENOMEM;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 5f37ee7b9ab1..2d0811be7346 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -1798,8 +1798,7 @@ int iwl_mvm_sta_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
if (iwl_mvm_has_new_rx_api(mvm)) {
int q;
- dup_data = kzalloc_objs(*dup_data, mvm->trans->info.num_rxqs,
- GFP_KERNEL);
+ dup_data = kzalloc_objs(*dup_data, mvm->trans->info.num_rxqs);
if (!dup_data)
return -ENOMEM;
/*
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c
index 4e23b292e4df..7c662d5f2b72 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/rx.c
@@ -773,8 +773,7 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans)
if (WARN_ON(trans_pcie->rxq))
return -EINVAL;
- trans_pcie->rxq = kzalloc_objs(struct iwl_rxq, trans->info.num_rxqs,
- GFP_KERNEL);
+ trans_pcie->rxq = kzalloc_objs(struct iwl_rxq, trans->info.num_rxqs);
trans_pcie->rx_pool = kzalloc_objs(trans_pcie->rx_pool[0],
RX_POOL_SIZE(trans_pcie->num_rx_bufs),
GFP_KERNEL);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c
index 0de3f5de237e..d7979d75b073 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/tx.c
@@ -741,8 +741,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq,
txq->n_window = slots_num;
- txq->entries = kzalloc_objs(struct iwl_pcie_txq_entry, slots_num,
- GFP_KERNEL);
+ txq->entries = kzalloc_objs(struct iwl_pcie_txq_entry, slots_num);
if (!txq->entries)
goto error;
diff --git a/drivers/net/wireless/intersil/p54/eeprom.c b/drivers/net/wireless/intersil/p54/eeprom.c
index 1c49aad5d5f8..148c110c5a2b 100644
--- a/drivers/net/wireless/intersil/p54/eeprom.c
+++ b/drivers/net/wireless/intersil/p54/eeprom.c
@@ -341,16 +341,14 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev)
goto free;
}
priv->chan_num = max_channel_num;
- priv->survey = kzalloc_objs(struct survey_info, max_channel_num,
- GFP_KERNEL);
+ priv->survey = kzalloc_objs(struct survey_info, max_channel_num);
if (!priv->survey) {
ret = -ENOMEM;
goto free;
}
list->max_entries = max_channel_num;
- list->channels = kzalloc_objs(struct p54_channel_entry, max_channel_num,
- GFP_KERNEL);
+ list->channels = kzalloc_objs(struct p54_channel_entry, max_channel_num);
if (!list->channels) {
ret = -ENOMEM;
goto free;
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index ae9a63d8128d..4e511f8700a8 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -1503,8 +1503,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
adapter->scan_processing = true;
spin_unlock_bh(&adapter->mwifiex_cmd_lock);
- scan_cfg_out = kzalloc_obj(union mwifiex_scan_cmd_config_tlv,
- GFP_KERNEL);
+ scan_cfg_out = kzalloc_obj(union mwifiex_scan_cmd_config_tlv);
if (!scan_cfg_out) {
ret = -ENOMEM;
goto done;
diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 0abf519243f5..1561a601c7f2 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -484,15 +484,13 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev,
static int wilc_wfi_cfg_allocate_wpa_entry(struct wilc_priv *priv, u8 idx)
{
if (!priv->wilc_gtk[idx]) {
- priv->wilc_gtk[idx] = kzalloc_obj(*priv->wilc_gtk[idx],
- GFP_KERNEL);
+ priv->wilc_gtk[idx] = kzalloc_obj(*priv->wilc_gtk[idx]);
if (!priv->wilc_gtk[idx])
return -ENOMEM;
}
if (!priv->wilc_ptk[idx]) {
- priv->wilc_ptk[idx] = kzalloc_obj(*priv->wilc_ptk[idx],
- GFP_KERNEL);
+ priv->wilc_ptk[idx] = kzalloc_obj(*priv->wilc_ptk[idx]);
if (!priv->wilc_ptk[idx])
return -ENOMEM;
}
@@ -504,8 +502,7 @@ static int wilc_wfi_cfg_allocate_wpa_igtk_entry(struct wilc_priv *priv, u8 idx)
{
idx -= 4;
if (!priv->wilc_igtk[idx]) {
- priv->wilc_igtk[idx] = kzalloc_obj(*priv->wilc_igtk[idx],
- GFP_KERNEL);
+ priv->wilc_igtk[idx] = kzalloc_obj(*priv->wilc_igtk[idx]);
if (!priv->wilc_igtk[idx])
return -ENOMEM;
}
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c
index db2e2bbab1b1..1b3fcc2b3355 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/commands.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c
@@ -1031,8 +1031,7 @@ qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
if (WARN_ON(resp->n_reg_rules > NL80211_MAX_SUPP_REG_RULES))
return -E2BIG;
- mac->rd = kzalloc_flex(*mac->rd, reg_rules, resp->n_reg_rules,
- GFP_KERNEL);
+ mac->rd = kzalloc_flex(*mac->rd, reg_rules, resp->n_reg_rules);
if (!mac->rd)
return -ENOMEM;
@@ -1084,8 +1083,7 @@ qtnf_parse_variable_mac_info(struct qtnf_wmac *mac,
return -EINVAL;
}
- limits = kzalloc_objs(*limits, rec->n_limits,
- GFP_KERNEL);
+ limits = kzalloc_objs(*limits, rec->n_limits);
if (!limits)
return -ENOMEM;
@@ -1340,8 +1338,7 @@ static int qtnf_cmd_band_fill_iftype(const u8 *data,
if (band->n_iftype_data == 0)
return 0;
- iftype_data = kzalloc_objs(*iftype_data, band->n_iftype_data,
- GFP_KERNEL);
+ iftype_data = kzalloc_objs(*iftype_data, band->n_iftype_data);
if (!iftype_data) {
band->n_iftype_data = 0;
return -ENOMEM;
@@ -1388,8 +1385,7 @@ qtnf_cmd_resp_fill_band_info(struct ieee80211_supported_band *band,
return 0;
if (!band->channels)
- band->channels = kzalloc_objs(*chan, band->n_channels,
- GFP_KERNEL);
+ band->channels = kzalloc_objs(*chan, band->n_channels);
if (!band->channels) {
band->n_channels = 0;
return -ENOMEM;
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index bf2c30d0f5ff..ca18a4c7e14a 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -11912,8 +11912,7 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
return -ENOMEM;
rt2x00dev->chan_survey =
- kzalloc_objs(struct rt2x00_chan_survey, spec->num_channels,
- GFP_KERNEL);
+ kzalloc_objs(struct rt2x00_chan_survey, spec->num_channels);
if (!rt2x00dev->chan_survey) {
kfree(info);
return -ENOMEM;
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
index 1f927dd9e152..7bafb051d5ec 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/sw.c
@@ -70,10 +70,8 @@ static int rtl92du_init_shared_data(struct ieee80211_hw *hw)
rtlpriv->curveindex_5g = kcalloc(TARGET_CHNL_NUM_5G,
sizeof(*rtlpriv->curveindex_5g),
GFP_KERNEL);
- rtlpriv->mutex_for_power_on_off = kzalloc_obj(*rtlpriv->mutex_for_power_on_off,
- GFP_KERNEL);
- rtlpriv->mutex_for_hw_init = kzalloc_obj(*rtlpriv->mutex_for_hw_init,
- GFP_KERNEL);
+ rtlpriv->mutex_for_power_on_off = kzalloc_obj(*rtlpriv->mutex_for_power_on_off);
+ rtlpriv->mutex_for_hw_init = kzalloc_obj(*rtlpriv->mutex_for_hw_init);
if (!rtlpriv->curveindex_2g || !rtlpriv->curveindex_5g ||
!rtlpriv->mutex_for_power_on_off || !rtlpriv->mutex_for_hw_init) {
diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
index b42840271051..1318e94f8524 100644
--- a/drivers/net/wireless/realtek/rtw88/sdio.c
+++ b/drivers/net/wireless/realtek/rtw88/sdio.c
@@ -1290,8 +1290,7 @@ static int rtw_sdio_init_tx(struct rtw_dev *rtwdev)
for (i = 0; i < RTK_MAX_TX_QUEUE_NUM; i++)
skb_queue_head_init(&rtwsdio->tx_queue[i]);
- rtwsdio->tx_handler_data = kmalloc_obj(*rtwsdio->tx_handler_data,
- GFP_KERNEL);
+ rtwsdio->tx_handler_data = kmalloc_obj(*rtwsdio->tx_handler_data);
if (!rtwsdio->tx_handler_data)
goto err_destroy_wq;
diff --git a/drivers/net/wireless/realtek/rtw89/usb.c b/drivers/net/wireless/realtek/rtw89/usb.c
index 95b5c1cfdce4..da1b7ce8089e 100644
--- a/drivers/net/wireless/realtek/rtw89/usb.c
+++ b/drivers/net/wireless/realtek/rtw89/usb.c
@@ -931,8 +931,7 @@ static int rtw89_usb_intf_init(struct rtw89_dev *rtwdev,
if (ret)
return ret;
- rtwusb->vendor_req_buf = kmalloc_obj(*rtwusb->vendor_req_buf,
- GFP_KERNEL);
+ rtwusb->vendor_req_buf = kmalloc_obj(*rtwusb->vendor_req_buf);
if (!rtwusb->vendor_req_buf)
return -ENOMEM;
diff --git a/drivers/net/wireless/st/cw1200/debug.c b/drivers/net/wireless/st/cw1200/debug.c
index 6af080d0f21b..7dad6d3ba239 100644
--- a/drivers/net/wireless/st/cw1200/debug.c
+++ b/drivers/net/wireless/st/cw1200/debug.c
@@ -360,8 +360,7 @@ static const struct file_operations fops_wsm_dumps = {
int cw1200_debug_init(struct cw1200_common *priv)
{
int ret = -ENOMEM;
- struct cw1200_debug_priv *d = kzalloc_obj(struct cw1200_debug_priv,
- GFP_KERNEL);
+ struct cw1200_debug_priv *d = kzalloc_obj(struct cw1200_debug_priv);
priv->debug = d;
if (!d)
return ret;
diff --git a/drivers/net/wireless/st/cw1200/queue.c b/drivers/net/wireless/st/cw1200/queue.c
index dc557ed80910..c2f2c118224c 100644
--- a/drivers/net/wireless/st/cw1200/queue.c
+++ b/drivers/net/wireless/st/cw1200/queue.c
@@ -179,13 +179,11 @@ int cw1200_queue_init(struct cw1200_queue *queue,
spin_lock_init(&queue->lock);
timer_setup(&queue->gc, cw1200_queue_gc, 0);
- queue->pool = kzalloc_objs(struct cw1200_queue_item, capacity,
- GFP_KERNEL);
+ queue->pool = kzalloc_objs(struct cw1200_queue_item, capacity);
if (!queue->pool)
return -ENOMEM;
- queue->link_map_cache = kzalloc_objs(int, stats->map_capacity,
- GFP_KERNEL);
+ queue->link_map_cache = kzalloc_objs(int, stats->map_capacity);
if (!queue->link_map_cache) {
kfree(queue->pool);
queue->pool = NULL;
diff --git a/drivers/net/wireless/st/cw1200/scan.c b/drivers/net/wireless/st/cw1200/scan.c
index f0b902d2ecc1..dc7b617837ef 100644
--- a/drivers/net/wireless/st/cw1200/scan.c
+++ b/drivers/net/wireless/st/cw1200/scan.c
@@ -225,8 +225,7 @@ void cw1200_scan_work(struct work_struct *work)
scan.type = WSM_SCAN_TYPE_BACKGROUND;
scan.flags = WSM_SCAN_FLAG_FORCE_BACKGROUND;
}
- scan.ch = kzalloc_objs(struct wsm_scan_ch, it - priv->scan.curr,
- GFP_KERNEL);
+ scan.ch = kzalloc_objs(struct wsm_scan_ch, it - priv->scan.curr);
if (!scan.ch) {
priv->scan.status = -ENOMEM;
goto fail;
diff --git a/drivers/net/wireless/ti/wl1251/init.c b/drivers/net/wireless/ti/wl1251/init.c
index 9134418ca3f2..45c572460f46 100644
--- a/drivers/net/wireless/ti/wl1251/init.c
+++ b/drivers/net/wireless/ti/wl1251/init.c
@@ -293,8 +293,7 @@ static int wl1251_hw_init_data_path_config(struct wl1251 *wl)
int ret;
/* asking for the data path parameters */
- wl->data_path = kzalloc_obj(struct acx_data_path_params_resp,
- GFP_KERNEL);
+ wl->data_path = kzalloc_obj(struct acx_data_path_params_resp);
if (!wl->data_path)
return -ENOMEM;
diff --git a/drivers/net/wwan/iosm/iosm_ipc_protocol.c b/drivers/net/wwan/iosm/iosm_ipc_protocol.c
index 851a24641c35..527355a671b6 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_protocol.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_protocol.c
@@ -222,8 +222,7 @@ bool ipc_protocol_resume(struct iosm_protocol *ipc_protocol)
struct iosm_protocol *ipc_protocol_init(struct iosm_imem *ipc_imem)
{
- struct iosm_protocol *ipc_protocol = kzalloc_obj(*ipc_protocol,
- GFP_KERNEL);
+ struct iosm_protocol *ipc_protocol = kzalloc_obj(*ipc_protocol);
struct ipc_protocol_context_info *p_ci;
u64 addr;
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index c4e75cc53f64..d316b35f404b 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -2212,8 +2212,7 @@ static int xennet_create_queues(struct netfront_info *info,
unsigned int i;
int ret;
- info->queues = kzalloc_objs(struct netfront_queue, *num_queues,
- GFP_KERNEL);
+ info->queues = kzalloc_objs(struct netfront_queue, *num_queues);
if (!info->queues)
return -ENOMEM;