mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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>
This commit is contained in:
@@ -1122,7 +1122,7 @@ int amdgpu_ttm_mmio_remap_alloc_sgt(struct amdgpu_device *adev,
|
||||
phys = adev->rmmio_remap.bus_addr + cur.start;
|
||||
|
||||
/* Build a single-entry sg_table mapped as I/O (no struct page backing). */
|
||||
*sgt = kzalloc_obj(**sgt, GFP_KERNEL);
|
||||
*sgt = kzalloc_obj(**sgt);
|
||||
if (!*sgt)
|
||||
return -ENOMEM;
|
||||
r = sg_alloc_table(*sgt, 1, GFP_KERNEL);
|
||||
@@ -1172,7 +1172,7 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo,
|
||||
struct amdgpu_ttm_tt *gtt;
|
||||
enum ttm_caching caching;
|
||||
|
||||
gtt = kzalloc_obj(struct amdgpu_ttm_tt, GFP_KERNEL);
|
||||
gtt = kzalloc_obj(struct amdgpu_ttm_tt);
|
||||
if (!gtt)
|
||||
return NULL;
|
||||
|
||||
@@ -1213,7 +1213,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_device *bdev,
|
||||
|
||||
/* user pages are bound by amdgpu_ttm_tt_pin_userptr() */
|
||||
if (gtt->userptr) {
|
||||
ttm->sg = kzalloc_obj(struct sg_table, GFP_KERNEL);
|
||||
ttm->sg = kzalloc_obj(struct sg_table);
|
||||
if (!ttm->sg)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user