提交 069007ae 编写于 作者: A Andrew Morton 提交者: Paul Mackerras

[PATCH] powerpc: hot_add_scn_to_nid() build fix

The return statement is to prevent `warning: 'nid' might be used uninitialized
in this function'.

Cc: Nathan Lynch <nathanl@austin.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 6088857b
......@@ -756,6 +756,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
struct device_node *memory = NULL;
nodemask_t nodes;
int default_nid = any_online_node(NODE_MASK_ALL);
int nid;
if (!numa_enabled || (min_common_depth < 0))
return default_nid;
......@@ -790,6 +791,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
goto ha_new_range;
}
BUG(); /* section address should be found above */
return 0;
/* Temporary code to ensure that returned node is not empty */
got_nid:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册