summaryrefslogtreecommitdiff
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 20:03:00 -0800
commit32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch)
tree65f84985b9ed2d5cf3c5243aca78d9428e25c312 /drivers/vdpa
parent323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff)
downloadlinux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.tar.gz
linux-next-32a92f8c89326985e05dce8b22d3f0aa07a3e1bd.zip
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split over multiple lines. I only did the ones that are easy to verify the resulting diff by having just that final GFP_KERNEL argument on the next line. Somebody should probably do a proper coccinelle script for this, but for me the trivial script actually resulted in an assertion failure in the middle of the script. I probably had made it a bit _too_ trivial. So after fighting that far a while I decided to just do some of the syntactically simpler cases with variations of the previous 'sed' scripts. The more syntactically complex multi-line cases would mostly really want whitespace cleanup anyway. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/mlx5/net/mlx5_vnet.c3
-rw-r--r--drivers/vdpa/vdpa_sim/vdpa_sim.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 4acd61285885..8425ad23b961 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -3903,8 +3903,7 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
mlx5_cmd_init_async_ctx(mdev, &mvdev->async_ctx);
ndev->vqs = kzalloc_objs(*ndev->vqs, max_vqs);
- ndev->event_cbs = kzalloc_objs(*ndev->event_cbs, max_vqs + 1,
- GFP_KERNEL);
+ ndev->event_cbs = kzalloc_objs(*ndev->event_cbs, max_vqs + 1);
if (!ndev->vqs || !ndev->event_cbs) {
err = -ENOMEM;
goto err_alloc;
diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 24b4fca22893..5fbecb95f7ff 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -246,13 +246,11 @@ struct vdpasim *vdpasim_create(struct vdpasim_dev_attr *dev_attr,
if (!vdpasim->config)
goto err_iommu;
- vdpasim->vqs = kzalloc_objs(struct vdpasim_virtqueue, dev_attr->nvqs,
- GFP_KERNEL);
+ vdpasim->vqs = kzalloc_objs(struct vdpasim_virtqueue, dev_attr->nvqs);
if (!vdpasim->vqs)
goto err_iommu;
- vdpasim->iommu = kmalloc_objs(*vdpasim->iommu, vdpasim->dev_attr.nas,
- GFP_KERNEL);
+ vdpasim->iommu = kmalloc_objs(*vdpasim->iommu, vdpasim->dev_attr.nas);
if (!vdpasim->iommu)
goto err_iommu;