Re: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-30 Thread Dan Streetman
On Sun, May 21, 2017 at 4:27 AM, SF Markus Elfring
 wrote:
> From: Markus Elfring 
> Date: Sun, 21 May 2017 09:29:25 +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 | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index 3f0a9a1daef4..ed7312291df9 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -374,7 +374,6 @@ static int zswap_dstmem_prepare(unsigned int cpu)
> -   if (!dst) {
> -   pr_err("can't allocate compressor buffer\n");
> +   if (!dst)
> return -ENOMEM;
> -   }
> +
> per_cpu(zswap_dstmem, cpu) = dst;
> return 0;
>  }
> --
> 2.13.0
>


Re: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-30 Thread Dan Streetman
On Sun, May 21, 2017 at 4:27 AM, SF Markus Elfring
 wrote:
> From: Markus Elfring 
> Date: Sun, 21 May 2017 09:29:25 +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 | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/mm/zswap.c b/mm/zswap.c
> index 3f0a9a1daef4..ed7312291df9 100644
> --- a/mm/zswap.c
> +++ b/mm/zswap.c
> @@ -374,7 +374,6 @@ static int zswap_dstmem_prepare(unsigned int cpu)
> -   if (!dst) {
> -   pr_err("can't allocate compressor buffer\n");
> +   if (!dst)
> return -ENOMEM;
> -   }
> +
> per_cpu(zswap_dstmem, cpu) = dst;
> return 0;
>  }
> --
> 2.13.0
>


Re: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-21 Thread Wolfram Sang

Markus, can you please stop CCing me on every of those patches?

> 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 

And why do you create a patch for every occasion in the same file? Do
you want to increase your patch count?



signature.asc
Description: PGP signature


Re: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-21 Thread Wolfram Sang

Markus, can you please stop CCing me on every of those patches?

> 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 

And why do you create a patch for every occasion in the same file? Do
you want to increase your patch count?



signature.asc
Description: PGP signature


[PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-21 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sun, 21 May 2017 09:29:25 +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 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/zswap.c b/mm/zswap.c
index 3f0a9a1daef4..ed7312291df9 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -374,7 +374,6 @@ static int zswap_dstmem_prepare(unsigned int cpu)
-   if (!dst) {
-   pr_err("can't allocate compressor buffer\n");
+   if (!dst)
return -ENOMEM;
-   }
+
per_cpu(zswap_dstmem, cpu) = dst;
return 0;
 }
-- 
2.13.0



[PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()

2017-05-21 Thread SF Markus Elfring
From: Markus Elfring 
Date: Sun, 21 May 2017 09:29:25 +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 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/zswap.c b/mm/zswap.c
index 3f0a9a1daef4..ed7312291df9 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -374,7 +374,6 @@ static int zswap_dstmem_prepare(unsigned int cpu)
-   if (!dst) {
-   pr_err("can't allocate compressor buffer\n");
+   if (!dst)
return -ENOMEM;
-   }
+
per_cpu(zswap_dstmem, cpu) = dst;
return 0;
 }
-- 
2.13.0