lkml.org 
[lkml]   [2015]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ASoC: rt5645: fix build warning
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


\
 
 \ /
  Last update: 2015-10-08 11:21    [W:0.173 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site