Commit 323bbfcf authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Convert 'alloc_flex' family to use the new default GFP_KERNEL argument



This is the exact same thing as the 'alloc_obj()' version, only much
smaller because there are a lot fewer users of the *alloc_flex()
interface.

As with alloc_obj() version, this was done entirely with mindless brute
force, using the same script, except using 'flex' in the pattern rather
than 'objs*'.

Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bf4afc53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ static int __init init_atags_procfs(void)

	WARN_ON(tag->hdr.tag != ATAG_NONE);

	b = kmalloc_flex(*b, data, size, GFP_KERNEL);
	b = kmalloc_flex(*b, data, size);
	if (!b)
		goto nomem;

+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz)
	for_each_mem_range(i, &start, &end)
		nr_ranges++;

	cmem = kmalloc_flex(*cmem, ranges, nr_ranges, GFP_KERNEL);
	cmem = kmalloc_flex(*cmem, ranges, nr_ranges);
	if (!cmem)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz)
	for_each_mem_range(i, &start, &end)
		nr_ranges++;

	cmem = kmalloc_flex(*cmem, ranges, nr_ranges, GFP_KERNEL);
	cmem = kmalloc_flex(*cmem, ranges, nr_ranges);
	if (!cmem)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -344,7 +344,7 @@ static int ps3_setup_storage_dev(const struct ps3_repository_device *repo,
		 repo->dev_index, repo->dev_type, port, blk_size, num_blocks,
		 num_regions);

	p = kzalloc_flex(*p, regions, num_regions, GFP_KERNEL);
	p = kzalloc_flex(*p, regions, num_regions);
	if (!p) {
		result = -ENOMEM;
		goto fail_malloc;
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ static int prepare_elf_headers(void **addr, unsigned long *sz)
	nr_ranges = 1; /* For exclusion of crashkernel region */
	walk_system_ram_res(0, -1, &nr_ranges, get_nr_ram_ranges_callback);

	cmem = kmalloc_flex(*cmem, ranges, nr_ranges, GFP_KERNEL);
	cmem = kmalloc_flex(*cmem, ranges, nr_ranges);
	if (!cmem)
		return -ENOMEM;

Loading