lkml.org 
[lkml]   [2014]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/zsmalloc: remove uninitialized_var
Date
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


\
 
 \ /
  Last update: 2014-11-24 15:41    [W:0.134 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site