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/message | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
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/message')
| -rw-r--r-- | drivers/message/fusion/mptbase.c | 4 | ||||
| -rw-r--r-- | drivers/message/fusion/mptfc.c | 6 | ||||
| -rw-r--r-- | drivers/message/fusion/mptlan.c | 4 | ||||
| -rw-r--r-- | drivers/message/fusion/mptsas.c | 16 | ||||
| -rw-r--r-- | drivers/message/fusion/mptspi.c | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index de771eb6facd..3a431ffd3e2e 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c @@ -1771,7 +1771,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) struct proc_dir_entry *dent; #endif - ioc = kzalloc_obj(MPT_ADAPTER, GFP_KERNEL); + ioc = kzalloc_obj(MPT_ADAPTER); if (ioc == NULL) { printk(KERN_ERR MYNAM ": ERROR - Insufficient memory to add adapter!\n"); return -ENOMEM; @@ -5700,7 +5700,7 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id) buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0) continue; - if ((component_info = kmalloc_obj(*component_info, GFP_KERNEL)) == NULL) + if ((component_info = kmalloc_obj(*component_info)) == NULL) continue; component_info->volumeID = id; diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index b65bc679106a..b55deb988ad9 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -484,7 +484,7 @@ mptfc_register_dev(MPT_ADAPTER *ioc, int channel, FCDevicePage0_t *pg0) } } if (new_ri) { /* allocate one */ - ri = kzalloc_obj(struct mptfc_rport_info, GFP_KERNEL); + ri = kzalloc_obj(struct mptfc_rport_info); if (!ri) return; list_add_tail(&ri->list, &ioc->fc_rports); @@ -572,7 +572,7 @@ mptfc_target_alloc(struct scsi_target *starget) struct mptfc_rport_info *ri; int rc; - vtarget = kzalloc_obj(VirtTarget, GFP_KERNEL); + vtarget = kzalloc_obj(VirtTarget); if (!vtarget) return -ENOMEM; starget->hostdata = vtarget; @@ -650,7 +650,7 @@ mptfc_sdev_init(struct scsi_device *sdev) hd = shost_priv(sdev->host); ioc = hd->ioc; - vdevice = kzalloc_obj(VirtDevice, GFP_KERNEL); + vdevice = kzalloc_obj(VirtDevice); if (!vdevice) { printk(MYIOC_s_ERR_FMT "sdev_init kmalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index 0da0d472aaff..a4d0184eeda0 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c @@ -391,7 +391,7 @@ mpt_lan_open(struct net_device *dev) "a moment.\n"); } - priv->mpt_txfidx = kmalloc_objs(int, priv->tx_max_out, GFP_KERNEL); + priv->mpt_txfidx = kmalloc_objs(int, priv->tx_max_out); if (priv->mpt_txfidx == NULL) goto out; priv->mpt_txfidx_tail = -1; @@ -405,7 +405,7 @@ mpt_lan_open(struct net_device *dev) dlprintk((KERN_INFO MYNAM "@lo: Finished initializing SendCtl\n")); - priv->mpt_rxfidx = kmalloc_objs(int, priv->max_buckets_out, GFP_KERNEL); + priv->mpt_rxfidx = kmalloc_objs(int, priv->max_buckets_out); if (priv->mpt_rxfidx == NULL) goto out_SendCtl; priv->mpt_rxfidx_tail = -1; diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 0b9e787ae3d5..82719241e4c1 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -603,7 +603,7 @@ mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id, } } - sas_info = kzalloc_obj(struct mptsas_device_info, GFP_KERNEL); + sas_info = kzalloc_obj(struct mptsas_device_info); if (!sas_info) goto out; @@ -756,7 +756,7 @@ mptsas_add_device_component_starget_ir(MPT_ADAPTER *ioc, } } - sas_info = kzalloc_obj(struct mptsas_device_info, GFP_KERNEL); + sas_info = kzalloc_obj(struct mptsas_device_info); if (sas_info) { sas_info->fw.id = starget->id; sas_info->os.id = starget->id; @@ -1751,7 +1751,7 @@ mptsas_target_alloc(struct scsi_target *starget) int i; MPT_ADAPTER *ioc = hd->ioc; - vtarget = kzalloc_obj(VirtTarget, GFP_KERNEL); + vtarget = kzalloc_obj(VirtTarget); if (!vtarget) return -ENOMEM; @@ -1878,7 +1878,7 @@ mptsas_sdev_init(struct scsi_device *sdev) int i; MPT_ADAPTER *ioc = hd->ioc; - vdevice = kzalloc_obj(VirtDevice, GFP_KERNEL); + vdevice = kzalloc_obj(VirtDevice); if (!vdevice) { printk(MYIOC_s_ERR_FMT "sdev_init kzalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); @@ -3309,7 +3309,7 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc) struct mptsas_portinfo *port_info, *hba; int error = -ENOMEM, i; - hba = kzalloc_obj(struct mptsas_portinfo, GFP_KERNEL); + hba = kzalloc_obj(struct mptsas_portinfo); if (! hba) goto out; @@ -3444,7 +3444,7 @@ mptsas_expander_event_add(MPT_ADAPTER *ioc, int i; __le64 sas_address; - port_info = kzalloc_obj(struct mptsas_portinfo, GFP_KERNEL); + port_info = kzalloc_obj(struct mptsas_portinfo); BUG_ON(!port_info); port_info->num_phys = (expander_data->NumPhys) ? expander_data->NumPhys : 1; @@ -3677,7 +3677,7 @@ mptsas_expander_add(MPT_ADAPTER *ioc, u16 handle) MPI_SAS_EXPAND_PGAD_FORM_SHIFT), handle))) return NULL; - port_info = kzalloc_obj(struct mptsas_portinfo, GFP_KERNEL); + port_info = kzalloc_obj(struct mptsas_portinfo); if (!port_info) { dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "%s: exit at line=%d\n", ioc->name, @@ -3945,7 +3945,7 @@ mptsas_probe_expanders(MPT_ADAPTER *ioc) continue; } - port_info = kzalloc_obj(struct mptsas_portinfo, GFP_KERNEL); + port_info = kzalloc_obj(struct mptsas_portinfo); if (!port_info) { dfailprintk(ioc, printk(MYIOC_s_ERR_FMT "%s: exit at line=%d\n", ioc->name, diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 62cf9d582386..56892b1f3de2 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c @@ -405,7 +405,7 @@ static int mptspi_target_alloc(struct scsi_target *starget) return -ENODEV; ioc = hd->ioc; - vtarget = kzalloc_obj(VirtTarget, GFP_KERNEL); + vtarget = kzalloc_obj(VirtTarget); if (!vtarget) return -ENOMEM; @@ -725,7 +725,7 @@ static int mptspi_sdev_init(struct scsi_device *sdev) mptscsih_is_phys_disk(ioc, 0, sdev->id) == 0) return -ENXIO; - vdevice = kzalloc_obj(VirtDevice, GFP_KERNEL); + vdevice = kzalloc_obj(VirtDevice); if (!vdevice) { printk(MYIOC_s_ERR_FMT "sdev_init kmalloc(%zd) FAILED!\n", ioc->name, sizeof(VirtDevice)); |
