[alsa-devel] [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
Fixes the following compilation warning: Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.
Signed-off-by: Claude Youn claude.youn@gmail.com Signed-off-by: Krishna Mohan Dani krishna.md@samsung.com --- sound/soc/codecs/rt5631.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c index 3b7d5e4..5c65915 100644 --- a/sound/soc/codecs/rt5631.c +++ b/sound/soc/codecs/rt5631.c @@ -1691,7 +1691,7 @@ static const struct i2c_device_id rt5631_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
-static struct of_device_id rt5631_i2c_dt_ids[] = { +static struct of_device_id rt5631_i2c_dt_ids[] __maybe_unused = { { .compatible = "realtek,rt5631"}, { .compatible = "realtek,alc5631"}, { }
On Mon, Nov 24, 2014 at 04:52:42PM +0530, Krishna Mohan Dani wrote:
Fixes the following compilation warning: Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.
This doesn't apply, please check and resend.
FYI your Suggestion was: "You need to add an ifdef around the struct (or perhaps a __maybey_unused type annotation if there's something suitable) for such configurations."
Following your suggestion I have sent a patch (187024b36c635bd454c1b1587b58c9439d3a46ad on your git, branch: rt5631 ) using ifdef which you have already applied. Since there are more suggestion asking for second (__maybe_unused) method, I have sent another patch for which below is the link.
You may be applying the second patch on the already applied first patch. so I request you to apply only second patch in place of first and abandon first patch.
Already applied patch in your git: http://www.spinics.net/lists/linux-samsung-soc/msg39044.html [pls remove this and instead apply the below mentioned patch] Patch to apply: http://www.spinics.net/lists/linux-samsung-soc/msg39465.html
-Krishna
-------------------------------------------------- From: "Mark Brown" broonie@kernel.org Sent: Monday, November 24, 2014 10:34 PM To: "Krishna Mohan Dani" krishna.md@samsung.com Cc: linux-samsung-soc@vger.kernel.org; linux-arm-kernel@lists.infradead.org; alsa-devel@alsa-project.org; kgene.kim@samsung.com; "Claude Youn" claude.youn@gmail.com Subject: Re: [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
On Mon, Nov 24, 2014 at 04:52:42PM +0530, Krishna Mohan Dani wrote:
Fixes the following compilation warning: Warning: 'rt5631_i2c_dt_ids' defined but not used - when DT is not used.
This doesn't apply, please check and resend.
On Wed, Nov 26, 2014 at 02:26:07PM +0530, D Krishna Mohan wrote:
Following your suggestion I have sent a patch (187024b36c635bd454c1b1587b58c9439d3a46ad on your git, branch: rt5631 ) using ifdef which you have already applied. Since there are more suggestion asking for second (__maybe_unused) method, I have sent another patch for which below is the link.
You may be applying the second patch on the already applied first patch. so I request you to apply only second patch in place of first and abandon first patch.
Once something is applied in git you should always send further patches as incrmental updates to that, this is much easier to manage and avoids any potential confusion to other people looking at the tree.
participants (3)
-
D Krishna Mohan
-
Krishna Mohan Dani
-
Mark Brown