Commit dfbe93a2 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: Coding style cleanups

While converting code to use for_each_node_by_type I noticed a
number of coding style issues.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 94db7c5e
...@@ -281,11 +281,11 @@ static void __init initialize_cache_info(void) ...@@ -281,11 +281,11 @@ static void __init initialize_cache_info(void)
for_each_node_by_type(np, "cpu") { for_each_node_by_type(np, "cpu") {
num_cpus += 1; num_cpus += 1;
/* We're assuming *all* of the CPUs have the same /*
* We're assuming *all* of the CPUs have the same
* d-cache and i-cache sizes... -Peter * d-cache and i-cache sizes... -Peter
*/ */
if (num_cpus == 1) {
if ( num_cpus == 1 ) {
const u32 *sizep, *lsizep; const u32 *sizep, *lsizep;
u32 size, lsize; u32 size, lsize;
...@@ -294,10 +294,13 @@ static void __init initialize_cache_info(void) ...@@ -294,10 +294,13 @@ static void __init initialize_cache_info(void)
sizep = of_get_property(np, "d-cache-size", NULL); sizep = of_get_property(np, "d-cache-size", NULL);
if (sizep != NULL) if (sizep != NULL)
size = *sizep; size = *sizep;
lsizep = of_get_property(np, "d-cache-block-size", NULL); lsizep = of_get_property(np, "d-cache-block-size",
NULL);
/* fallback if block size missing */ /* fallback if block size missing */
if (lsizep == NULL) if (lsizep == NULL)
lsizep = of_get_property(np, "d-cache-line-size", NULL); lsizep = of_get_property(np,
"d-cache-line-size",
NULL);
if (lsizep != NULL) if (lsizep != NULL)
lsize = *lsizep; lsize = *lsizep;
if (sizep == 0 || lsizep == 0) if (sizep == 0 || lsizep == 0)
...@@ -314,9 +317,12 @@ static void __init initialize_cache_info(void) ...@@ -314,9 +317,12 @@ static void __init initialize_cache_info(void)
sizep = of_get_property(np, "i-cache-size", NULL); sizep = of_get_property(np, "i-cache-size", NULL);
if (sizep != NULL) if (sizep != NULL)
size = *sizep; size = *sizep;
lsizep = of_get_property(np, "i-cache-block-size", NULL); lsizep = of_get_property(np, "i-cache-block-size",
NULL);
if (lsizep == NULL) if (lsizep == NULL)
lsizep = of_get_property(np, "i-cache-line-size", NULL); lsizep = of_get_property(np,
"i-cache-line-size",
NULL);
if (lsizep != NULL) if (lsizep != NULL)
lsize = *lsizep; lsize = *lsizep;
if (sizep == 0 || lsizep == 0) if (sizep == 0 || lsizep == 0)
......
...@@ -709,7 +709,6 @@ static void __init parse_drconf_memory(struct device_node *memory) ...@@ -709,7 +709,6 @@ static void __init parse_drconf_memory(struct device_node *memory)
static int __init parse_numa_properties(void) static int __init parse_numa_properties(void)
{ {
struct device_node *cpu = NULL;
struct device_node *memory; struct device_node *memory;
int default_nid = 0; int default_nid = 0;
unsigned long i; unsigned long i;
...@@ -732,6 +731,7 @@ static int __init parse_numa_properties(void) ...@@ -732,6 +731,7 @@ static int __init parse_numa_properties(void)
* each node to be onlined must have NODE_DATA etc backing it. * each node to be onlined must have NODE_DATA etc backing it.
*/ */
for_each_present_cpu(i) { for_each_present_cpu(i) {
struct device_node *cpu;
int nid; int nid;
cpu = of_get_cpu_node(i, NULL); cpu = of_get_cpu_node(i, NULL);
...@@ -800,8 +800,9 @@ static int __init parse_numa_properties(void) ...@@ -800,8 +800,9 @@ static int __init parse_numa_properties(void)
} }
/* /*
* Now do the same thing for each MEMBLOCK listed in the ibm,dynamic-memory * Now do the same thing for each MEMBLOCK listed in the
* property in the ibm,dynamic-reconfiguration-memory node. * ibm,dynamic-memory property in the
* ibm,dynamic-reconfiguration-memory node.
*/ */
memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory"); memory = of_find_node_by_path("/ibm,dynamic-reconfiguration-memory");
if (memory) if (memory)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment