lib/sg_pool: remove unnecessary null check when free the object
PATCH 1/1 lib/sg_pool: remove unnecessary null check when free the object
kmem_cache_destroy/mempool_destroy has taken null check into account. so remove the redundant check.
--- lib/sg_pool.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
lib/sg_pool.c +3 -4
@@ -148,10 +148,9 @@ static __init int sg_pool_init(void) cleanup_sdb:for (i =0 ; i <SG_MEMPOOL_NR ; i++) {struct sg_pool *sgp = sg_pools + i; -if (sgp->pool) -mempool_destroy (sgp->pool); -if (sgp->slab) -kmem_cache_destroy (sgp->slab); + +mempool_destroy (sgp->pool); +kmem_cache_destroy (sgp->slab); }return -ENOMEM ;
Signature · 1 line
1.7.12.4
Hi, Thomas
Can you pick up the patch?
Thanks
zhong jiang
Quoted 26 lines · zhong jiang
kmem_cache_destroy/mempool_destroy has taken null check into account. so remove the redundant check.
Signed-off-by zhong jiang <[email protected]>--- lib/sg_pool.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)lib/sg_pool.c +3
-4@@ -148,10 +148,9 @@ static __init int sg_pool_init(void) cleanup_sdb:for (i =0 ; i <SG_MEMPOOL_NR ; i++) {struct sg_pool *sgp = sg_pools + i; -if (sgp->pool) -mempool_destroy (sgp->pool); -if (sgp->slab) -kmem_cache_destroy (sgp->slab); + +mempool_destroy (sgp->pool); +kmem_cache_destroy (sgp->slab); }return -ENOMEM ;
Quoted 3 lines · zhong jiang
Hi, Thomas
Can you pick up the patch?
I'm not picking up patches for lib/sg_pool. Why would I?
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · zhong jiang
Hi, Thomas
Can you pick up the patch?
I'm not picking up patches for
lib/sg_pool. Why would I?
I am sorry for that. I regard you as maintainer for lib/sg_pool mistakely. but I can get maintainer information nothing from get_maintainer.pl The code is not updated since 2016.
Thanks
zhong jiang
Quoted 10 lines · zhong jiang
Quoted 6 lines · Thomas Gleixner
Quoted 3 lines · zhong jiang
Hi, Thomas
Can you pick up the patch?
I'm not picking up patches for
lib/sg_pool. Why would I?I am sorry for that. I regard you as maintainer for
lib/sg_poolmistakely. but I can get maintainer information nothing from get_maintainer.pl The code is not updated since 2016.
Andrew Morton picks up such things.
Thanks,
tglx
Quoted 6 lines · Thomas Gleixner
Quoted 4 lines · zhong jiang
Quoted 3 lines · Thomas Gleixner
Quoted 2 lines · zhong jiang
Hi, Thomas
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Can you pick up the patch?
I'm not picking up patches for
lib/sg_pool. Why would I?I am sorry for that. I regard you as maintainer for
lib/sg_poolmistakely. but I can get maintainer information nothing from get_maintainer.pl The code is not updated since 2016.Andrew Morton picks up such things.
Thank you for your tips.
+to Andrew
Thanks
zhong jiang
Quoted 6 lines
Thanks,
tglx
.