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/ata | |
| 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/ata')
| -rw-r--r-- | drivers/ata/libata-acpi.c | 4 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 6 | ||||
| -rw-r--r-- | drivers/ata/libata-sata.c | 2 | ||||
| -rw-r--r-- | drivers/ata/libata-transport.c | 2 | ||||
| -rw-r--r-- | drivers/ata/libata-zpodd.c | 2 | ||||
| -rw-r--r-- | drivers/ata/pata_parport/pata_parport.c | 2 | ||||
| -rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 2 | ||||
| -rw-r--r-- | drivers/ata/sata_fsl.c | 4 |
8 files changed, 12 insertions, 12 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index a618313dea03..4433f626246b 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -194,7 +194,7 @@ void ata_acpi_bind_port(struct ata_port *ap) if (!adev || adev->hp) return; - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) return; @@ -236,7 +236,7 @@ void ata_acpi_bind_dev(struct ata_device *dev) if (!adev || adev->hp) return; - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) return; diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 02dde2517122..8ef2619c129c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2557,7 +2557,7 @@ static int ata_dev_init_cdl_resources(struct ata_device *dev) unsigned int err_mask; if (!cdl) { - cdl = kzalloc_obj(*cdl, GFP_KERNEL); + cdl = kzalloc_obj(*cdl); if (!cdl) return -ENOMEM; dev->cdl = cdl; @@ -5638,7 +5638,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) struct ata_port *ap; int id; - ap = kzalloc_obj(*ap, GFP_KERNEL); + ap = kzalloc_obj(*ap); if (!ap) return NULL; @@ -6714,7 +6714,7 @@ static void __init ata_parse_force_param(void) if (*p == ',') size++; - ata_force_tbl = kzalloc_objs(ata_force_tbl[0], size, GFP_KERNEL); + ata_force_tbl = kzalloc_objs(ata_force_tbl[0], size); if (!ata_force_tbl) { printk(KERN_WARNING "ata: failed to extend force table, " "libata.force ignored\n"); diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c index 04a0ad66958e..b9d635088f5f 100644 --- a/drivers/ata/libata-sata.c +++ b/drivers/ata/libata-sata.c @@ -849,7 +849,7 @@ int ata_slave_link_init(struct ata_port *ap) WARN_ON(ap->slave_link); WARN_ON(ap->flags & ATA_FLAG_PMP); - link = kzalloc_obj(*link, GFP_KERNEL); + link = kzalloc_obj(*link); if (!link) return -ENOMEM; diff --git a/drivers/ata/libata-transport.c b/drivers/ata/libata-transport.c index 85340ef98be3..2099d94c4f68 100644 --- a/drivers/ata/libata-transport.c +++ b/drivers/ata/libata-transport.c @@ -758,7 +758,7 @@ struct scsi_transport_template *ata_attach_transport(void) struct ata_internal *i; int count; - i = kzalloc_obj(struct ata_internal, GFP_KERNEL); + i = kzalloc_obj(struct ata_internal); if (!i) return NULL; diff --git a/drivers/ata/libata-zpodd.c b/drivers/ata/libata-zpodd.c index e550327e7bd9..414e7c63bd85 100644 --- a/drivers/ata/libata-zpodd.c +++ b/drivers/ata/libata-zpodd.c @@ -274,7 +274,7 @@ void zpodd_init(struct ata_device *dev) if (mech_type == ODD_MECH_TYPE_UNSUPPORTED) return; - zpodd = kzalloc_obj(struct zpodd, GFP_KERNEL); + zpodd = kzalloc_obj(struct zpodd); if (!zpodd) return; diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 93ca62cc6390..a5b959891cb7 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -511,7 +511,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport, if (id < 0) return NULL; - pi = kzalloc_obj(struct pi_adapter, GFP_KERNEL); + pi = kzalloc_obj(struct pi_adapter); if (!pi) { ida_free(&pata_parport_bus_dev_ids, id); return NULL; diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index e4fe47c8fa75..64cb544903d8 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c @@ -850,7 +850,7 @@ static int sata_dwc_port_start(struct ata_port *ap) } /* Allocate Port Struct */ - hsdevp = kzalloc_obj(*hsdevp, GFP_KERNEL); + hsdevp = kzalloc_obj(*hsdevp); if (!hsdevp) { err = -ENOMEM; goto CLEANUP; diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 703febbe0c03..be829fcc584d 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -706,7 +706,7 @@ static int sata_fsl_port_start(struct ata_port *ap) void __iomem *hcr_base = host_priv->hcr_base; u32 temp; - pp = kzalloc_obj(*pp, GFP_KERNEL); + pp = kzalloc_obj(*pp); if (!pp) return -ENOMEM; @@ -1451,7 +1451,7 @@ static int sata_fsl_probe(struct platform_device *ofdev) dev_dbg(&ofdev->dev, "@reset i/o = 0x%x\n", ioread32(csr_base + TRANSCFG)); - host_priv = kzalloc_obj(struct sata_fsl_host_priv, GFP_KERNEL); + host_priv = kzalloc_obj(struct sata_fsl_host_priv); if (!host_priv) goto error_exit_with_cleanup; |
