* [PATCH] ASoC: rt5645: fix build warning
@ 2015-10-07 12:22 Sudip Mukherjee
2015-10-07 14:05 ` Mark Brown
2015-10-09 11:21 ` Applied "ASoC: rt5645: fix build warning" to the asoc tree Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Sudip Mukherjee @ 2015-10-07 12:22 UTC (permalink / raw)
To: Bard Liao, Oder Chiou, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-kernel, alsa-devel, Sudip Mukherjee
We were getting build warning about "Section mismatch".
dmi_platform_intel_broadwell is being referenced from the probe function
rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
__initdata.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
sound/soc/codecs/rt5645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 4c4fe6b..89ba4ff 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3244,7 +3244,7 @@ static int buddy_quirk_cb(const struct dmi_system_id *id)
return 1;
}
-static struct dmi_system_id dmi_platform_intel_broadwell[] __initdata = {
+static struct dmi_system_id dmi_platform_intel_broadwell[] = {
{
.ident = "Chrome Buddy",
.callback = buddy_quirk_cb,
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: rt5645: fix build warning
2015-10-07 12:22 [PATCH] ASoC: rt5645: fix build warning Sudip Mukherjee
@ 2015-10-07 14:05 ` Mark Brown
2015-10-08 8:55 ` Sudip Mukherjee
2015-10-09 11:21 ` Applied "ASoC: rt5645: fix build warning" to the asoc tree Mark Brown
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2015-10-07 14:05 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Bard Liao, Oder Chiou, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, linux-kernel, alsa-devel
[-- Attachment #1: Type: text/plain, Size: 661 bytes --]
On Wed, Oct 07, 2015 at 05:52:12PM +0530, Sudip Mukherjee wrote:
> We were getting build warning about "Section mismatch".
> dmi_platform_intel_broadwell is being referenced from the probe function
> rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
> __initdata.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> -static struct dmi_system_id dmi_platform_intel_broadwell[] __initdata = {
> +static struct dmi_system_id dmi_platform_intel_broadwell[] = {
This doesn't seem like the obvious fix - why are we not annotating the
probe function suitably (or alternatively if we can't why does
__initdata still exist)?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: rt5645: fix build warning
2015-10-07 14:05 ` Mark Brown
@ 2015-10-08 8:55 ` Sudip Mukherjee
2015-10-08 14:33 ` [alsa-devel] " Jarkko Nikula
0 siblings, 1 reply; 5+ messages in thread
From: Sudip Mukherjee @ 2015-10-08 8:55 UTC (permalink / raw)
To: Mark Brown
Cc: Bard Liao, Oder Chiou, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, linux-kernel, alsa-devel
On Wed, Oct 07, 2015 at 03:05:27PM +0100, Mark Brown wrote:
> On Wed, Oct 07, 2015 at 05:52:12PM +0530, Sudip Mukherjee wrote:
> > We were getting build warning about "Section mismatch".
> > dmi_platform_intel_broadwell is being referenced from the probe function
> > rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
> > __initdata.
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>
> > -static struct dmi_system_id dmi_platform_intel_broadwell[] __initdata = {
> > +static struct dmi_system_id dmi_platform_intel_broadwell[] = {
>
> This doesn't seem like the obvious fix - why are we not annotating the
> probe function suitably (or alternatively if we can't why does
> __initdata still exist)?
probe function should not be __init. probe can be called anytime after
the module has been loaded.
__initdata still exists as that part of the code was added by
e9159e7577cf ("ASoC: rt5645: Add dmi for Broadwell") which is a very
recent modification and I think that has been added by mistake.
One more argument in my favor:
The use in probe function is
if (dmi_check_system(dmi_platform_intel_braswell) ||
dmi_check_system(dmi_platform_intel_broadwell))
dmi_platform_intel_braswell is not marked as __initdata but
dmi_platform_intel_broadwell is marked but they both have same use at
the same place.
regards
sudip
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: rt5645: fix build warning
2015-10-08 8:55 ` Sudip Mukherjee
@ 2015-10-08 14:33 ` Jarkko Nikula
0 siblings, 0 replies; 5+ messages in thread
From: Jarkko Nikula @ 2015-10-08 14:33 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown
Cc: Oder Chiou, alsa-devel, linux-kernel, Takashi Iwai, Liam Girdwood,
Bard Liao
On 10/08/2015 11:55 AM, Sudip Mukherjee wrote:
> On Wed, Oct 07, 2015 at 03:05:27PM +0100, Mark Brown wrote:
>> On Wed, Oct 07, 2015 at 05:52:12PM +0530, Sudip Mukherjee wrote:
>>> We were getting build warning about "Section mismatch".
>>> dmi_platform_intel_broadwell is being referenced from the probe function
>>> rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
>>> __initdata.
>>>
>>> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
>>
>>> -static struct dmi_system_id dmi_platform_intel_broadwell[] __initdata = {
>>> +static struct dmi_system_id dmi_platform_intel_broadwell[] = {
>>
>> This doesn't seem like the obvious fix - why are we not annotating the
>> probe function suitably (or alternatively if we can't why does
>> __initdata still exist)?
>
> probe function should not be __init. probe can be called anytime after
> the module has been loaded.
> __initdata still exists as that part of the code was added by
> e9159e7577cf ("ASoC: rt5645: Add dmi for Broadwell") which is a very
> recent modification and I think that has been added by mistake.
> One more argument in my favor:
> The use in probe function is
> if (dmi_check_system(dmi_platform_intel_braswell) ||
> dmi_check_system(dmi_platform_intel_broadwell))
>
> dmi_platform_intel_braswell is not marked as __initdata but
> dmi_platform_intel_broadwell is marked but they both have same use at
> the same place.
>
If one really wants to save a few bytes then one could annotate this it
with __initdata_or_module (very low use in kernel) but I don't think
it's worth of effort and probably should be done for other sections here
too by another patch.
To me this patch looks a right thing to do at the moment.
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Applied "ASoC: rt5645: fix build warning" to the asoc tree
2015-10-07 12:22 [PATCH] ASoC: rt5645: fix build warning Sudip Mukherjee
2015-10-07 14:05 ` Mark Brown
@ 2015-10-09 11:21 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2015-10-09 11:21 UTC (permalink / raw)
To: Sudip Mukherjee, Mark Brown; +Cc: alsa-devel
The patch
ASoC: rt5645: fix build warning
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From dc542fb4179a104fc73760a2da0fd78f68f70d6d Mon Sep 17 00:00:00 2001
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date: Wed, 7 Oct 2015 17:52:12 +0530
Subject: [PATCH] ASoC: rt5645: fix build warning
We were getting build warning about "Section mismatch".
dmi_platform_intel_broadwell is being referenced from the probe function
rt5645_i2c_probe(), but dmi_platform_intel_broadwell was marked with
__initdata.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/rt5645.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index cd1a4ec..d9993d4 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3241,7 +3241,7 @@ static int buddy_quirk_cb(const struct dmi_system_id *id)
return 1;
}
-static struct dmi_system_id dmi_platform_intel_broadwell[] __initdata = {
+static struct dmi_system_id dmi_platform_intel_broadwell[] = {
{
.ident = "Chrome Buddy",
.callback = buddy_quirk_cb,
--
2.5.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-09 11:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 12:22 [PATCH] ASoC: rt5645: fix build warning Sudip Mukherjee
2015-10-07 14:05 ` Mark Brown
2015-10-08 8:55 ` Sudip Mukherjee
2015-10-08 14:33 ` [alsa-devel] " Jarkko Nikula
2015-10-09 11:21 ` Applied "ASoC: rt5645: fix build warning" to the asoc tree Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.