Skip to content

Commit

Permalink
powerpc/pseries: Remove unnecessary variable initializations in numa.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Larrew authored and Benjamin Herrenschmidt committed Feb 7, 2011
1 parent 7639ada commit cd9d6cc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions arch/powerpc/mm/numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,10 +1303,10 @@ static void set_topology_timer(void);
*/
static void setup_cpu_associativity_change_counters(void)
{
int cpu = 0;
int cpu;

for_each_possible_cpu(cpu) {
int i = 0;
int i;
u8 *counts = vphn_cpu_change_counts[cpu];
volatile u8 *hypervisor_counts = lppaca[cpu].vphn_assoc_counts;

Expand All @@ -1328,7 +1328,7 @@ static void setup_cpu_associativity_change_counters(void)
*/
static int update_cpu_associativity_changes_mask(void)
{
int cpu = 0, nr_cpus = 0;
int cpu, nr_cpus = 0;
cpumask_t *changes = &cpu_associativity_changes_mask;

cpumask_clear(changes);
Expand Down Expand Up @@ -1362,8 +1362,7 @@ static int update_cpu_associativity_changes_mask(void)
*/
static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
{
int i = 0;
int nr_assoc_doms = 0;
int i, nr_assoc_doms = 0;
const u16 *field = (const u16*) packed;

#define VPHN_FIELD_UNUSED (0xffff)
Expand Down Expand Up @@ -1402,7 +1401,7 @@ static int vphn_unpack_associativity(const long *packed, unsigned int *unpacked)
*/
static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
{
long rc = 0;
long rc;
long retbuf[PLPAR_HCALL9_BUFSIZE] = {0};
u64 flags = 1;
int hwcpu = get_hard_smp_processor_id(cpu);
Expand All @@ -1416,7 +1415,7 @@ static long hcall_vphn(unsigned long cpu, unsigned int *associativity)
static long vphn_get_associativity(unsigned long cpu,
unsigned int *associativity)
{
long rc = 0;
long rc;

rc = hcall_vphn(cpu, associativity);

Expand All @@ -1442,9 +1441,9 @@ static long vphn_get_associativity(unsigned long cpu,
*/
int arch_update_cpu_topology(void)
{
int cpu = 0, nid = 0, old_nid = 0;
int cpu, nid, old_nid;
unsigned int associativity[VPHN_ASSOC_BUFSIZE] = {0};
struct sys_device *sysdev = NULL;
struct sys_device *sysdev;

for_each_cpu_mask(cpu, cpu_associativity_changes_mask) {
vphn_get_associativity(cpu, associativity);
Expand Down

0 comments on commit cd9d6cc

Please sign in to comment.