aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-08-10 16:44:23 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-20 01:53:23 -0400
commitdfbe93a222e74b6f96ad84eff2b04a0f864fac65 (patch)
tree6ce5719fc890a57f143f17949c90f4629882a9e9 /arch/powerpc/kernel
parent94db7c5e14f44b943febe54e089d077cd983d284 (diff)
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: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/setup_64.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index eade1fd8ee2e..d4168c93098f 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -281,11 +281,11 @@ static void __init initialize_cache_info(void)
281 for_each_node_by_type(np, "cpu") { 281 for_each_node_by_type(np, "cpu") {
282 num_cpus += 1; 282 num_cpus += 1;
283 283
284 /* We're assuming *all* of the CPUs have the same 284 /*
285 * We're assuming *all* of the CPUs have the same
285 * d-cache and i-cache sizes... -Peter 286 * d-cache and i-cache sizes... -Peter
286 */ 287 */
287 288 if (num_cpus == 1) {
288 if ( num_cpus == 1 ) {
289 const u32 *sizep, *lsizep; 289 const u32 *sizep, *lsizep;
290 u32 size, lsize; 290 u32 size, lsize;
291 291
@@ -294,10 +294,13 @@ static void __init initialize_cache_info(void)
294 sizep = of_get_property(np, "d-cache-size", NULL); 294 sizep = of_get_property(np, "d-cache-size", NULL);
295 if (sizep != NULL) 295 if (sizep != NULL)
296 size = *sizep; 296 size = *sizep;
297 lsizep = of_get_property(np, "d-cache-block-size", NULL); 297 lsizep = of_get_property(np, "d-cache-block-size",
298 NULL);
298 /* fallback if block size missing */ 299 /* fallback if block size missing */
299 if (lsizep == NULL) 300 if (lsizep == NULL)
300 lsizep = of_get_property(np, "d-cache-line-size", NULL); 301 lsizep = of_get_property(np,
302 "d-cache-line-size",
303 NULL);
301 if (lsizep != NULL) 304 if (lsizep != NULL)
302 lsize = *lsizep; 305 lsize = *lsizep;
303 if (sizep == 0 || lsizep == 0) 306 if (sizep == 0 || lsizep == 0)
@@ -314,9 +317,12 @@ static void __init initialize_cache_info(void)
314 sizep = of_get_property(np, "i-cache-size", NULL); 317 sizep = of_get_property(np, "i-cache-size", NULL);
315 if (sizep != NULL) 318 if (sizep != NULL)
316 size = *sizep; 319 size = *sizep;
317 lsizep = of_get_property(np, "i-cache-block-size", NULL); 320 lsizep = of_get_property(np, "i-cache-block-size",
321 NULL);
318 if (lsizep == NULL) 322 if (lsizep == NULL)
319 lsizep = of_get_property(np, "i-cache-line-size", NULL); 323 lsizep = of_get_property(np,
324 "i-cache-line-size",
325 NULL);
320 if (lsizep != NULL) 326 if (lsizep != NULL)
321 lsize = *lsizep; 327 lsize = *lsizep;
322 if (sizep == 0 || lsizep == 0) 328 if (sizep == 0 || lsizep == 0)