summaryrefslogtreecommitdiff
path: root/drivers/vdpa/vdpa_user/vduse_dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/vdpa/vdpa_user/vduse_dev.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-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/vdpa/vdpa_user/vduse_dev.c')
-rw-r--r--drivers/vdpa/vdpa_user/vduse_dev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.c
index 7478aa8d5489..6202f6902fcd 100644
--- a/drivers/vdpa/vdpa_user/vduse_dev.c
+++ b/drivers/vdpa/vdpa_user/vduse_dev.c
@@ -1232,7 +1232,7 @@ static int vduse_dev_reg_umem(struct vduse_dev *dev,
npages = size >> PAGE_SHIFT;
page_list = __vmalloc(array_size(npages, sizeof(struct page *)),
GFP_KERNEL_ACCOUNT);
- umem = kzalloc_obj(*umem, GFP_KERNEL);
+ umem = kzalloc_obj(*umem);
if (!page_list || !umem)
goto unlock;
@@ -1800,12 +1800,12 @@ static int vduse_dev_init_vqs(struct vduse_dev *dev, u32 vq_align, u32 vq_num)
dev->vq_align = vq_align;
dev->vq_num = vq_num;
- dev->vqs = kzalloc_objs(*dev->vqs, dev->vq_num, GFP_KERNEL);
+ dev->vqs = kzalloc_objs(*dev->vqs, dev->vq_num);
if (!dev->vqs)
return -ENOMEM;
for (i = 0; i < vq_num; i++) {
- dev->vqs[i] = kzalloc_obj(*dev->vqs[i], GFP_KERNEL);
+ dev->vqs[i] = kzalloc_obj(*dev->vqs[i]);
if (!dev->vqs[i]) {
ret = -ENOMEM;
goto err;
@@ -1839,7 +1839,7 @@ err:
static struct vduse_dev *vduse_dev_create(void)
{
- struct vduse_dev *dev = kzalloc_obj(*dev, GFP_KERNEL);
+ struct vduse_dev *dev = kzalloc_obj(*dev);
if (!dev)
return NULL;
@@ -2076,7 +2076,7 @@ static int vduse_create_dev(struct vduse_dev_config *config,
dev->vendor_id = config->vendor_id;
dev->nas = (dev->api_version < VDUSE_API_VERSION_1) ? 1 : config->nas;
- dev->as = kzalloc_objs(dev->as[0], dev->nas, GFP_KERNEL);
+ dev->as = kzalloc_objs(dev->as[0], dev->nas);
if (!dev->as)
goto err_as;
for (int i = 0; i < dev->nas; i++)
@@ -2085,7 +2085,7 @@ static int vduse_create_dev(struct vduse_dev_config *config,
dev->ngroups = (dev->api_version < VDUSE_API_VERSION_1)
? 1
: config->ngroups;
- dev->groups = kzalloc_objs(dev->groups[0], dev->ngroups, GFP_KERNEL);
+ dev->groups = kzalloc_objs(dev->groups[0], dev->ngroups);
if (!dev->groups)
goto err_vq_groups;
for (u32 i = 0; i < dev->ngroups; ++i) {
@@ -2226,7 +2226,7 @@ static int vduse_open(struct inode *inode, struct file *file)
{
struct vduse_control *control;
- control = kmalloc_obj(struct vduse_control, GFP_KERNEL);
+ control = kmalloc_obj(struct vduse_control);
if (!control)
return -ENOMEM;
@@ -2356,7 +2356,7 @@ static int vduse_mgmtdev_init(void)
{
int ret;
- vduse_mgmt = kzalloc_obj(*vduse_mgmt, GFP_KERNEL);
+ vduse_mgmt = kzalloc_obj(*vduse_mgmt);
if (!vduse_mgmt)
return -ENOMEM;