Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1241424 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2015-10-07 14:30 +0200 |
| Last post | 2015-10-08 16:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] ASoC: rt5645: fix build warning Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-07 14:30 +0200
Re: [PATCH] ASoC: rt5645: fix build warning Mark Brown <broonie@kernel.org> - 2015-10-07 16:10 +0200
Re: [PATCH] ASoC: rt5645: fix build warning Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-10-08 11:00 +0200
Re: [alsa-devel] [PATCH] ASoC: rt5645: fix build warning Jarkko Nikula <jarkko.nikula@linux.intel.com> - 2015-10-08 16:40 +0200
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-10-07 14:30 +0200 |
| Subject | [PATCH] ASoC: rt5645: fix build warning |
| Message-ID | <qgW14-4HJ-7@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Mark Brown <broonie@kernel.org> |
|---|---|
| Date | 2015-10-07 16:10 +0200 |
| Message-ID | <qgXzR-73H-17@gated-at.bofh.it> |
| In reply to | #1241424 |
[Multipart message — attachments visible in raw view] — view raw
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)?
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-10-08 11:00 +0200 |
| Message-ID | <qhfdp-6Y3-23@gated-at.bofh.it> |
| In reply to | #1241533 |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jarkko Nikula <jarkko.nikula@linux.intel.com> |
|---|---|
| Date | 2015-10-08 16:40 +0200 |
| Subject | Re: [alsa-devel] [PATCH] ASoC: rt5645: fix build warning |
| Message-ID | <qhkwq-6iy-21@gated-at.bofh.it> |
| In reply to | #1242095 |
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>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web