From: Andrew Morton <akpm@linux-foundation.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
Satyam Sharma <satyam@infradead.org>,
David Jones <davej@redhat.com>
Subject: Re: [PATCH] Don't mark cpufreq_stats_free_table with __cpuexit
Date: Fri, 14 Dec 2007 09:41:44 -0800 [thread overview]
Message-ID: <20071214094144.601dcddf.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071214134548.GA15149@flint.arm.linux.org.uk>
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.
prev parent reply other threads:[~2007-12-14 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071214094144.601dcddf.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk+lkml@arm.linux.org.uk \
--cc=satyam@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox