Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: zsmalloc: remove unused pool name

zs_create_pool() currently takes a name argument which is
never used in any useful way.

This patch removes it.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Seth Jennings and committed by
Greg Kroah-Hartman
0d145a50 5ccac0fd

+4 -10
+1 -1
drivers/staging/zram/zram_drv.c
··· 575 575 /* zram devices sort of resembles non-rotational disks */ 576 576 queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram->disk->queue); 577 577 578 - zram->mem_pool = zs_create_pool("zram", GFP_NOIO | __GFP_HIGHMEM); 578 + zram->mem_pool = zs_create_pool(GFP_NOIO | __GFP_HIGHMEM); 579 579 if (!zram->mem_pool) { 580 580 pr_err("Error creating memory pool\n"); 581 581 ret = -ENOMEM;
+2 -8
drivers/staging/zsmalloc/zsmalloc-main.c
··· 207 207 struct size_class size_class[ZS_SIZE_CLASSES]; 208 208 209 209 gfp_t flags; /* allocation flags used when growing pool */ 210 - const char *name; 211 210 }; 212 211 213 212 /* ··· 797 798 798 799 /** 799 800 * zs_create_pool - Creates an allocation pool to work from. 800 - * @name: name of the pool to be created 801 - * @flags: allocation flags used when growing pool 801 + * @flags: allocation flags used to allocate pool metadata 802 802 * 803 803 * This function must be called before anything when using 804 804 * the zsmalloc allocator. ··· 805 807 * On success, a pointer to the newly created pool is returned, 806 808 * otherwise NULL. 807 809 */ 808 - struct zs_pool *zs_create_pool(const char *name, gfp_t flags) 810 + struct zs_pool *zs_create_pool(gfp_t flags) 809 811 { 810 812 int i, ovhd_size; 811 813 struct zs_pool *pool; 812 - 813 - if (!name) 814 - return NULL; 815 814 816 815 ovhd_size = roundup(sizeof(*pool), PAGE_SIZE); 817 816 pool = kzalloc(ovhd_size, GFP_KERNEL); ··· 832 837 } 833 838 834 839 pool->flags = flags; 835 - pool->name = name; 836 840 837 841 return pool; 838 842 }
+1 -1
drivers/staging/zsmalloc/zsmalloc.h
··· 28 28 29 29 struct zs_pool; 30 30 31 - struct zs_pool *zs_create_pool(const char *name, gfp_t flags); 31 + struct zs_pool *zs_create_pool(gfp_t flags); 32 32 void zs_destroy_pool(struct zs_pool *pool); 33 33 34 34 unsigned long zs_malloc(struct zs_pool *pool, size_t size);