From: Dan Streetman <ddstreet@ieee.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: Linux-MM <linux-mm@kvack.org>,
Seth Jennings <sjenning@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Date: Tue, 30 May 2017 19:20:00 -0400 [thread overview]
Message-ID: <CALZtONA5gyeqioF=F4BWpJ8T8-kc-BNsuas0gK4555GS-GkApQ@mail.gmail.com> (raw)
In-Reply-To: <bae25b04-2ce2-7137-a71c-50d7b4f06431@users.sourceforge.net>
On Sun, May 21, 2017 at 4:27 AM, SF Markus Elfring
<elfring@users.sourceforge.net> wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> 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 <elfring@users.sourceforge.net>
Acked-by: Dan Streetman <ddstreet@ieee.org>
> ---
> 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
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2017-05-30 23:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 8:23 [PATCH 0/3] zswap: Adjustments for three function implementations SF Markus Elfring
2017-05-21 8:25 ` [PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create() SF Markus Elfring
2017-05-30 23:18 ` Dan Streetman
2017-05-21 8:26 ` [PATCH 2/3] zswap: Improve a size determination in zswap_frontswap_init() SF Markus Elfring
2017-05-30 23:19 ` Dan Streetman
2017-05-21 8:27 ` [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare() SF Markus Elfring
2017-05-21 8:47 ` Wolfram Sang
2017-05-21 9:40 ` SF Markus Elfring
2017-05-21 9:56 ` Wolfram Sang
2017-05-21 10:12 ` Using best practices for big software change possibilities SF Markus Elfring
2017-05-21 10:27 ` Wolfram Sang
2017-05-21 10:45 ` SF Markus Elfring
2017-05-30 23:20 ` Dan Streetman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALZtONA5gyeqioF=F4BWpJ8T8-kc-BNsuas0gK4555GS-GkApQ@mail.gmail.com' \
--to=ddstreet@ieee.org \
--cc=elfring@users.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sjenning@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).