mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 09:22:53 -04:00
powerpc: Fix warnings for arch/powerpc/mm/numa.c
Simple fixes for sparse warnings in this file.
Resolves:
arch/powerpc/mm/numa.c:198:24:
warning: Using plain integer as NULL pointer
arch/powerpc/mm/numa.c:1157:5:
warning: symbol 'hot_add_node_scn_to_nid' was not declared.
Should it be static?
arch/powerpc/mm/numa.c:1238:28:
warning: Using plain integer as NULL pointer
arch/powerpc/mm/numa.c:1538:6:
warning: symbol 'topology_schedule_update' was not declared.
Should it be static?
Signed-off-by: Robert C Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
f5467e28d4
commit
ec32dd663d
@@ -195,7 +195,7 @@ static const __be32 *of_get_usable_memory(struct device_node *memory)
|
||||
u32 len;
|
||||
prop = of_get_property(memory, "linux,drconf-usable-memory", &len);
|
||||
if (!prop || len < sizeof(unsigned int))
|
||||
return 0;
|
||||
return NULL;
|
||||
return prop;
|
||||
}
|
||||
|
||||
@@ -1154,7 +1154,7 @@ static int hot_add_drconf_scn_to_nid(struct device_node *memory,
|
||||
* represented in the device tree as a node (i.e. memory@XXXX) for
|
||||
* each memblock.
|
||||
*/
|
||||
int hot_add_node_scn_to_nid(unsigned long scn_addr)
|
||||
static int hot_add_node_scn_to_nid(unsigned long scn_addr)
|
||||
{
|
||||
struct device_node *memory;
|
||||
int nid = -1;
|
||||
@@ -1235,7 +1235,7 @@ static u64 hot_add_drconf_memory_max(void)
|
||||
struct device_node *memory = NULL;
|
||||
unsigned int drconf_cell_cnt = 0;
|
||||
u64 lmb_size = 0;
|
||||
const __be32 *dm = 0;
|
||||
const __be32 *dm = NULL;
|
||||
|
||||
memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
|
||||
if (memory) {
|
||||
@@ -1535,7 +1535,7 @@ static void topology_work_fn(struct work_struct *work)
|
||||
}
|
||||
static DECLARE_WORK(topology_work, topology_work_fn);
|
||||
|
||||
void topology_schedule_update(void)
|
||||
static void topology_schedule_update(void)
|
||||
{
|
||||
schedule_work(&topology_work);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user