Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-mm@kvack.org, Dan Streetman <ddstreet@ieee.org>,
	Seth Jennings <sjenning@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare()
Date: Sun, 21 May 2017 10:27:30 +0200
Message-ID: <bae25b04-2ce2-7137-a71c-50d7b4f06431@users.sourceforge.net> (raw)
In-Reply-To: <05101843-91f6-3243-18ea-acac8e8ef6af@users.sourceforge.net>

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>
---
 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>

  parent reply index

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 ` SF Markus Elfring [this message]
2017-05-21  8:47   ` [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare() 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   ` [PATCH 3/3] zswap: Delete an error message for a failed memory allocation in zswap_dstmem_prepare() Dan Streetman

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=bae25b04-2ce2-7137-a71c-50d7b4f06431@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=ddstreet@ieee.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sjenning@redhat.com \
    --cc=wsa@the-dreams.de \
    /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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git