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 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create()
Date: Sun, 21 May 2017 10:25:03 +0200 [thread overview]
Message-ID: <2345aabc-ae98-1d31-afba-40a02c5baf3d@users.sourceforge.net> (raw)
In-Reply-To: <05101843-91f6-3243-18ea-acac8e8ef6af@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
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 <elfring@users.sourceforge.net>
---
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(&zswap_pools_count));
--
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>
next prev parent reply other threads:[~2017-05-21 8:25 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 ` SF Markus Elfring [this message]
2017-05-30 23:18 ` [PATCH 1/3] zswap: Delete an error message for a failed memory allocation in zswap_pool_create() 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 ` [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=2345aabc-ae98-1d31-afba-40a02c5baf3d@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
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).