lkml.org 
[lkml]   [2008]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/27] hwmon: fix section mismatch in coretemp
Hi Sam:

* Sam Ravnborg <sam@ravnborg.org> [2008-02-17 13:22:51 +0100]:
> Fix following warning:
> WARNING: vmlinux.o(.text+0xebfd04): Section mismatch in reference from the function coretemp_cpu_callback() to the function .cpuinit.text:coretemp_device_add()
>
> coretemp_cpu_callback() are only used inside a
> HOTPLUG_CPU block so annotate it __cpuinit.
> The notifier referencing the function are annotated
> __refdata to silence warning from the exit function.
> The unregister function do not use the embedded pointer
> but clears the variable so the annotation is OK.
>
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Mark M. Hoffman <mhoffman@lightlink.com>
> ---
> drivers/hwmon/coretemp.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
> index 3ee60d2..1439432 100644
> --- a/drivers/hwmon/coretemp.c
> +++ b/drivers/hwmon/coretemp.c
> @@ -330,7 +330,7 @@ static void coretemp_device_remove(unsigned int cpu)
> mutex_unlock(&pdev_list_mutex);
> }
>
> -static int coretemp_cpu_callback(struct notifier_block *nfb,
> +static int __cpuinit coretemp_cpu_callback(struct notifier_block *nfb,
> unsigned long action, void *hcpu)
> {
> unsigned int cpu = (unsigned long) hcpu;
> @@ -347,7 +347,7 @@ static int coretemp_cpu_callback(struct notifier_block *nfb,
> return NOTIFY_OK;
> }
>
> -static struct notifier_block coretemp_cpu_notifier = {
> +static struct notifier_block coretemp_cpu_notifier __refdata = {
> .notifier_call = coretemp_cpu_callback,
> };
> #endif /* !CONFIG_HOTPLUG_CPU */
> --
> 1.5.4.rc3.14.g44397

This rings a bell... hmmm, commit 59a35bafb223bbb0553ba1a3bb9280bda668a8d8.
AFAICT the warning is a false positive, but whatever.

Applied to hwmon-2.6.git/testing, thanks.

--
Mark M. Hoffman
mhoffman@lightlink.com



\
 
 \ /
  Last update: 2008-02-17 18:15    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site