summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/net/ethernet/marvell
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c2
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c2
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c4
-rw-r--r--drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c2
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep/octep_main.c2
-rw-r--r--drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/cgx.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/mbox.c4
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/ptp.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c8
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c8
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c4
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c4
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c6
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c4
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c4
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c2
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/qos.c18
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/nic/rep.c6
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_acl.c10
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_counter.c6
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_devlink.c2
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_flow.c4
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_flower.c2
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_hw.c2
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_main.c8
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_router.c6
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_router_hw.c10
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_rxtx.c6
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_span.c4
-rw-r--r--drivers/net/ethernet/marvell/prestera/prestera_switchdev.c14
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c4
-rw-r--r--drivers/net/ethernet/marvell/skge.c2
37 files changed, 87 insertions, 87 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 1bc31e0b443d..f9055b3d6fb1 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -1967,7 +1967,7 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index)
memset(rxq->rx_desc_area, 0, size);
rxq->rx_desc_area_size = size;
- rxq->rx_skb = kzalloc_objs(*rxq->rx_skb, rxq->rx_ring_size, GFP_KERNEL);
+ rxq->rx_skb = kzalloc_objs(*rxq->rx_skb, rxq->rx_ring_size);
if (rxq->rx_skb == NULL)
goto out_free;
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index c058df3bb85f..9ba4aef7080c 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -3554,7 +3554,7 @@ static int mvneta_txq_sw_init(struct mvneta_port *pp,
txq->last_desc = txq->size - 1;
- txq->buf = kmalloc_objs(*txq->buf, txq->size, GFP_KERNEL);
+ txq->buf = kmalloc_objs(*txq->buf, txq->size);
if (!txq->buf)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
index 83ba45f54180..80d15d7a5ec3 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c
@@ -1367,7 +1367,7 @@ int mvpp2_ethtool_cls_rule_ins(struct mvpp2_port *port,
if (info->fs.location >= MVPP2_N_RFS_ENTRIES_PER_FLOW)
return -EINVAL;
- efs = kzalloc_obj(*efs, GFP_KERNEL);
+ efs = kzalloc_obj(*efs);
if (!efs)
return -ENOMEM;
@@ -1503,7 +1503,7 @@ static int mvpp22_rss_context_create(struct mvpp2_port *port, u32 *rss_ctx)
if (ctx == MVPP22_N_RSS_TABLES)
return -EINVAL;
- priv->rss_tables[ctx] = kzalloc_obj(*priv->rss_tables[ctx], GFP_KERNEL);
+ priv->rss_tables[ctx] = kzalloc_obj(*priv->rss_tables[ctx]);
if (!priv->rss_tables[ctx])
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
index 2aef0c77f4d6..7adc9cd54bf6 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_debugfs.c
@@ -706,7 +706,7 @@ void mvpp2_dbgfs_init(struct mvpp2 *priv, const char *name)
mvpp2_dir = debugfs_create_dir(name, mvpp2_root);
priv->dbgfs_dir = mvpp2_dir;
- priv->dbgfs_entries = kzalloc_obj(*priv->dbgfs_entries, GFP_KERNEL);
+ priv->dbgfs_entries = kzalloc_obj(*priv->dbgfs_entries);
if (!priv->dbgfs_entries)
goto err;
diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
index fd9abcfeb4e0..3dab841f64ff 100644
--- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
+++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
@@ -1293,7 +1293,7 @@ int octep_device_setup(struct octep_device *oct)
int i, ret;
/* allocate memory for oct->conf */
- oct->conf = kzalloc_obj(*oct->conf, GFP_KERNEL);
+ oct->conf = kzalloc_obj(*oct->conf);
if (!oct->conf)
return -ENOMEM;
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 b794b517c304..4bf13cc76a9f 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
@@ -952,7 +952,7 @@ int octep_vf_device_setup(struct octep_vf_device *oct)
struct pci_dev *pdev = oct->pdev;
/* allocate memory for oct->conf */
- oct->conf = kzalloc_obj(*oct->conf, GFP_KERNEL);
+ oct->conf = kzalloc_obj(*oct->conf);
if (!oct->conf)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index dc4537623578..6000795823a3 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -1725,7 +1725,7 @@ static int cgx_lmac_init(struct cgx *cgx)
cgx->lmac_count = cgx->max_lmac_per_mac;
for (i = 0; i < cgx->lmac_count; i++) {
- lmac = kzalloc_obj(struct lmac, GFP_KERNEL);
+ lmac = kzalloc_obj(struct lmac);
if (!lmac)
return -ENOMEM;
lmac->name = kcalloc(1, sizeof("cgx_fwi_xxx_yyy"), GFP_KERNEL);
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/mbox.c b/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
index ad62be730bbc..d343f1704d07 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/mbox.c
@@ -133,7 +133,7 @@ int cn20k_mbox_setup(struct otx2_mbox *mbox, struct pci_dev *pdev,
mbox->reg_base = reg_base;
mbox->pdev = pdev;
- mbox->dev = kzalloc_objs(struct otx2_mbox_dev, ndevs, GFP_KERNEL);
+ mbox->dev = kzalloc_objs(struct otx2_mbox_dev, ndevs);
if (!mbox->dev) {
otx2_mbox_destroy(mbox);
return -ENOMEM;
@@ -211,7 +211,7 @@ static int otx2_mbox_setup(struct otx2_mbox *mbox, struct pci_dev *pdev,
mbox->reg_base = reg_base;
mbox->pdev = pdev;
- mbox->dev = kzalloc_objs(struct otx2_mbox_dev, ndevs, GFP_KERNEL);
+ mbox->dev = kzalloc_objs(struct otx2_mbox_dev, ndevs);
if (!mbox->dev) {
otx2_mbox_destroy(mbox);
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
index f38b5addd4d8..58e62e955554 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/ptp.c
@@ -520,7 +520,7 @@ static int ptp_probe(struct pci_dev *pdev,
struct ptp *ptp;
int err;
- ptp = kzalloc_obj(*ptp, GFP_KERNEL);
+ ptp = kzalloc_obj(*ptp);
if (!ptp) {
err = -ENOMEM;
goto error;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 2e3b3345a362..5b1129558e8b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -2516,7 +2516,7 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
if (!pf_bmap)
return -ENOMEM;
- ng_rvu_mbox = kzalloc_obj(*ng_rvu_mbox, GFP_KERNEL);
+ ng_rvu_mbox = kzalloc_obj(*ng_rvu_mbox);
if (!ng_rvu_mbox) {
err = -ENOMEM;
goto free_bitmap;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
index b9980253dcb0..4ff3935ed3fe 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
@@ -184,7 +184,7 @@ static int rvu_cgx_send_link_info(int cgx_id, int lmac_id, struct rvu *rvu)
unsigned long flags;
int err;
- qentry = kmalloc_obj(*qentry, GFP_KERNEL);
+ qentry = kmalloc_obj(*qentry);
if (!qentry)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
index 71c411d8eb83..fb15c794efc9 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c
@@ -494,12 +494,12 @@ static int rvu_nix_register_reporters(struct rvu_devlink *rvu_dl)
struct rvu_nix_event_ctx *nix_event_context;
struct rvu *rvu = rvu_dl->rvu;
- rvu_reporters = kzalloc_obj(*rvu_reporters, GFP_KERNEL);
+ rvu_reporters = kzalloc_obj(*rvu_reporters);
if (!rvu_reporters)
return -ENOMEM;
rvu_dl->rvu_nix_health_reporter = rvu_reporters;
- nix_event_context = kzalloc_obj(*nix_event_context, GFP_KERNEL);
+ nix_event_context = kzalloc_obj(*nix_event_context);
if (!nix_event_context)
return -ENOMEM;
@@ -1048,12 +1048,12 @@ static int rvu_npa_register_reporters(struct rvu_devlink *rvu_dl)
struct rvu_npa_event_ctx *npa_event_context;
struct rvu *rvu = rvu_dl->rvu;
- rvu_reporters = kzalloc_obj(*rvu_reporters, GFP_KERNEL);
+ rvu_reporters = kzalloc_obj(*rvu_reporters);
if (!rvu_reporters)
return -ENOMEM;
rvu_dl->rvu_npa_health_reporter = rvu_reporters;
- npa_event_context = kzalloc_obj(*npa_event_context, GFP_KERNEL);
+ npa_event_context = kzalloc_obj(*npa_event_context);
if (!npa_event_context)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 0964a85b536f..98dd68137a09 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -2455,7 +2455,7 @@ static int nix_smq_flush(struct rvu *rvu, int blkaddr,
}
/* XOFF all TL2s whose parent TL1 matches SMQ tree TL1 */
- smq_flush_ctx = kzalloc_obj(*smq_flush_ctx, GFP_KERNEL);
+ smq_flush_ctx = kzalloc_obj(*smq_flush_ctx);
if (!smq_flush_ctx)
return -ENOMEM;
nix_smq_flush_fill_ctx(rvu, blkaddr, smq, smq_flush_ctx);
@@ -3373,7 +3373,7 @@ static int nix_add_mce_list_entry(struct rvu *rvu,
mce_list = &elem->mcast_mce_list;
for (i = 0; i < num_entry; i++) {
- mce = kzalloc_obj(*mce, GFP_KERNEL);
+ mce = kzalloc_obj(*mce);
if (!mce)
goto free_mce;
@@ -3435,7 +3435,7 @@ static int nix_update_mce_list_entry(struct nix_mce_list *mce_list,
return 0;
/* Add a new one to the list, at the tail */
- mce = kzalloc_obj(*mce, GFP_KERNEL);
+ mce = kzalloc_obj(*mce);
if (!mce)
return -ENOMEM;
mce->pcifunc = pcifunc;
@@ -6420,7 +6420,7 @@ int rvu_mbox_handler_nix_mcast_grp_create(struct rvu *rvu,
return err;
mcast_grp = &nix_hw->mcast_grp;
- elem = kzalloc_obj(*elem, GFP_KERNEL);
+ elem = kzalloc_obj(*elem);
if (!elem)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
index 1b7dd4e771c7..1930b54e72f2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
@@ -1297,7 +1297,7 @@ static int npc_install_flow(struct rvu *rvu, int blkaddr, u16 target,
find_rule:
rule = rvu_mcam_find_rule(mcam, entry_index);
if (!rule) {
- rule = kzalloc_obj(*rule, GFP_KERNEL);
+ rule = kzalloc_obj(*rule);
if (!rule)
return -ENOMEM;
new = true;
@@ -1741,7 +1741,7 @@ int npc_install_mcam_drop_rule(struct rvu *rvu, int mcam_idx, u16 *counter_idx,
}
/* Add this entry to mcam rules list */
- rule = kzalloc_obj(*rule, GFP_KERNEL);
+ rule = kzalloc_obj(*rule);
if (!rule)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
index 7ed5750435c1..906d712cef19 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_hash.c
@@ -796,7 +796,7 @@ static int rvu_npc_exact_add_to_list(struct rvu *rvu, enum npc_exact_opc_type op
return -EFAULT;
}
- entry = kmalloc_obj(*entry, GFP_KERNEL);
+ entry = kmalloc_obj(*entry);
if (!entry) {
rvu_npc_exact_free_id(rvu, *seq_id);
dev_err(rvu->dev, "%s: Memory allocation failed\n", __func__);
@@ -1896,7 +1896,7 @@ int rvu_npc_exact_init(struct rvu *rvu)
/* Set capability to true */
rvu->hw->cap.npc_exact_match_enabled = true;
- table = kzalloc_obj(*table, GFP_KERNEL);
+ table = kzalloc_obj(*table);
if (!table)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
index 5f90f38071da..4649996dc7da 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
@@ -914,7 +914,7 @@ static struct cn10k_mcs_txsc *cn10k_mcs_create_txsc(struct otx2_nic *pfvf)
struct cn10k_mcs_txsc *txsc;
int ret;
- txsc = kzalloc_obj(*txsc, GFP_KERNEL);
+ txsc = kzalloc_obj(*txsc);
if (!txsc)
return ERR_PTR(-ENOMEM);
@@ -987,7 +987,7 @@ static struct cn10k_mcs_rxsc *cn10k_mcs_create_rxsc(struct otx2_nic *pfvf)
struct cn10k_mcs_rxsc *rxsc;
int ret;
- rxsc = kzalloc_obj(*rxsc, GFP_KERNEL);
+ rxsc = kzalloc_obj(*rxsc);
if (!rxsc)
return ERR_PTR(-ENOMEM);
@@ -1772,7 +1772,7 @@ int cn10k_mcs_init(struct otx2_nic *pfvf)
if (!test_bit(CN10K_HW_MACSEC, &pfvf->hw.cap_flag))
return 0;
- cfg = kzalloc_obj(*cfg, GFP_KERNEL);
+ cfg = kzalloc_obj(*cfg);
if (!cfg)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 768503b255fb..971fcab1c248 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -1005,7 +1005,7 @@ int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura)
}
sq->sqe_base = sq->sqe->base;
- sq->sg = kzalloc_objs(struct sg_list, qset->sqe_cnt, GFP_KERNEL);
+ sq->sg = kzalloc_objs(struct sg_list, qset->sqe_cnt);
if (!sq->sg)
return -ENOMEM;
@@ -1585,7 +1585,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf)
sq = &qset->sq[qidx];
sq->sqb_count = 0;
- sq->sqb_ptrs = kzalloc_objs(*sq->sqb_ptrs, num_sqbs, GFP_KERNEL);
+ sq->sqb_ptrs = kzalloc_objs(*sq->sqb_ptrs, num_sqbs);
if (!sq->sqb_ptrs) {
err = -ENOMEM;
goto err_mem;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
index f61730e8d73a..12c001ee34e2 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c
@@ -1063,7 +1063,7 @@ static int otx2_add_flow_with_pfmac(struct otx2_nic *pfvf,
struct otx2_flow *pf_mac;
struct ethhdr *eth_hdr;
- pf_mac = kzalloc_obj(*pf_mac, GFP_KERNEL);
+ pf_mac = kzalloc_obj(*pf_mac);
if (!pf_mac)
return -ENOMEM;
@@ -1131,7 +1131,7 @@ int otx2_add_flow(struct otx2_nic *pfvf, struct ethtool_rxnfc *nfc)
flow = otx2_find_flow(pfvf, fsp->location);
if (!flow) {
- flow = kzalloc_obj(*flow, GFP_KERNEL);
+ flow = kzalloc_obj(*flow);
if (!flow)
return -ENOMEM;
flow->location = fsp->location;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 333071ac7598..e8334a347960 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1936,7 +1936,7 @@ int otx2_alloc_queue_mem(struct otx2_nic *pf)
pf->qset.cq_cnt = pf->hw.rx_queues + otx2_get_total_tx_queues(pf);
- qset->napi = kzalloc_objs(*cq_poll, pf->hw.cint_cnt, GFP_KERNEL);
+ qset->napi = kzalloc_objs(*cq_poll, pf->hw.cint_cnt);
if (!qset->napi)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
index de9b90e498cc..95b0a1e7c936 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
@@ -408,7 +408,7 @@ int otx2_ptp_init(struct otx2_nic *pfvf)
}
mutex_unlock(&pfvf->mbox.lock);
- ptp_ptr = kzalloc_obj(*ptp_ptr, GFP_KERNEL);
+ ptp_ptr = kzalloc_obj(*ptp_ptr);
if (!ptp_ptr) {
err = -ENOMEM;
goto error;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
index 9b569e0d6222..04fcfbdcf69b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c
@@ -1271,7 +1271,7 @@ static int otx2_tc_add_flow(struct otx2_nic *nic,
}
/* allocate memory for the new flow and it's node */
- new_node = kzalloc_obj(*new_node, GFP_KERNEL);
+ new_node = kzalloc_obj(*new_node);
if (!new_node)
return -ENOMEM;
spin_lock_init(&new_node->lock);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
index 435c176c2643..69c0911e28e9 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
@@ -407,7 +407,7 @@ otx2_qos_alloc_root(struct otx2_nic *pfvf)
{
struct otx2_qos_node *node;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return ERR_PTR(-ENOMEM);
@@ -463,7 +463,7 @@ static int otx2_qos_alloc_txschq_node(struct otx2_nic *pfvf,
parent = node;
for (lvl = node->level - 1; lvl >= NIX_TXSCH_LVL_MDQ; lvl--) {
- txschq_node = kzalloc_obj(*txschq_node, GFP_KERNEL);
+ txschq_node = kzalloc_obj(*txschq_node);
if (!txschq_node)
goto err_out;
@@ -508,7 +508,7 @@ otx2_qos_sw_create_leaf_node(struct otx2_nic *pfvf,
struct otx2_qos_node *node;
int err;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return ERR_PTR(-ENOMEM);
@@ -1045,7 +1045,7 @@ static int otx2_qos_root_add(struct otx2_nic *pfvf, u16 htb_maj_id, u16 htb_defc
}
/* allocate txschq queue */
- new_cfg = kzalloc_obj(*new_cfg, GFP_KERNEL);
+ new_cfg = kzalloc_obj(*new_cfg);
if (!new_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
err = -ENOMEM;
@@ -1279,7 +1279,7 @@ static int otx2_qos_leaf_alloc_queue(struct otx2_nic *pfvf, u16 classid,
set_bit(prio, parent->prio_bmap);
/* read current txschq configuration */
- old_cfg = kzalloc_obj(*old_cfg, GFP_KERNEL);
+ old_cfg = kzalloc_obj(*old_cfg);
if (!old_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
ret = -ENOMEM;
@@ -1308,7 +1308,7 @@ static int otx2_qos_leaf_alloc_queue(struct otx2_nic *pfvf, u16 classid,
}
/* push new txschq config to hw */
- new_cfg = kzalloc_obj(*new_cfg, GFP_KERNEL);
+ new_cfg = kzalloc_obj(*new_cfg);
if (!new_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
ret = -ENOMEM;
@@ -1417,7 +1417,7 @@ static int otx2_qos_leaf_to_inner(struct otx2_nic *pfvf, u16 classid,
qid = node->qid;
/* read current txschq configuration */
- old_cfg = kzalloc_obj(*old_cfg, GFP_KERNEL);
+ old_cfg = kzalloc_obj(*old_cfg);
if (!old_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
ret = -ENOMEM;
@@ -1445,7 +1445,7 @@ static int otx2_qos_leaf_to_inner(struct otx2_nic *pfvf, u16 classid,
}
/* push new txschq config to hw */
- new_cfg = kzalloc_obj(*new_cfg, GFP_KERNEL);
+ new_cfg = kzalloc_obj(*new_cfg);
if (!new_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
ret = -ENOMEM;
@@ -1668,7 +1668,7 @@ static int otx2_qos_leaf_del_last(struct otx2_nic *pfvf, u16 classid, bool force
__set_bit(qid, pfvf->qos.qos_sq_bmap);
/* push new txschq config to hw */
- new_cfg = kzalloc_obj(*new_cfg, GFP_KERNEL);
+ new_cfg = kzalloc_obj(*new_cfg);
if (!new_cfg) {
NL_SET_ERR_MSG_MOD(extack, "Memory allocation error");
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
index 7706ec417d2b..94f155ffb17f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
@@ -40,7 +40,7 @@ static int rvu_rep_mcam_flow_init(struct rep_dev *rep)
int ent, allocated = 0;
int count;
- rep->flow_cfg = kzalloc_objs(struct otx2_flow_config, 1, GFP_KERNEL);
+ rep->flow_cfg = kzalloc_objs(struct otx2_flow_config, 1);
if (!rep->flow_cfg)
return -ENOMEM;
@@ -504,7 +504,7 @@ static int rvu_rep_napi_init(struct otx2_nic *priv,
int err = 0, qidx, vec;
char *irq_name;
- qset->napi = kzalloc_objs(*cq_poll, hw->cint_cnt, GFP_KERNEL);
+ qset->napi = kzalloc_objs(*cq_poll, hw->cint_cnt);
if (!qset->napi)
return -ENOMEM;
@@ -656,7 +656,7 @@ int rvu_rep_create(struct otx2_nic *priv, struct netlink_ext_ack *extack)
if (err)
return -ENOMEM;
- priv->reps = kzalloc_objs(struct rep_dev *, rep_cnt, GFP_KERNEL);
+ priv->reps = kzalloc_objs(struct rep_dev *, rep_cnt);
if (!priv->reps)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_acl.c b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
index 02f113f9af9f..31fe63a0a97d 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_acl.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
@@ -144,7 +144,7 @@ prestera_acl_ruleset_create(struct prestera_acl *acl,
if (!prestera_acl_chain_is_supported(chain_index, block->ingress))
return ERR_PTR(-EINVAL);
- ruleset = kzalloc_obj(*ruleset, GFP_KERNEL);
+ ruleset = kzalloc_obj(*ruleset);
if (!ruleset)
return ERR_PTR(-ENOMEM);
@@ -438,7 +438,7 @@ prestera_acl_rule_create(struct prestera_acl_ruleset *ruleset,
{
struct prestera_acl_rule *rule;
- rule = kzalloc_obj(*rule, GFP_KERNEL);
+ rule = kzalloc_obj(*rule);
if (!rule)
return ERR_PTR(-ENOMEM);
@@ -713,7 +713,7 @@ prestera_acl_rule_entry_create(struct prestera_acl *acl,
struct prestera_acl_rule_entry *e;
int err;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
goto err_kzalloc;
@@ -816,7 +816,7 @@ int prestera_acl_vtcam_id_get(struct prestera_acl *acl, u8 lookup, u8 dir,
}
/* vtcam not found, try to create new one */
- vtcam = kzalloc_obj(*vtcam, GFP_KERNEL);
+ vtcam = kzalloc_obj(*vtcam);
if (!vtcam)
return -ENOMEM;
@@ -880,7 +880,7 @@ int prestera_acl_init(struct prestera_switch *sw)
struct prestera_acl *acl;
int err;
- acl = kzalloc_obj(*acl, GFP_KERNEL);
+ acl = kzalloc_obj(*acl);
if (!acl)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_counter.c b/drivers/net/ethernet/marvell/prestera/prestera_counter.c
index c59ed115c700..89f0ac592d70 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_counter.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_counter.c
@@ -147,7 +147,7 @@ prestera_counter_block_get(struct prestera_counter *counter, u32 client)
if (block)
return block;
- block = kzalloc_obj(*block, GFP_KERNEL);
+ block = kzalloc_obj(*block);
if (!block)
return ERR_PTR(-ENOMEM);
@@ -437,11 +437,11 @@ int prestera_counter_init(struct prestera_switch *sw)
{
struct prestera_counter *counter;
- counter = kzalloc_obj(*counter, GFP_KERNEL);
+ counter = kzalloc_obj(*counter);
if (!counter)
return -ENOMEM;
- counter->block_list = kzalloc_obj(*counter->block_list, GFP_KERNEL);
+ counter->block_list = kzalloc_obj(*counter->block_list);
if (!counter->block_list) {
kfree(counter);
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c b/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
index 981b9e835be7..5fd78abccf25 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_devlink.c
@@ -451,7 +451,7 @@ int prestera_devlink_traps_register(struct prestera_switch *sw)
struct prestera_trap *prestera_trap;
int err, i;
- trap_data = kzalloc_obj(*trap_data, GFP_KERNEL);
+ trap_data = kzalloc_obj(*trap_data);
if (!trap_data)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_flow.c b/drivers/net/ethernet/marvell/prestera/prestera_flow.c
index 21c052bfa6e8..88db1a59a57b 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_flow.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_flow.c
@@ -82,7 +82,7 @@ prestera_flow_block_create(struct prestera_switch *sw,
{
struct prestera_flow_block *block;
- block = kzalloc_obj(*block, GFP_KERNEL);
+ block = kzalloc_obj(*block);
if (!block)
return NULL;
@@ -130,7 +130,7 @@ static int prestera_flow_block_bind(struct prestera_flow_block *block,
struct prestera_flow_block_binding *binding;
int err;
- binding = kzalloc_obj(*binding, GFP_KERNEL);
+ binding = kzalloc_obj(*binding);
if (!binding)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_flower.c b/drivers/net/ethernet/marvell/prestera/prestera_flower.c
index 28077005efaa..58b116cabd48 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_flower.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_flower.c
@@ -495,7 +495,7 @@ int prestera_flower_tmplt_create(struct prestera_flow_block *block,
if (err)
return err;
- template = kmalloc_obj(*template, GFP_KERNEL);
+ template = kmalloc_obj(*template);
if (!template) {
err = -ENOMEM;
goto err_malloc;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_hw.c b/drivers/net/ethernet/marvell/prestera/prestera_hw.c
index e20bd0eca18d..7695cbb2ce62 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_hw.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_hw.c
@@ -2256,7 +2256,7 @@ int prestera_hw_event_handler_register(struct prestera_switch *sw,
if (eh)
return -EEXIST;
- eh = kmalloc_obj(*eh, GFP_KERNEL);
+ eh = kmalloc_obj(*eh);
if (!eh)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_main.c b/drivers/net/ethernet/marvell/prestera/prestera_main.c
index 0d12ed32586b..41e19e9ad28d 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_main.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_main.c
@@ -1014,7 +1014,7 @@ static int prestera_lag_init(struct prestera_switch *sw)
{
u16 id;
- sw->lags = kzalloc_objs(*sw->lags, sw->lag_max, GFP_KERNEL);
+ sw->lags = kzalloc_objs(*sw->lags, sw->lag_max);
if (!sw->lags)
return -ENOMEM;
@@ -1209,7 +1209,7 @@ prestera_mdb_entry_create(struct prestera_switch *sw,
struct prestera_flood_domain *flood_domain;
struct prestera_mdb_entry *mdb_entry;
- mdb_entry = kzalloc_obj(*mdb_entry, GFP_KERNEL);
+ mdb_entry = kzalloc_obj(*mdb_entry);
if (!mdb_entry)
goto err_mdb_alloc;
@@ -1247,7 +1247,7 @@ prestera_flood_domain_create(struct prestera_switch *sw)
{
struct prestera_flood_domain *domain;
- domain = kzalloc_obj(*domain, GFP_KERNEL);
+ domain = kzalloc_obj(*domain);
if (!domain)
return NULL;
@@ -1279,7 +1279,7 @@ prestera_flood_domain_port_create(struct prestera_flood_domain *flood_domain,
bool is_first_port_in_list = false;
int err;
- flood_domain_port = kzalloc_obj(*flood_domain_port, GFP_KERNEL);
+ flood_domain_port = kzalloc_obj(*flood_domain_port);
if (!flood_domain_port) {
err = -ENOMEM;
goto err_port_alloc;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router.c b/drivers/net/ethernet/marvell/prestera/prestera_router.c
index a75764610eef..b036b173a308 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_router.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_router.c
@@ -485,7 +485,7 @@ __prestera_kern_neigh_cache_create(struct prestera_switch *sw,
struct prestera_kern_neigh_cache *n_cache;
int err;
- n_cache = kzalloc_obj(*n_cache, GFP_KERNEL);
+ n_cache = kzalloc_obj(*n_cache);
if (!n_cache)
goto err_kzalloc;
@@ -623,7 +623,7 @@ prestera_kern_fib_cache_create(struct prestera_switch *sw,
struct prestera_kern_fib_cache *fib_cache;
int err;
- fib_cache = kzalloc_obj(*fib_cache, GFP_KERNEL);
+ fib_cache = kzalloc_obj(*fib_cache);
if (!fib_cache)
goto err_kzalloc;
@@ -1550,7 +1550,7 @@ int prestera_router_init(struct prestera_switch *sw)
struct prestera_router *router;
int err, nhgrp_cache_bytes;
- router = kzalloc_obj(*sw->router, GFP_KERNEL);
+ router = kzalloc_obj(*sw->router);
if (!router)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c b/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
index b94e28d403e7..ccf6cf98920f 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_router_hw.c
@@ -127,7 +127,7 @@ static struct prestera_vr *__prestera_vr_create(struct prestera_switch *sw,
struct prestera_vr *vr;
int err;
- vr = kzalloc_obj(*vr, GFP_KERNEL);
+ vr = kzalloc_obj(*vr);
if (!vr) {
err = -ENOMEM;
goto err_alloc_vr;
@@ -252,7 +252,7 @@ prestera_rif_entry_create(struct prestera_switch *sw,
struct prestera_rif_entry *e;
struct prestera_iface iface;
- e = kzalloc_obj(*e, GFP_KERNEL);
+ e = kzalloc_obj(*e);
if (!e)
goto err_kzalloc;
@@ -301,7 +301,7 @@ __prestera_nh_neigh_create(struct prestera_switch *sw,
struct prestera_nh_neigh *neigh;
int err;
- neigh = kzalloc_obj(*neigh, GFP_KERNEL);
+ neigh = kzalloc_obj(*neigh);
if (!neigh)
goto err_kzalloc;
@@ -397,7 +397,7 @@ __prestera_nexthop_group_create(struct prestera_switch *sw,
struct prestera_nh_neigh *nh_neigh;
int nh_cnt, err, gid;
- nh_grp = kzalloc_obj(*nh_grp, GFP_KERNEL);
+ nh_grp = kzalloc_obj(*nh_grp);
if (!nh_grp)
goto err_kzalloc;
@@ -628,7 +628,7 @@ prestera_fib_node_create(struct prestera_switch *sw,
struct prestera_vr *vr;
int err;
- fib_node = kzalloc_obj(*fib_node, GFP_KERNEL);
+ fib_node = kzalloc_obj(*fib_node);
if (!fib_node)
goto err_kzalloc;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_rxtx.c b/drivers/net/ethernet/marvell/prestera/prestera_rxtx.c
index 696625d6dcbc..c4ea247d2470 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_rxtx.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_rxtx.c
@@ -379,7 +379,7 @@ static int prestera_sdma_rx_init(struct prestera_sdma *sdma)
struct prestera_sdma_buf *head, *tail, *next, *prev;
struct prestera_rx_ring *ring = &sdma->rx_ring[q];
- ring->bufs = kmalloc_objs(*head, bnum, GFP_KERNEL);
+ ring->bufs = kmalloc_objs(*head, bnum);
if (!ring->bufs)
return -ENOMEM;
@@ -529,7 +529,7 @@ static int prestera_sdma_tx_init(struct prestera_sdma *sdma)
INIT_WORK(&sdma->tx_work, prestera_sdma_tx_recycle_work_fn);
spin_lock_init(&sdma->tx_lock);
- tx_ring->bufs = kmalloc_objs(*head, bnum, GFP_KERNEL);
+ tx_ring->bufs = kmalloc_objs(*head, bnum);
if (!tx_ring->bufs)
return -ENOMEM;
@@ -784,7 +784,7 @@ int prestera_rxtx_switch_init(struct prestera_switch *sw)
struct prestera_rxtx *rxtx;
int err;
- rxtx = kzalloc_obj(*rxtx, GFP_KERNEL);
+ rxtx = kzalloc_obj(*rxtx);
if (!rxtx)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_span.c b/drivers/net/ethernet/marvell/prestera/prestera_span.c
index dd86164e6a19..bb2f74524e1c 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_span.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_span.c
@@ -27,7 +27,7 @@ prestera_span_entry_create(struct prestera_port *port, u8 span_id)
{
struct prestera_span_entry *entry;
- entry = kzalloc_obj(*entry, GFP_KERNEL);
+ entry = kzalloc_obj(*entry);
if (!entry)
return ERR_PTR(-ENOMEM);
@@ -170,7 +170,7 @@ int prestera_span_init(struct prestera_switch *sw)
{
struct prestera_span *span;
- span = kzalloc_obj(*span, GFP_KERNEL);
+ span = kzalloc_obj(*span);
if (!span)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
index 1ca197fb08a6..2012d00fabec 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
@@ -180,7 +180,7 @@ prestera_bridge_vlan_create(struct prestera_bridge_port *br_port, u16 vid)
{
struct prestera_bridge_vlan *br_vlan;
- br_vlan = kzalloc_obj(*br_vlan, GFP_KERNEL);
+ br_vlan = kzalloc_obj(*br_vlan);
if (!br_vlan)
return NULL;
@@ -263,7 +263,7 @@ prestera_port_vlan_create(struct prestera_port *port, u16 vid, bool untagged)
if (err)
return ERR_PTR(err);
- port_vlan = kzalloc_obj(*port_vlan, GFP_KERNEL);
+ port_vlan = kzalloc_obj(*port_vlan);
if (!port_vlan) {
err = -ENOMEM;
goto err_port_vlan_alloc;
@@ -443,7 +443,7 @@ prestera_bridge_create(struct prestera_switchdev *swdev, struct net_device *dev)
return ERR_PTR(-EINVAL);
}
- bridge = kzalloc_obj(*bridge, GFP_KERNEL);
+ bridge = kzalloc_obj(*bridge);
if (!bridge)
return ERR_PTR(-ENOMEM);
@@ -562,7 +562,7 @@ prestera_bridge_port_create(struct prestera_bridge *bridge,
{
struct prestera_bridge_port *br_port;
- br_port = kzalloc_obj(*br_port, GFP_KERNEL);
+ br_port = kzalloc_obj(*br_port);
if (!br_port)
return NULL;
@@ -1498,7 +1498,7 @@ prestera_br_mdb_entry_create(struct prestera_switch *sw,
struct prestera_br_mdb_entry *br_mdb_entry;
struct prestera_mdb_entry *mdb_entry;
- br_mdb_entry = kzalloc_obj(*br_mdb_entry, GFP_KERNEL);
+ br_mdb_entry = kzalloc_obj(*br_mdb_entry);
if (!br_mdb_entry)
return NULL;
@@ -1530,7 +1530,7 @@ static int prestera_br_mdb_port_add(struct prestera_br_mdb_entry *br_mdb,
if (br_mdb_port->br_port == br_port)
return 0;
- br_mdb_port = kzalloc_obj(*br_mdb_port, GFP_KERNEL);
+ br_mdb_port = kzalloc_obj(*br_mdb_port);
if (!br_mdb_port)
return -ENOMEM;
@@ -1873,7 +1873,7 @@ int prestera_switchdev_init(struct prestera_switch *sw)
struct prestera_switchdev *swdev;
int err;
- swdev = kzalloc_obj(*swdev, GFP_KERNEL);
+ swdev = kzalloc_obj(*swdev);
if (!swdev)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index a2f6622e6ff5..bbbbbba63e15 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1024,7 +1024,7 @@ static int rxq_init(struct net_device *dev)
int rx_desc_num = pep->rx_ring_size;
/* Allocate RX skb rings */
- pep->rx_skb = kzalloc_objs(*pep->rx_skb, rx_desc_num, GFP_KERNEL);
+ pep->rx_skb = kzalloc_objs(*pep->rx_skb, rx_desc_num);
if (!pep->rx_skb)
return -ENOMEM;
@@ -1083,7 +1083,7 @@ static int txq_init(struct net_device *dev)
int size = 0, i = 0;
int tx_desc_num = pep->tx_ring_size;
- pep->tx_skb = kzalloc_objs(*pep->tx_skb, tx_desc_num, GFP_KERNEL);
+ pep->tx_skb = kzalloc_objs(*pep->tx_skb, tx_desc_num);
if (!pep->tx_skb)
return -ENOMEM;
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 49942779418c..e386c8314e21 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -918,7 +918,7 @@ static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u32 base)
struct skge_element *e;
int i;
- ring->start = kzalloc_objs(*e, ring->count, GFP_KERNEL);
+ ring->start = kzalloc_objs(*e, ring->count);
if (!ring->start)
return -ENOMEM;