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/rapidio/devices | |
| 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/rapidio/devices')
| -rw-r--r-- | drivers/rapidio/devices/rio_mport_cdev.c | 18 | ||||
| -rw-r--r-- | drivers/rapidio/devices/tsi721.c | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c index 10277dff206e..009b3b595bbf 100644 --- a/drivers/rapidio/devices/rio_mport_cdev.c +++ b/drivers/rapidio/devices/rio_mport_cdev.c @@ -348,7 +348,7 @@ rio_mport_create_outbound_mapping(struct mport_dev *md, struct file *filp, rmcd_debug(OBW, "did=%d ra=0x%llx sz=0x%x", rioid, raddr, size); - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (map == NULL) return -ENOMEM; @@ -800,7 +800,7 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode, if (xfer->length == 0) return -EINVAL; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return -ENOMEM; @@ -835,7 +835,7 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode, offset = lower_32_bits(offset_in_page(xfer->loc_addr)); nr_pages = PAGE_ALIGN(xfer->length + offset) >> PAGE_SHIFT; - page_list = kmalloc_objs(*page_list, nr_pages, GFP_KERNEL); + page_list = kmalloc_objs(*page_list, nr_pages); if (page_list == NULL) { ret = -ENOMEM; goto err_req; @@ -1069,7 +1069,7 @@ static int rio_mport_create_dma_mapping(struct mport_dev *md, struct file *filp, { struct rio_mport_mapping *map; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (map == NULL) return -ENOMEM; @@ -1189,7 +1189,7 @@ rio_mport_create_inbound_mapping(struct mport_dev *md, struct file *filp, if (size > 0xffffffff) return -EINVAL; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (map == NULL) return -ENOMEM; @@ -1431,7 +1431,7 @@ static int rio_mport_add_db_filter(struct mport_cdev_priv *priv, return ret; } - db_filter = kzalloc_obj(*db_filter, GFP_KERNEL); + db_filter = kzalloc_obj(*db_filter); if (db_filter == NULL) { rio_release_inb_dbell(md->mport, filter.low, filter.high); return -ENOMEM; @@ -1539,7 +1539,7 @@ static int rio_mport_add_pw_filter(struct mport_cdev_priv *priv, if (copy_from_user(&filter, arg, sizeof(filter))) return -EFAULT; - pw_filter = kzalloc_obj(*pw_filter, GFP_KERNEL); + pw_filter = kzalloc_obj(*pw_filter); if (pw_filter == NULL) return -ENOMEM; @@ -1878,7 +1878,7 @@ static int mport_cdev_open(struct inode *inode, struct file *filp) get_device(&chdev->dev); - priv = kzalloc_obj(*priv, GFP_KERNEL); + priv = kzalloc_obj(*priv); if (!priv) { put_device(&chdev->dev); return -ENOMEM; @@ -2348,7 +2348,7 @@ static struct mport_dev *mport_cdev_add(struct rio_mport *mport) struct mport_dev *md; struct rio_mport_attr attr; - md = kzalloc_obj(*md, GFP_KERNEL); + md = kzalloc_obj(*md); if (!md) { rmcd_error("Unable allocate a device object"); return NULL; diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 9d3f2577bccb..66331e67cf4e 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -2774,7 +2774,7 @@ static int tsi721_probe(struct pci_dev *pdev, struct tsi721_device *priv; int err; - priv = kzalloc_obj(struct tsi721_device, GFP_KERNEL); + priv = kzalloc_obj(struct tsi721_device); if (!priv) { err = -ENOMEM; goto err_exit; |
