Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756196AbXHUEYy (ORCPT ); Tue, 21 Aug 2007 00:24:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751498AbXHUEYr (ORCPT ); Tue, 21 Aug 2007 00:24:47 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:50773 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbXHUEYq (ORCPT ); Tue, 21 Aug 2007 00:24:46 -0400 Date: Tue, 21 Aug 2007 10:07:31 +0530 (IST) From: Satyam Sharma X-X-Sender: satyam@enigma.security.iitk.ac.in To: Andrew Morton cc: Sam Ravnborg , Randy Dunlap , wbrana@gmail.com, Linux Kernel Mailing List Subject: [PATCH][bugzilla #8679] therm_throt.c: Fix section mismatch Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1719 Lines: 42 WARNING: arch/i386/kernel/built-in.o(.data+0x2148): Section mismatch: reference to .init.text: (between 'thermal_throttle_cpu_notifier' and 'mtrr_mutex') comes because struct notifier_block thermal_throttle_cpu_notifier in arch/i386/kernel/cpu/mcheck/therm_throt.c goes in .data section but the notifier callback function itself has been marked __cpuinit which becomes __init == .init.text when HOTPLUG_CPU=n. The warning is bogus because the callback will never be called out if HOTPLUG_CPU=n in the first place (as one can see from kernel/cpu.c, the cpu_chain itself is __cpuinitdata :-) So, let's mark thermal_throttle_cpu_notifier as __cpuinitdata to fix the section mismatch warning. Signed-off-by: Satyam Sharma --- [The other section mismatch mentioned in bugzilla #8679 is already fixed.] arch/i386/kernel/cpu/mcheck/therm_throt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c index 1203dc5..494d320 100644 --- a/arch/i386/kernel/cpu/mcheck/therm_throt.c +++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c @@ -152,7 +152,7 @@ static __cpuinit int thermal_throttle_cpu_callback(struct notifier_block *nfb, return NOTIFY_OK; } -static struct notifier_block thermal_throttle_cpu_notifier = +static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata = { .notifier_call = thermal_throttle_cpu_callback, }; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/