From: Mahendran Ganesh <opensource.ganesh@gmail.com>
To: minchan@kernel.org, ngupta@vflare.org
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Mahendran Ganesh <opensource.ganesh@gmail.com>
Subject: [PATCH] mm/zsmalloc: remove uninitialized_var
Date: Mon, 24 Nov 2014 22:02:47 +0800 [thread overview]
Message-ID: <1416837767-6868-1-git-send-email-opensource.ganesh@gmail.com> (raw)
uninitialized_var() is not recommended to be used to
avoid compiler warnings
https://lkml.org/lkml/2012/10/27/71
So this patch initializes ret with *NOTIFY_OK*.
Signed-off-by: Mahendran Ganesh <opensource.ganesh@gmail.com>
---
mm/zsmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index bb55736..480fa4c 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -897,7 +897,7 @@ static void zs_unregister_cpu_notifier(void)
static int zs_register_cpu_notifier(void)
{
- int cpu, uninitialized_var(ret);
+ int cpu, ret = NOTIFY_OK;
cpu_notifier_register_begin();
--
1.7.9.5
--
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>
reply other threads:[~2014-11-24 14:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1416837767-6868-1-git-send-email-opensource.ganesh@gmail.com \
--to=opensource.ganesh@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
/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).