aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Larrew <jlarrew@linux.vnet.ibm.com>2011-01-20 14:01:35 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-02-06 21:05:36 -0500
commitcd9d6cc7266ca7f3ad9bacb3262a0fda38f13c6f (patch)
tree9f8b329f1c76f647b5c2b5217537f0ac1d1ac0ad
parent7639adaafbfe988d814d45181389fac7697d844e (diff)
powerpc/pseries: Remove unnecessary variable initializations in numa.c
Remove unnecessary variable initializations in VPHN functions. Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/mm/numa.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 6c0cd06d0d59..9e36cafe3078 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1303,10 +1303,10 @@ static void set_topology_timer(void);
1303 */ 1303 */
1304static void setup_cpu_associativity_change_counters(void) 1304static void setup_cpu_associativity_change_counters(void)
1305{ 1305{
1306 int cpu = 0; 1306 int cpu;
1307 1307
1308 for_each_possible_cpu(cpu) { 1308 for_each_possible_cpu(cpu) {
1309 int i = 0; 1309 int i;
1310 u8 *counts = vphn_cpu_change_counts[cpu]; 1310 u8 *counts = vphn_cpu_change_counts[cpu];
1311 volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts; 1311 volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;
1312 1312
@@ -1328,7 +1328,7 @@ static void setup_cpu_associativity_change_counters(void)
1328 */ 1328 */
1329static int update_cpu_associativity_changes_mask(void) 1329static int update_cpu_associativity_changes_mask(void)
1330{ 1330{
1331 int cpu = 0, nr_cpus = 0; 1331 int cpu, nr_cpus = 0;
1332 cpumask_t *changes = &cpu_associativity_changes_mask; 1332 cpumask_t *changes = &cpu_associativity_changes_mask;
1333 1333
1334 cpumask_clear(changes); 1334 cpumask_clear(changes);
@@ -1362,8 +1362,7 @@ static int update_cpu_associativity_changes_mask(void)
1362 */ 1362 */
1363static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked) 1363static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
1364{ 1364{
1365 int i = 0; 1365 int i, nr_assoc_doms = 0;
1366 int nr_assoc_doms = 0;
1367 const u16 *field = (const u16*) packed; 1366 const u16 *field = (const u16*) packed;
1368 1367
1369#define VPHN_FIELD_UNUSED (0xffff) 1368#define VPHN_FIELD_UNUSED (0xffff)
@@ -1402,7 +1401,7 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
1402 */ 1401 */
1403static long hcall_vphn(unsigned long cpu, unsigned int *associativity) 1402static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
1404{ 1403{
1405 long rc = 0; 1404 long rc;
1406 long retbuf[PLPAR_HCALL9_BUFSIZE] = {0}; 1405 long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
1407 u64 flags = 1; 1406 u64 flags = 1;
1408 int hwcpu = get_hard_smp_processor_id(cpu); 1407 int hwcpu = get_hard_smp_processor_id(cpu);
@@ -1416,7 +1415,7 @@ static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
1416static long vphn_get_associativity(unsigned long cpu, 1415static long vphn_get_associativity(unsigned long cpu,
1417 unsigned int *associativity) 1416 unsigned int *associativity)
1418{ 1417{
1419 long rc = 0; 1418 long rc;
1420 1419
1421 rc = hcall_vphn(cpu, associativity); 1420 rc = hcall_vphn(cpu, associativity);
1422 1421
@@ -1442,9 +1441,9 @@ static long vphn_get_associativity(unsigned long cpu,
1442 */ 1441 */
1443int arch_update_cpu_topology(void) 1442int arch_update_cpu_topology(void)
1444{ 1443{
1445 int cpu = 0, nid = 0, old_nid = 0; 1444 int cpu, nid, old_nid;
1446 unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0}; 1445 unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
1447 struct sys_device *sysdev = NULL; 1446 struct sys_device *sysdev;
1448 1447
1449 for_each_cpu_mask(cpu, cpu_associativity_changes_mask) { 1448 for_each_cpu_mask(cpu, cpu_associativity_changes_mask) {
1450 vphn_get_associativity(cpu, associativity); 1449 vphn_get_associativity(cpu, associativity);