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/xen/xenbus | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
| download | linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz linux-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/xen/xenbus')
| -rw-r--r-- | drivers/xen/xenbus/xenbus_client.c | 4 | ||||
| -rw-r--r-- | drivers/xen/xenbus/xenbus_dev_frontend.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index 61739961838c..0ab1329e79de 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c @@ -535,11 +535,11 @@ int xenbus_map_ring_valloc(struct xenbus_device *dev, grant_ref_t *gnt_refs, if (nr_grefs > XENBUS_MAX_RING_GRANTS) return -EINVAL; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) return -ENOMEM; - info->node = kzalloc_obj(*info->node, GFP_KERNEL); + info->node = kzalloc_obj(*info->node); if (!info->node) err = -ENOMEM; else diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c index 7b37d80b82ed..417631350eb0 100644 --- a/drivers/xen/xenbus/xenbus_dev_frontend.c +++ b/drivers/xen/xenbus/xenbus_dev_frontend.c @@ -242,7 +242,7 @@ static struct watch_adapter *alloc_watch_adapter(const char *path, { struct watch_adapter *watch; - watch = kzalloc_obj(*watch, GFP_KERNEL); + watch = kzalloc_obj(*watch); if (watch == NULL) goto out_fail; @@ -454,7 +454,7 @@ static int xenbus_write_transaction(unsigned msg_type, } *msg = (void *)u->u.buffer; if (msg_type == XS_TRANSACTION_START) { - trans = kzalloc_obj(*trans, GFP_KERNEL); + trans = kzalloc_obj(*trans); if (!trans) { rc = -ENOMEM; goto out; @@ -655,7 +655,7 @@ static int xenbus_file_open(struct inode *inode, struct file *filp) stream_open(inode, filp); - u = kzalloc_obj(*u, GFP_KERNEL); + u = kzalloc_obj(*u); if (u == NULL) return -ENOMEM; |
