Re: [PATCH 2/4] staging: zsmalloc: remove unused pool name
On Fri, Jan 25, 2013 at 11:46:16AM -0600, Seth Jennings wrote: > zs_create_pool() currently takes a name argument which is > never used in any useful way. > > This patch removes it. > > Acked-by: Nitin Gupta > Acked-by: Minchan Kim > Signed-off-by: Seth Jennnings > Acked-by: Dan Magenheimer > --- > drivers/staging/zram/zram_drv.c |2 +- > drivers/staging/zsmalloc/zsmalloc-main.c | 11 +++ > drivers/staging/zsmalloc/zsmalloc.h |2 +- > 3 files changed, 5 insertions(+), 10 deletions(-) As I'm not taking patch 1/4, this patch doesn't apply, sorry. greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] staging: zsmalloc: remove unused pool name
On Fri, Jan 25, 2013 at 11:46:16AM -0600, Seth Jennings wrote: zs_create_pool() currently takes a name argument which is never used in any useful way. This patch removes it. Acked-by: Nitin Gupta ngu...@vflare.org Acked-by: Minchan Kim minc...@kernel.org Signed-off-by: Seth Jennnings sjenn...@linux.vnet.ibm.com Acked-by: Dan Magenheimer dan.magenhei...@oracle.com --- drivers/staging/zram/zram_drv.c |2 +- drivers/staging/zsmalloc/zsmalloc-main.c | 11 +++ drivers/staging/zsmalloc/zsmalloc.h |2 +- 3 files changed, 5 insertions(+), 10 deletions(-) As I'm not taking patch 1/4, this patch doesn't apply, sorry. greg k-h -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] staging: zsmalloc: remove unused pool name
On Fri, Jan 25, 2013 at 11:46:16AM -0600, Seth Jennings wrote: > zs_create_pool() currently takes a name argument which is > never used in any useful way. > > This patch removes it. > > Acked-by: Nitin Gupta > Signed-off-by: Seth Jennnings Acked-by: Minchan Kim -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/4] staging: zsmalloc: remove unused pool name
On Fri, Jan 25, 2013 at 11:46:16AM -0600, Seth Jennings wrote: zs_create_pool() currently takes a name argument which is never used in any useful way. This patch removes it. Acked-by: Nitin Gupta ngu...@vflare.org Signed-off-by: Seth Jennnings sjenn...@linux.vnet.ibm.com Acked-by: Minchan Kim minc...@kernel.org -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] 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. Acked-by: Nitin Gupta Signed-off-by: Seth Jennnings --- drivers/staging/zram/zram_drv.c |2 +- drivers/staging/zsmalloc/zsmalloc-main.c | 11 +++ drivers/staging/zsmalloc/zsmalloc.h |2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 836dccf..2086682 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -565,7 +565,7 @@ int zram_init_device(struct zram *zram) /* zram devices sort of resembles non-rotational disks */ queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram->disk->queue); - zram->mem_pool = zs_create_pool("zram", GFP_KERNEL); + zram->mem_pool = zs_create_pool(GFP_KERNEL); if (!zram->mem_pool) { pr_err("Error creating memory pool\n"); ret = -ENOMEM; diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c index f29f170..711a854 100644 --- a/drivers/staging/zsmalloc/zsmalloc-main.c +++ b/drivers/staging/zsmalloc/zsmalloc-main.c @@ -798,8 +798,7 @@ fail: /** * zs_create_pool - Creates an allocation pool to work from. - * @name: name of the pool to be created - * @flags: allocation flags used when growing pool + * @flags: allocation flags used to allocate pool metadata * * This function must be called before anything when using * the zsmalloc allocator. @@ -807,14 +806,11 @@ fail: * On success, a pointer to the newly created pool is returned, * otherwise NULL. */ -struct zs_pool *zs_create_pool(const char *name, gfp_t flags) +struct zs_pool *zs_create_pool(gfp_t flags) { int i, ovhd_size; struct zs_pool *pool; - if (!name) - return NULL; - ovhd_size = roundup(sizeof(*pool), PAGE_SIZE); pool = kzalloc(ovhd_size, flags); if (!pool) @@ -836,8 +832,6 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags) } - pool->name = name; - return pool; } EXPORT_SYMBOL_GPL(zs_create_pool); @@ -866,6 +860,7 @@ EXPORT_SYMBOL_GPL(zs_destroy_pool); * zs_malloc - Allocate block of given size from pool. * @pool: pool to allocate from * @size: size of block to allocate + * @flags: gfp flags used when expanding the pool * * On success, handle to the allocated object is returned, * otherwise 0. diff --git a/drivers/staging/zsmalloc/zsmalloc.h b/drivers/staging/zsmalloc/zsmalloc.h index 907ff03..25a4b4d 100644 --- a/drivers/staging/zsmalloc/zsmalloc.h +++ b/drivers/staging/zsmalloc/zsmalloc.h @@ -28,7 +28,7 @@ enum zs_mapmode { struct zs_pool; -struct zs_pool *zs_create_pool(const char *name, gfp_t flags); +struct zs_pool *zs_create_pool(gfp_t flags); void zs_destroy_pool(struct zs_pool *pool); unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t flags); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 2/4] 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. Acked-by: Nitin Gupta ngu...@vflare.org Signed-off-by: Seth Jennnings sjenn...@linux.vnet.ibm.com --- drivers/staging/zram/zram_drv.c |2 +- drivers/staging/zsmalloc/zsmalloc-main.c | 11 +++ drivers/staging/zsmalloc/zsmalloc.h |2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 836dccf..2086682 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -565,7 +565,7 @@ int zram_init_device(struct zram *zram) /* zram devices sort of resembles non-rotational disks */ queue_flag_set_unlocked(QUEUE_FLAG_NONROT, zram-disk-queue); - zram-mem_pool = zs_create_pool(zram, GFP_KERNEL); + zram-mem_pool = zs_create_pool(GFP_KERNEL); if (!zram-mem_pool) { pr_err(Error creating memory pool\n); ret = -ENOMEM; diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c index f29f170..711a854 100644 --- a/drivers/staging/zsmalloc/zsmalloc-main.c +++ b/drivers/staging/zsmalloc/zsmalloc-main.c @@ -798,8 +798,7 @@ fail: /** * zs_create_pool - Creates an allocation pool to work from. - * @name: name of the pool to be created - * @flags: allocation flags used when growing pool + * @flags: allocation flags used to allocate pool metadata * * This function must be called before anything when using * the zsmalloc allocator. @@ -807,14 +806,11 @@ fail: * On success, a pointer to the newly created pool is returned, * otherwise NULL. */ -struct zs_pool *zs_create_pool(const char *name, gfp_t flags) +struct zs_pool *zs_create_pool(gfp_t flags) { int i, ovhd_size; struct zs_pool *pool; - if (!name) - return NULL; - ovhd_size = roundup(sizeof(*pool), PAGE_SIZE); pool = kzalloc(ovhd_size, flags); if (!pool) @@ -836,8 +832,6 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags) } - pool-name = name; - return pool; } EXPORT_SYMBOL_GPL(zs_create_pool); @@ -866,6 +860,7 @@ EXPORT_SYMBOL_GPL(zs_destroy_pool); * zs_malloc - Allocate block of given size from pool. * @pool: pool to allocate from * @size: size of block to allocate + * @flags: gfp flags used when expanding the pool * * On success, handle to the allocated object is returned, * otherwise 0. diff --git a/drivers/staging/zsmalloc/zsmalloc.h b/drivers/staging/zsmalloc/zsmalloc.h index 907ff03..25a4b4d 100644 --- a/drivers/staging/zsmalloc/zsmalloc.h +++ b/drivers/staging/zsmalloc/zsmalloc.h @@ -28,7 +28,7 @@ enum zs_mapmode { struct zs_pool; -struct zs_pool *zs_create_pool(const char *name, gfp_t flags); +struct zs_pool *zs_create_pool(gfp_t flags); void zs_destroy_pool(struct zs_pool *pool); unsigned long zs_malloc(struct zs_pool *pool, size_t size, gfp_t flags); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/