From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Bard Liao <bardliao@realtek.com>
Subject: Re: [alsa-devel] [PATCH] ASoC: rt5645: fix build warning
Date: Thu, 08 Oct 2015 17:33:22 +0300 [thread overview]
Message-ID: <56167EB2.9060608@linux.intel.com> (raw)
In-Reply-To: <20151008085550.GA3806@sudip-pc>
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>
prev parent reply other threads:[~2015-10-08 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jarkko Nikula [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=56167EB2.9060608@linux.intel.com \
--to=jarkko.nikula@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oder_chiou@realtek.com \
--cc=sudipm.mukherjee@gmail.com \
--cc=tiwai@suse.com \
/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