Skip to contentSkip to conversation

OMAP: Section mismatch warning fixes

PATCH New Santosh Shilimkar 3 participants 6 messages Feb 23, 2012 – Feb 28, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover OMAP: Section mismatch warning fixes

Tony,

Below are couple of section mismatch warning fixes for v3.3-rc5

Santosh Shilimkar (2):
ARM: OMAP: fix section mismatch warning for omap4_hotplug_cpu()
ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

 arch/arm/mach-omap2/omap-hotplug.c        |    2 +-
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/2 ARM: OMAP: fix section mismatch warning for omap4_hotplug_cpu()

WARNING: arch/arm/mach-omap2/built-in.o(.text+0x8b80):
Section mismatch in reference from the function omap4_hotplug_cpu() to the function .cpuinit.text:omap_secondary_startup()
The function omap4_hotplug_cpu() references
the function __cpuinit omap_secondary_startup().
This is often because omap4_hotplug_cpu lacks a __cpuinit annotation or the annotation of omap_secondary_startup is wrong.

---
 arch/arm/mach-omap2/omap-mpuss-lowpower.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap-mpuss-lowpower.c +1 -1
index 1d5d010..fe9ab7c 100644
@@ -300,7 +300,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
  * @cpu : CPU ID
  * @power_state: CPU low power state.
  */
-int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
+int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
 {
 	unsigned int cpu_state = 0;
 
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/2 ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

In reply to Santosh Shilimkar

WARNING: vmlinux.o(.text+0x226d0):
Section mismatch in reference from the function platform_cpu_die() to the function .cpuinit.text:omap4_hotplug_cpu() The function platform_cpu_die() references
the function __cpuinit omap4_hotplug_cpu().
This is often because platform_cpu_die lacks a __cpuinit annotation or the annotation of omap4_hotplug_cpu is wrong.

Thanks to Russell King for suggesting __ref annotation trick just like it's parent function for this warning becasue __cupinit usage was definitely wrong to fix this warning..

---
 arch/arm/mach-omap2/omap-hotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/omap-hotplug.c +1 -1
index adbe4d8..56c345b 100644
@@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)
  * platform-specific code to shutdown a CPU
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void __ref platform_cpu_die(unsigned int cpu)
 {
 	unsigned int this_cpu;
 
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 2/2 ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

Hello,

Quoted 10 lines · Santosh Shilimkar

WARNING: vmlinux.o(.text+0x226d0):
Section mismatch in reference from the function platform_cpu_die() to the function .cpuinit.text:omap4_hotplug_cpu() The function platform_cpu_die() references
the function __cpuinit omap4_hotplug_cpu().
This is often because platform_cpu_die lacks a __cpuinit annotation or the annotation of omap4_hotplug_cpu is wrong.

Thanks to Russell King for suggesting __ref annotation trick just like it's parent function for this warning becasue __cupinit

s/it's/its/; s/becasue/because/; s/cup/cpu/

Having said that I think the grammar is broken, too. Maybe:

Thanks to Russell King for suggesting to use __ref instead of the initial (and wrong) approach to use __cpuinit.

(But note I'm not a native speaker, too)

Uwe

Quoted 1 line

usage was definitely wrong to fix this warning..

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#4 lore raw

PATCH 2/2 ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

2012/2/23 Uwe Kleine-K?nig <[email protected]>:

Quoted 13 lines

Hello,

Quoted 10 lines · Santosh Shilimkar

WARNING: vmlinux.o(.text+0x226d0):
Section mismatch in reference from the function platform_cpu_die() to the function .cpuinit.text:omap4_hotplug_cpu() The function platform_cpu_die() references
the function __cpuinit omap4_hotplug_cpu().
This is often because platform_cpu_die lacks a __cpuinit annotation or the annotation of omap4_hotplug_cpu is wrong.

Thanks to Russell King for suggesting __ref annotation trick just like it's parent function for this warning becasue __cupinit

Quoted 9 lines

s/it's/its/; s/becasue/because/; s/cup/cpu/

Having said that I think the grammar is broken, too. Maybe:

? ? ? ?Thanks to Russell King for suggesting to use __ref instead of ? ? ? ?the initial (and wrong) approach to use __cpuinit.

(But note I'm not a native speaker, too)

Thanks for fixing the grammar. :)
Updated patch below with comments corrected as per your suggestion.

Regards
Santosh

Quoted 1 line

From a53dd2d822dc9c9894c2f2f3d239af341c66d891 Mon Sep 17 00:00:00 2001

From: Santosh Shilimkar <[email protected]>
Date: Wed, 22 Feb 2012 16:10:04 +0530
Subject: [PATCH 2/2] ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

WARNING: vmlinux.o(.text+0x226d0):
Section mismatch in reference from the function platform_cpu_die() to the function .cpuinit.text:omap4_hotplug_cpu() The function platform_cpu_die() references
the function __cpuinit omap4_hotplug_cpu().
This is often because platform_cpu_die lacks a __cpuinit annotation or the annotation of omap4_hotplug_cpu is wrong.

Thanks to Russell King for suggesting to use __ref instead of the initial (and wrong) approach to use __cpuinit.

---
 arch/arm/mach-omap2/omap-hotplug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-omap2/omap-hotplug.c
index adbe4d8..56c345b 100644

arch/arm/mach-omap2/omap-hotplug.c +1 -1
@@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)
  * platform-specific code to shutdown a CPU
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void __ref platform_cpu_die(unsigned int cpu)
 {
 	unsigned int this_cpu;
 
Signature · 8 lines
1.7.4.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ARM-OMAP-Fix-section-mismatch-warning-for-platform_c.patch
Type: application/octet-stream
Size: 1343 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120223/148fa317/attachment.obj>
maintainer
#5 lore raw

PATCH 2/2 ARM: OMAP: Fix section mismatch warning for platform_cpu_die()

Quoted 18 lines · Shilimkar, Santosh

2012/2/23 Uwe Kleine-K?nig <[email protected]>:

Quoted 17 lines

Hello,

Quoted 10 lines · Santosh Shilimkar

WARNING: vmlinux.o(.text+0x226d0):
Section mismatch in reference from the function platform_cpu_die() to the function .cpuinit.text:omap4_hotplug_cpu() The function platform_cpu_die() references
the function __cpuinit omap4_hotplug_cpu().
This is often because platform_cpu_die lacks a __cpuinit annotation or the annotation of omap4_hotplug_cpu is wrong.

Thanks to Russell King for suggesting __ref annotation trick just like it's parent function for this warning becasue __cupinit

s/it's/its/; s/becasue/because/; s/cup/cpu/

Having said that I think the grammar is broken, too. Maybe:

Quoted 8 lines
Quoted 5 lines

? ? ? ?Thanks to Russell King for suggesting to use __ref instead of ? ? ? ?the initial (and wrong) approach to use __cpuinit.

(But note I'm not a native speaker, too)

Thanks for fixing the grammar. :)
Updated patch below with comments corrected as per your suggestion.

Thanks applying both into fixes-non-critical.

Regards,

Tony