Skip to contentSkip to conversation

ARM: cpu topology: fix warning

PATCH New Vincent Guittot 2 participants 4 messages Oct 14, 2011 – Nov 29, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: cpu topology: fix warning

kernel/sched.c:7354:2: warning: initialization from incompatible pointer type

Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef use int cpu instead of unsigned int cpu

---
 arch/arm/include/asm/topology.h |    2 +-
 arch/arm/kernel/topology.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/topology.h +1 -1
index a7e457e..58b8b84 100644
@@ -25,7 +25,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS];
 
 void init_cpu_topology(void);
 void store_cpu_topology(unsigned int cpuid);
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
+const struct cpumask *cpu_coregroup_mask(int cpu);
 
 #else
 
arch/arm/kernel/topology.c +1 -1
index 1040c00..8200dea 100644
@@ -43,7 +43,7 @@
 
 struct cputopo_arm cpu_topology[NR_CPUS];
 
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu)
+const struct cpumask *cpu_coregroup_mask(int cpu)
 {
 	return &cpu_topology[cpu].core_sibling;
 }
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 ARM: cpu topology: fix warning

Hi Vincent,

Quoted 4 lines · Vincent Guittot

kernel/sched.c:7354:2: warning: initialization from incompatible pointer type

Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef use int cpu instead of unsigned int cpu

Not sure I parse the commit message...

Quoted 5 lines
---
 arch/arm/include/asm/topology.h |    2 +-
 arch/arm/kernel/topology.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

... but this fixes the warning for me:

Reported-and-tested-by Will Deacon <[email protected]>

Thanks,

Will

#2 lore raw

PATCH 1/1 ARM: cpu topology: fix warning

In reply to Vincent Guittot

Hi Vincent,

Quoted 39 lines · Vincent Guittot

kernel/sched.c:7354:2: warning: initialization from incompatible pointer type

Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef use int cpu instead of unsigned int cpu

---
 arch/arm/include/asm/topology.h |    2 +-
 arch/arm/kernel/topology.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/topology.h +1 -1
index a7e457e..58b8b84 100644
@@ -25,7 +25,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS];
 
 void init_cpu_topology(void);
 void store_cpu_topology(unsigned int cpuid);
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
+const struct cpumask *cpu_coregroup_mask(int cpu);
 
 #else
 
arch/arm/kernel/topology.c +1 -1
index 1040c00..8200dea 100644
@@ -43,7 +43,7 @@
 
 struct cputopo_arm cpu_topology[NR_CPUS];
 
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu)
+const struct cpumask *cpu_coregroup_mask(int cpu)
 {
 	return &cpu_topology[cpu].core_sibling;
 }
Signature · 1 line
1.7.4.1

I'm still seeing this warning in mainline. What is your plan for merging this fix?

Cheers,

Will

#3 lore raw

PATCH 1/1 ARM: cpu topology: fix warning

Hi Will,

The patch has just been submitted to Russell's patch tracking system

Sorry for the delay

Cheers,
Vincent

Quoted 50 lines · Will Deacon

Hi Vincent,

Quoted 38 lines · Vincent Guittot

kernel/sched.c:7354:2: warning: initialization from incompatible pointer type

Align cpu_coregroup_mask prototype interface with sched_domain_mask_f typedef use int cpu instead of unsigned int cpu

---
?arch/arm/include/asm/topology.h | ? ?2 +-
?arch/arm/kernel/topology.c ? ? ?| ? ?2 +-
?2 files changed, 2 insertions(+), 2 deletions(-)

arch/arm/include/asm/topology.h +1 -1
index a7e457e..58b8b84 100644
@@ -25,7 +25,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS];
 
 ?void init_cpu_topology(void);
 ?void store_cpu_topology(unsigned int cpuid);
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu);
+const struct cpumask *cpu_coregroup_mask(int cpu);
 

?#else

arch/arm/kernel/topology.c +1 -2
index 1040c00..8200dea 100644
@@ -43,7 +43,7 @@
 
 ?struct cputopo_arm cpu_topology[NR_CPUS];
 
-const struct cpumask *cpu_coregroup_mask(unsigned int cpu)
+const struct cpumask *cpu_coregroup_mask(int cpu)
 ?{
 ? ? ? return &cpu_topology[cpu].core_sibling;
 ?}
--
Quoted 1 line

1.7.4.1

I'm still seeing this warning in mainline. What is your plan for merging this fix?

Cheers,

Will