diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/scsi/bnx2fc | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | lwn-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/scsi/bnx2fc')
| -rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 6 | ||||
| -rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_io.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 84f7f7ef75b3..c2f2c383b1f4 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -1356,7 +1356,7 @@ static struct bnx2fc_hba *bnx2fc_hba_create(struct cnic_dev *cnic) struct fcoe_capabilities *fcoe_cap; int rc; - hba = kzalloc_obj(*hba, GFP_KERNEL); + hba = kzalloc_obj(*hba); if (!hba) { printk(KERN_ERR PFX "Unable to allocate hba structure\n"); return NULL; @@ -1492,7 +1492,7 @@ static struct fc_lport *bnx2fc_if_create(struct bnx2fc_interface *interface, struct bnx2fc_hba *hba = interface->hba; int rc = 0; - blport = kzalloc_obj(struct bnx2fc_lport, GFP_KERNEL); + blport = kzalloc_obj(struct bnx2fc_lport); if (!blport) { BNX2FC_HBA_DBG(ctlr->lp, "Unable to alloc blport\n"); return NULL; @@ -2200,7 +2200,7 @@ static int __bnx2fc_enable(struct fcoe_ctlr *ctlr) if (!hba->cnic->get_fc_npiv_tbl) goto done; - npiv_tbl = kzalloc_obj(struct cnic_fc_npiv_tbl, GFP_KERNEL); + npiv_tbl = kzalloc_obj(struct cnic_fc_npiv_tbl); if (!npiv_tbl) goto done; diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index ba299196dee9..d8d6afed1575 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -241,7 +241,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba) } cmgr->hba = hba; - cmgr->free_list = kzalloc_objs(*cmgr->free_list, arr_sz, GFP_KERNEL); + cmgr->free_list = kzalloc_objs(*cmgr->free_list, arr_sz); if (!cmgr->free_list) { printk(KERN_ERR PFX "failed to alloc free_list\n"); goto mem_err; @@ -271,7 +271,7 @@ struct bnx2fc_cmd_mgr *bnx2fc_cmd_mgr_alloc(struct bnx2fc_hba *hba) xid = BNX2FC_MIN_XID; num_pri_ios = num_ios - hba->elstm_xids; for (i = 0; i < num_ios; i++) { - io_req = kzalloc_obj(*io_req, GFP_KERNEL); + io_req = kzalloc_obj(*io_req); if (!io_req) { printk(KERN_ERR PFX "failed to alloc io_req\n"); |
