* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-10 14:58 [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init Mark Brown
@ 2011-03-11 7:51 ` Kukjin Kim
2011-03-15 12:04 ` Kukjin Kim
2011-03-16 8:38 ` Uwe Kleine-König
2 siblings, 0 replies; 8+ messages in thread
From: Kukjin Kim @ 2011-03-11 7:51 UTC (permalink / raw)
To: linux-arm-kernel
Mark Brown wrote:
>
> The cpufreq init function is referenced from the driver structure and
> we don't appear to have annotations which allow us to mark that it'll
> never be called after system init, causing the linker consistency
> infrastructure to complain. Just remove the __init annotation to avoid
> noise from the build.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/mach-s3c64xx/cpufreq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/cpufreq.c b/arch/arm/mach-
> s3c64xx/cpufreq.c
> index 74c0e83..4375b97 100644
> --- a/arch/arm/mach-s3c64xx/cpufreq.c
> +++ b/arch/arm/mach-s3c64xx/cpufreq.c
> @@ -181,7 +181,7 @@ static void __init
s3c64xx_cpufreq_config_regulator(void)
> }
> #endif
>
> -static int __init s3c64xx_cpufreq_driver_init(struct cpufreq_policy
*policy)
> +static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
> {
> int ret;
> struct cpufreq_frequency_table *freq;
> --
Looks ok, applied into s5p-fixes-for-linus for 38 :)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-10 14:58 [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init Mark Brown
2011-03-11 7:51 ` Kukjin Kim
@ 2011-03-15 12:04 ` Kukjin Kim
2011-03-15 12:05 ` Mark Brown
2011-03-16 8:38 ` Uwe Kleine-König
2 siblings, 1 reply; 8+ messages in thread
From: Kukjin Kim @ 2011-03-15 12:04 UTC (permalink / raw)
To: linux-arm-kernel
Kukjin Kim wrote:
>
> Mark Brown wrote:
> >
> > The cpufreq init function is referenced from the driver structure and
> > we don't appear to have annotations which allow us to mark that it'll
> > never be called after system init, causing the linker consistency
> > infrastructure to complain. Just remove the __init annotation to avoid
> > noise from the build.
> >
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > ---
> > arch/arm/mach-s3c64xx/cpufreq.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-s3c64xx/cpufreq.c b/arch/arm/mach-
> > s3c64xx/cpufreq.c
> > index 74c0e83..4375b97 100644
> > --- a/arch/arm/mach-s3c64xx/cpufreq.c
> > +++ b/arch/arm/mach-s3c64xx/cpufreq.c
> > @@ -181,7 +181,7 @@ static void __init
> s3c64xx_cpufreq_config_regulator(void)
> > }
> > #endif
> >
> > -static int __init s3c64xx_cpufreq_driver_init(struct cpufreq_policy
> *policy)
> > +static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
> > {
> > int ret;
> > struct cpufreq_frequency_table *freq;
> > --
>
> Looks ok, applied into s5p-fixes-for-linus for 38 :)
> Thanks.
>
Oops, I missed 'pull request' before 38 :(
So will apply this into for-next...
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-10 14:58 [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init Mark Brown
2011-03-11 7:51 ` Kukjin Kim
2011-03-15 12:04 ` Kukjin Kim
@ 2011-03-16 8:38 ` Uwe Kleine-König
2011-03-16 9:49 ` Mark Brown
2 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2011-03-16 8:38 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Mar 10, 2011 at 02:58:13PM +0000, Mark Brown wrote:
> The cpufreq init function is referenced from the driver structure and
> we don't appear to have annotations which allow us to mark that it'll
> never be called after system init, causing the linker consistency
> infrastructure to complain. Just remove the __init annotation to avoid
> noise from the build.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> arch/arm/mach-s3c64xx/cpufreq.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/cpufreq.c b/arch/arm/mach-s3c64xx/cpufreq.c
> index 74c0e83..4375b97 100644
> --- a/arch/arm/mach-s3c64xx/cpufreq.c
> +++ b/arch/arm/mach-s3c64xx/cpufreq.c
> @@ -181,7 +181,7 @@ static void __init s3c64xx_cpufreq_config_regulator(void)
> }
> #endif
>
> -static int __init s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
> +static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
> {
> int ret;
> struct cpufreq_frequency_table *freq;
Actually this is warning is a false positive. There is a section
mismatch, but it is never a problem because the .init callback is only
called by cpufreq_register_driver. To get rid of the warning the right
fix is to remove the .init callback from struct cpufreq_driver and
change the prototype of cpufreq_register_driver to
int cpufreq_register_driver(struct cpufreq_driver *, int (*)(struct cpufreq_policy *))
(that is pass the init callback to cpufreq_register_driver).
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-16 8:38 ` Uwe Kleine-König
@ 2011-03-16 9:49 ` Mark Brown
2011-03-16 10:13 ` Uwe Kleine-König
0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2011-03-16 9:49 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 16, 2011 at 09:38:11AM +0100, Uwe Kleine-K?nig wrote:
> On Thu, Mar 10, 2011 at 02:58:13PM +0000, Mark Brown wrote:
> > we don't appear to have annotations which allow us to mark that it'll
> > never be called after system init, causing the linker consistency
> Actually this is warning is a false positive. There is a section
> mismatch, but it is never a problem because the .init callback is only
> called by cpufreq_register_driver. To get rid of the warning the right
> fix is to remove the .init callback from struct cpufreq_driver and
> change the prototype of cpufreq_register_driver to
That's what I said above, pretty much. Ideally we'd have a way of
annotating the call sites so that the linker infrastructure rather than
having to faff about splitting the structures like this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-16 9:49 ` Mark Brown
@ 2011-03-16 10:13 ` Uwe Kleine-König
2011-03-16 10:53 ` Mark Brown
0 siblings, 1 reply; 8+ messages in thread
From: Uwe Kleine-König @ 2011-03-16 10:13 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 16, 2011 at 09:49:59AM +0000, Mark Brown wrote:
> On Wed, Mar 16, 2011 at 09:38:11AM +0100, Uwe Kleine-K?nig wrote:
> > On Thu, Mar 10, 2011 at 02:58:13PM +0000, Mark Brown wrote:
> > > we don't appear to have annotations which allow us to mark that it'll
> > > never be called after system init, causing the linker consistency
>
> > Actually this is warning is a false positive. There is a section
> > mismatch, but it is never a problem because the .init callback is only
> > called by cpufreq_register_driver. To get rid of the warning the right
> > fix is to remove the .init callback from struct cpufreq_driver and
> > change the prototype of cpufreq_register_driver to
>
> That's what I said above, pretty much. Ideally we'd have a way of
> annotating the call sites so that the linker infrastructure rather than
> having to faff about splitting the structures like this.
You can mark the driver struct using __ref. But IMHO not saving a
reference to a function only used once is cleaner.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] ARM: S3C64XX: Fix section mismatch from cpufreq init
2011-03-16 10:13 ` Uwe Kleine-König
@ 2011-03-16 10:53 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2011-03-16 10:53 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 16, 2011 at 11:13:00AM +0100, Uwe Kleine-K?nig wrote:
> On Wed, Mar 16, 2011 at 09:49:59AM +0000, Mark Brown wrote:
> > That's what I said above, pretty much. Ideally we'd have a way of
> > annotating the call sites so that the linker infrastructure rather than
> > having to faff about splitting the structures like this.
> You can mark the driver struct using __ref. But IMHO not saving a
> reference to a function only used once is cleaner.
It's pretty annoying to have to define two structs for the affected
drivers (it's not like cpufreq is the only affected subsystem here) -
there's good reasons why we use things like __devexit_p() rather than
split structs for common cases like this.
^ permalink raw reply [flat|nested] 8+ messages in thread