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/gpu/drm/tegra | |
| 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/gpu/drm/tegra')
| -rw-r--r-- | drivers/gpu/drm/tegra/dc.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/drm.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/dsi.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/fb.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/gem.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/hub.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/plane.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/sor.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/submit.c | 10 | ||||
| -rw-r--r-- | drivers/gpu/drm/tegra/uapi.c | 4 |
10 files changed, 28 insertions, 28 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 21cadb50c671..06370b7e0e56 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -812,7 +812,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm, const u32 *formats; int err; - plane = kzalloc_obj(*plane, GFP_KERNEL); + plane = kzalloc_obj(*plane); if (!plane) return ERR_PTR(-ENOMEM); @@ -1115,7 +1115,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm, const u32 *formats; int err; - plane = kzalloc_obj(*plane, GFP_KERNEL); + plane = kzalloc_obj(*plane); if (!plane) return ERR_PTR(-ENOMEM); @@ -1263,7 +1263,7 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm, const u32 *formats; int err; - plane = kzalloc_obj(*plane, GFP_KERNEL); + plane = kzalloc_obj(*plane); if (!plane) return ERR_PTR(-ENOMEM); @@ -1389,7 +1389,7 @@ static void tegra_dc_destroy(struct drm_crtc *crtc) static void tegra_crtc_reset(struct drm_crtc *crtc) { - struct tegra_dc_state *state = kzalloc_obj(*state, GFP_KERNEL); + struct tegra_dc_state *state = kzalloc_obj(*state); if (crtc->state) tegra_crtc_atomic_destroy_state(crtc, crtc->state); @@ -1406,7 +1406,7 @@ tegra_crtc_atomic_duplicate_state(struct drm_crtc *crtc) struct tegra_dc_state *state = to_dc_state(crtc->state); struct tegra_dc_state *copy; - copy = kmalloc_obj(*copy, GFP_KERNEL); + copy = kmalloc_obj(*copy); if (!copy) return NULL; diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 1d1bbeae4522..1dcef4e7d104 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -104,7 +104,7 @@ static int tegra_drm_open(struct drm_device *drm, struct drm_file *filp) { struct tegra_drm_file *fpriv; - fpriv = kzalloc_obj(*fpriv, GFP_KERNEL); + fpriv = kzalloc_obj(*fpriv); if (!fpriv) return -ENOMEM; @@ -212,7 +212,7 @@ int tegra_drm_submit(struct tegra_drm_context *context, */ num_refs = num_cmdbufs + num_relocs * 2; - refs = kmalloc_objs(*refs, num_refs, GFP_KERNEL); + refs = kmalloc_objs(*refs, num_refs); if (!refs) { err = -ENOMEM; goto put; @@ -465,7 +465,7 @@ static int tegra_open_channel(struct drm_device *drm, void *data, struct tegra_drm_client *client; int err = -ENODEV; - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) return -ENOMEM; @@ -1147,7 +1147,7 @@ static int host1x_drm_probe(struct host1x_device *dev) if (IS_ERR(drm)) return PTR_ERR(drm); - tegra = kzalloc_obj(*tegra, GFP_KERNEL); + tegra = kzalloc_obj(*tegra); if (!tegra) { err = -ENOMEM; goto put; diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index f28e7bd63508..2c5aefe9621a 100644 --- a/drivers/gpu/drm/tegra/dsi.c +++ b/drivers/gpu/drm/tegra/dsi.c @@ -772,7 +772,7 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi) static void tegra_dsi_connector_reset(struct drm_connector *connector) { - struct tegra_dsi_state *state = kzalloc_obj(*state, GFP_KERNEL); + struct tegra_dsi_state *state = kzalloc_obj(*state); if (!state) return; diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index e795570776fd..1e4803d355dd 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -112,7 +112,7 @@ struct drm_framebuffer *tegra_fb_alloc(struct drm_device *drm, unsigned int i; int err; - fb = kzalloc_obj(*fb, GFP_KERNEL); + fb = kzalloc_obj(*fb); if (!fb) return ERR_PTR(-ENOMEM); diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c index c7355b11424c..d2bae88ad545 100644 --- a/drivers/gpu/drm/tegra/gem.c +++ b/drivers/gpu/drm/tegra/gem.c @@ -64,7 +64,7 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_ struct host1x_bo_mapping *map; int err; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) return ERR_PTR(-ENOMEM); @@ -103,7 +103,7 @@ static struct host1x_bo_mapping *tegra_bo_pin(struct device *dev, struct host1x_ * If we don't have a mapping for this buffer yet, return an SG table * so that host1x can do the mapping for us via the DMA API. */ - map->sgt = kzalloc_obj(*map->sgt, GFP_KERNEL); + map->sgt = kzalloc_obj(*map->sgt); if (!map->sgt) { err = -ENOMEM; goto free; @@ -240,7 +240,7 @@ static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) if (bo->mm) return -EBUSY; - bo->mm = kzalloc_obj(*bo->mm, GFP_KERNEL); + bo->mm = kzalloc_obj(*bo->mm); if (!bo->mm) return -ENOMEM; @@ -302,7 +302,7 @@ static struct tegra_bo *tegra_bo_alloc_object(struct drm_device *drm, struct tegra_bo *bo; int err; - bo = kzalloc_obj(*bo, GFP_KERNEL); + bo = kzalloc_obj(*bo); if (!bo) return ERR_PTR(-ENOMEM); @@ -639,7 +639,7 @@ tegra_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, struct tegra_bo *bo = to_tegra_bo(gem); struct sg_table *sgt; - sgt = kmalloc_obj(*sgt, GFP_KERNEL); + sgt = kmalloc_obj(*sgt); if (!sgt) return NULL; diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c index e0f84efb3b76..a6fa196c2813 100644 --- a/drivers/gpu/drm/tegra/hub.c +++ b/drivers/gpu/drm/tegra/hub.c @@ -769,7 +769,7 @@ struct drm_plane *tegra_shared_plane_create(struct drm_device *drm, const u32 *formats; int err; - plane = kzalloc_obj(*plane, GFP_KERNEL); + plane = kzalloc_obj(*plane); if (!plane) return ERR_PTR(-ENOMEM); @@ -943,7 +943,7 @@ static int tegra_display_hub_init(struct host1x_client *client) struct tegra_drm *tegra = drm->dev_private; struct tegra_display_hub_state *state; - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) return -ENOMEM; diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index ce49c2de2c08..0cb30910773f 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -36,7 +36,7 @@ static void tegra_plane_reset(struct drm_plane *plane) kfree(plane->state); plane->state = NULL; - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (state) { plane->state = &state->base; plane->state->plane = plane; @@ -55,7 +55,7 @@ tegra_plane_atomic_duplicate_state(struct drm_plane *plane) struct tegra_plane_state *copy; unsigned int i; - copy = kmalloc_obj(*copy, GFP_KERNEL); + copy = kmalloc_obj(*copy); if (!copy) return NULL; diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index a2cb68f42612..de8b2dfc4984 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -1721,7 +1721,7 @@ static void tegra_sor_connector_reset(struct drm_connector *connector) { struct tegra_sor_state *state; - state = kzalloc_obj(*state, GFP_KERNEL); + state = kzalloc_obj(*state); if (!state) return; diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 7747d5b9f3ca..3009b8b9e619 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/tegra/submit.c @@ -71,7 +71,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction struct host1x_bo_mapping *map; int err; - map = kzalloc_obj(*map, GFP_KERNEL); + map = kzalloc_obj(*map); if (!map) return ERR_PTR(-ENOMEM); @@ -80,7 +80,7 @@ gather_bo_pin(struct device *dev, struct host1x_bo *bo, enum dma_data_direction map->direction = direction; map->dev = dev; - map->sgt = kzalloc_obj(*map->sgt, GFP_KERNEL); + map->sgt = kzalloc_obj(*map->sgt); if (!map->sgt) { err = -ENOMEM; goto free; @@ -193,7 +193,7 @@ static int submit_copy_gather_data(struct gather_bo **pbo, struct device *dev, return -EINVAL; } - bo = kzalloc_obj(*bo, GFP_KERNEL); + bo = kzalloc_obj(*bo); if (!bo) { SUBMIT_ERR(context, "failed to allocate memory for bo info"); return -ENOMEM; @@ -270,7 +270,7 @@ static int submit_process_bufs(struct tegra_drm_context *context, struct gather_ return PTR_ERR(bufs); } - mappings = kzalloc_objs(*mappings, args->num_bufs, GFP_KERNEL); + mappings = kzalloc_objs(*mappings, args->num_bufs); if (!mappings) { SUBMIT_ERR(context, "failed to allocate memory for mapping info"); err = -ENOMEM; @@ -560,7 +560,7 @@ int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data, if (err) goto unlock; - job_data = kzalloc_obj(*job_data, GFP_KERNEL); + job_data = kzalloc_obj(*job_data); if (!job_data) { SUBMIT_ERR(context, "failed to allocate memory for job data"); err = -ENOMEM; diff --git a/drivers/gpu/drm/tegra/uapi.c b/drivers/gpu/drm/tegra/uapi.c index c4061d0f69a7..c0ac6b45f2d7 100644 --- a/drivers/gpu/drm/tegra/uapi.c +++ b/drivers/gpu/drm/tegra/uapi.c @@ -86,7 +86,7 @@ int tegra_drm_ioctl_channel_open(struct drm_device *drm, void *data, struct drm_ if (args->flags) return -EINVAL; - context = kzalloc_obj(*context, GFP_KERNEL); + context = kzalloc_obj(*context); if (!context) return -ENOMEM; @@ -206,7 +206,7 @@ int tegra_drm_ioctl_channel_map(struct drm_device *drm, void *data, struct drm_f return -EINVAL; } - mapping = kzalloc_obj(*mapping, GFP_KERNEL); + mapping = kzalloc_obj(*mapping); if (!mapping) { err = -ENOMEM; goto unlock; |
