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 | |
| 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')
| -rw-r--r-- | drivers/rapidio/devices/rio_mport_cdev.c | 18 | ||||
| -rw-r--r-- | drivers/rapidio/devices/tsi721.c | 2 | ||||
| -rw-r--r-- | drivers/rapidio/rio.c | 18 | ||||
| -rw-r--r-- | drivers/rapidio/rio_cm.c | 16 |
4 files changed, 27 insertions, 27 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; diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c index c811cc3ebc5d..0c175e6d424f 100644 --- a/drivers/rapidio/rio.c +++ b/drivers/rapidio/rio.c @@ -107,7 +107,7 @@ EXPORT_SYMBOL(rio_query_mport); */ struct rio_net *rio_alloc_net(struct rio_mport *mport) { - struct rio_net *net = kzalloc_obj(*net, GFP_KERNEL); + struct rio_net *net = kzalloc_obj(*net); if (net) { INIT_LIST_HEAD(&net->node); @@ -242,7 +242,7 @@ int rio_request_inb_mbox(struct rio_mport *mport, if (!mport->ops->open_inb_mbox) goto out; - res = kzalloc_obj(*res, GFP_KERNEL); + res = kzalloc_obj(*res); if (res) { rio_init_mbox_res(res, mbox, mbox); @@ -326,7 +326,7 @@ int rio_request_outb_mbox(struct rio_mport *mport, if (!mport->ops->open_outb_mbox) goto out; - res = kzalloc_obj(*res, GFP_KERNEL); + res = kzalloc_obj(*res); if (res) { rio_init_mbox_res(res, mbox, mbox); @@ -403,7 +403,7 @@ rio_setup_inb_dbell(struct rio_mport *mport, void *dev_id, struct resource *res, void (*dinb) (struct rio_mport * mport, void *dev_id, u16 src, u16 dst, u16 info)) { - struct rio_dbell *dbell = kmalloc_obj(*dbell, GFP_KERNEL); + struct rio_dbell *dbell = kmalloc_obj(*dbell); if (!dbell) return -ENOMEM; @@ -438,7 +438,7 @@ int rio_request_inb_dbell(struct rio_mport *mport, u16 dst, u16 info)) { int rc; - struct resource *res = kzalloc_obj(*res, GFP_KERNEL); + struct resource *res = kzalloc_obj(*res); if (res) { rio_init_dbell_res(res, start, end); @@ -515,7 +515,7 @@ EXPORT_SYMBOL_GPL(rio_release_inb_dbell); struct resource *rio_request_outb_dbell(struct rio_dev *rdev, u16 start, u16 end) { - struct resource *res = kzalloc_obj(struct resource, GFP_KERNEL); + struct resource *res = kzalloc_obj(struct resource); if (res) { rio_init_dbell_res(res, start, end); @@ -563,7 +563,7 @@ int rio_add_mport_pw_handler(struct rio_mport *mport, void *context, int (*pwcback)(struct rio_mport *mport, void *context, union rio_pw_msg *msg, int step)) { - struct rio_pwrite *pwrite = kzalloc_obj(*pwrite, GFP_KERNEL); + struct rio_pwrite *pwrite = kzalloc_obj(*pwrite); if (!pwrite) return -ENOMEM; @@ -1865,7 +1865,7 @@ int rio_register_scan(int mport_id, struct rio_scan *scan_ops) /* * Allocate and initialize new scan registration node. */ - scan = kzalloc_obj(*scan, GFP_KERNEL); + scan = kzalloc_obj(*scan); if (!scan) { rc = -ENOMEM; goto err_out; @@ -2000,7 +2000,7 @@ int rio_init_mports(void) goto no_disc; } - work = kzalloc_objs(*work, n, GFP_KERNEL); + work = kzalloc_objs(*work, n); if (!work) { destroy_workqueue(rio_wq); goto no_disc; diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c index d01c749de5fd..c55af5924da2 100644 --- a/drivers/rapidio/rio_cm.c +++ b/drivers/rapidio/rio_cm.c @@ -389,7 +389,7 @@ static int riocm_req_handler(struct cm_dev *cm, void *req_data) return -EINVAL; } - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) { riocm_put_channel(ch); return -ENOMEM; @@ -702,7 +702,7 @@ static int riocm_queue_req(struct cm_dev *cm, struct rio_dev *rdev, unsigned long flags; struct tx_req *treq; - treq = kzalloc_obj(*treq, GFP_KERNEL); + treq = kzalloc_obj(*treq); if (treq == NULL) return -ENOMEM; @@ -965,7 +965,7 @@ static int riocm_ch_connect(u16 loc_ch, struct cm_dev *cm, * Send connect request to the remote RapidIO device */ - hdr = kzalloc_obj(*hdr, GFP_KERNEL); + hdr = kzalloc_obj(*hdr); if (hdr == NULL) { ret = -ENOMEM; goto conn_done; @@ -1022,7 +1022,7 @@ static int riocm_send_ack(struct rio_channel *ch) struct rio_ch_chan_hdr *hdr; int ret; - hdr = kzalloc_obj(*hdr, GFP_KERNEL); + hdr = kzalloc_obj(*hdr); if (hdr == NULL) return -ENOMEM; @@ -1283,7 +1283,7 @@ static struct rio_channel *riocm_ch_alloc(u16 ch_num) int start, end; struct rio_channel *ch; - ch = kzalloc_obj(*ch, GFP_KERNEL); + ch = kzalloc_obj(*ch); if (!ch) return ERR_PTR(-ENOMEM); @@ -1396,7 +1396,7 @@ static int riocm_send_close(struct rio_channel *ch) * Send CH_CLOSE notification to the remote RapidIO device */ - hdr = kzalloc_obj(*hdr, GFP_KERNEL); + hdr = kzalloc_obj(*hdr); if (hdr == NULL) return -ENOMEM; @@ -1952,7 +1952,7 @@ static int riocm_add_dev(struct device *dev, struct subsys_interface *sif) riocm_debug(RDEV, "(%s)", rio_name(rdev)); - peer = kmalloc_obj(*peer, GFP_KERNEL); + peer = kmalloc_obj(*peer); if (!peer) return -ENOMEM; @@ -2099,7 +2099,7 @@ static int riocm_add_mport(struct device *dev) riocm_debug(MPORT, "add mport %s", mport->name); - cm = kzalloc_obj(*cm, GFP_KERNEL); + cm = kzalloc_obj(*cm); if (!cm) return -ENOMEM; |
