Re: [PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create()
On Sun, May 21, 2017 at 4:25 AM, SF Markus Elfringwrote: > From: Markus Elfring > Date: Sat, 20 May 2017 22:33:21 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Link: > http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > Signed-off-by: Markus Elfring Acked-by: Dan Streetman > --- > mm/zswap.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/zswap.c b/mm/zswap.c > index eedc27894b10..18d8e87119a6 100644 > --- a/mm/zswap.c > +++ b/mm/zswap.c > @@ -518,7 +518,5 @@ static struct zswap_pool *zswap_pool_create(char *type, > char *compressor) > - if (!pool) { > - pr_err("pool alloc failed\n"); > + if (!pool) > return NULL; > - } > > /* unique name for each pool specifically required by zsmalloc */ > snprintf(name, 38, "zswap%x", atomic_inc_return(_pools_count)); > -- > 2.13.0 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kvack.org;> em...@kvack.org
Re: [PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create()
On Sun, May 21, 2017 at 4:25 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 20 May 2017 22:33:21 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Link: > http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf > Signed-off-by: Markus Elfring Acked-by: Dan Streetman > --- > mm/zswap.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/zswap.c b/mm/zswap.c > index eedc27894b10..18d8e87119a6 100644 > --- a/mm/zswap.c > +++ b/mm/zswap.c > @@ -518,7 +518,5 @@ static struct zswap_pool *zswap_pool_create(char *type, > char *compressor) > - if (!pool) { > - pr_err("pool alloc failed\n"); > + if (!pool) > return NULL; > - } > > /* unique name for each pool specifically required by zsmalloc */ > snprintf(name, 38, "zswap%x", atomic_inc_return(_pools_count)); > -- > 2.13.0 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: mailto:"d...@kvack.org;> em...@kvack.org
[PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create()
From: Markus ElfringDate: Sat, 20 May 2017 22:33:21 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- mm/zswap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index eedc27894b10..18d8e87119a6 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -518,7 +518,5 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor) - if (!pool) { - pr_err("pool alloc failed\n"); + if (!pool) return NULL; - } /* unique name for each pool specifically required by zsmalloc */ snprintf(name, 38, "zswap%x", atomic_inc_return(_pools_count)); -- 2.13.0
[PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create()
From: Markus Elfring Date: Sat, 20 May 2017 22:33:21 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- mm/zswap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index eedc27894b10..18d8e87119a6 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -518,7 +518,5 @@ static struct zswap_pool *zswap_pool_create(char *type, char *compressor) - if (!pool) { - pr_err("pool alloc failed\n"); + if (!pool) return NULL; - } /* unique name for each pool specifically required by zsmalloc */ snprintf(name, 38, "zswap%x", atomic_inc_return(_pools_count)); -- 2.13.0