]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/kernel/setup_64.c
Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / arch / powerpc / kernel / setup_64.c
index dc6655594e9dd2c8a8098d47d44f628d606dbd77..1a9dea80a69b46a42b9df6ed4ce4d45f385abb85 100644 (file)
@@ -278,14 +278,14 @@ static void __init initialize_cache_info(void)
 
        DBG(" -> initialize_cache_info()\n");
 
-       for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) {
+       for_each_node_by_type(np, "cpu") {
                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
                 */
-
-               if ( num_cpus == 1 ) {
+               if (num_cpus == 1) {
                        const u32 *sizep, *lsizep;
                        u32 size, lsize;
 
@@ -294,10 +294,13 @@ static void __init initialize_cache_info(void)
                        sizep = of_get_property(np, "d-cache-size", NULL);
                        if (sizep != NULL)
                                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 */
                        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)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)
@@ -314,9 +317,12 @@ static void __init initialize_cache_info(void)
                        sizep = of_get_property(np, "i-cache-size", NULL);
                        if (sizep != NULL)
                                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)
-                               lsizep = of_get_property(np, "i-cache-line-size", NULL);
+                               lsizep = of_get_property(np,
+                                                        "i-cache-line-size",
+                                                        NULL);
                        if (lsizep != NULL)
                                lsize = *lsizep;
                        if (sizep == 0 || lsizep == 0)