* [PATCH] Don't mark cpufreq_stats_free_table with __cpuexit
@ 2007-12-14 13:45 Russell King
2007-12-14 17:41 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2007-12-14 13:45 UTC (permalink / raw)
To: Linux Kernel List, Andrew Morton, Satyam Sharma, David Jones
Commit 55395ae72b6e5ae614d28df74158c47454652583 introduced:
`.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
Never mark functions that may be called during run time or
initialisation time with a section that may be (or have been)
discarded.
It was mentioned in the commit comments that an exit-section function
was being called from an init-section function. This should _always_
result in the patch being rejected. It's just a big no no.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 8a45d0f..bf5f780 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -164,7 +164,8 @@ freq_table_get_index(struct cpufreq_stats *stat, unsigned int freq)
return -1;
}
-static void __cpuexit cpufreq_stats_free_table(unsigned int cpu)
+/* functions called from init paths can not be marked for an exit section */
+static void /*__cpuexit*/ cpufreq_stats_free_table(unsigned int cpu)
{
struct cpufreq_stats *stat = cpufreq_stats_table[cpu];
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Don't mark cpufreq_stats_free_table with __cpuexit
2007-12-14 13:45 [PATCH] Don't mark cpufreq_stats_free_table with __cpuexit Russell King
@ 2007-12-14 17:41 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2007-12-14 17:41 UTC (permalink / raw)
To: Russell King; +Cc: Linux Kernel List, Satyam Sharma, David Jones
On Fri, 14 Dec 2007 13:45:48 +0000 Russell King <rmk+lkml@arm.linux.org.uk> wrote:
> Commit 55395ae72b6e5ae614d28df74158c47454652583 introduced:
>
> `.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
>
> Never mark functions that may be called during run time or
> initialisation time with a section that may be (or have been)
> discarded.
>
> It was mentioned in the commit comments that an exit-section function
> was being called from an init-section function. This should _always_
> result in the patch being rejected. It's just a big no no.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> index 8a45d0f..bf5f780 100644
> --- a/drivers/cpufreq/cpufreq_stats.c
> +++ b/drivers/cpufreq/cpufreq_stats.c
> @@ -164,7 +164,8 @@ freq_table_get_index(struct cpufreq_stats *stat, unsigned int freq)
> return -1;
> }
>
> -static void __cpuexit cpufreq_stats_free_table(unsigned int cpu)
> +/* functions called from init paths can not be marked for an exit section */
> +static void /*__cpuexit*/ cpufreq_stats_free_table(unsigned int cpu)
> {
> struct cpufreq_stats *stat = cpufreq_stats_table[cpu];
> struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
>
yu, thanks, I have a fix for this from Adrian queued for when Linus
resurfaces.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-14 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-14 13:45 [PATCH] Don't mark cpufreq_stats_free_table with __cpuexit Russell King
2007-12-14 17:41 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox