* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
@ 2014-11-17 13:56 Krishna Mohan Dani
2014-11-17 14:52 ` Mark Brown
2014-11-17 15:56 ` Uwe Kleine-König
0 siblings, 2 replies; 9+ messages in thread
From: Krishna Mohan Dani @ 2014-11-17 13:56 UTC (permalink / raw)
To: linux-arm-kernel
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, 2 insertions(+)
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 3b7d5e4..9425545 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1691,12 +1691,14 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
+#ifdef CONFIG_OF
static struct of_device_id rt5631_i2c_dt_ids[] = {
{ .compatible = "realtek,rt5631"},
{ .compatible = "realtek,alc5631"},
{ }
};
MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
+#endif
static const struct regmap_config rt5631_regmap_config = {
.reg_bits = 8,
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-17 13:56 [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled Krishna Mohan Dani
@ 2014-11-17 14:52 ` Mark Brown
2014-11-17 15:56 ` Uwe Kleine-König
1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-11-17 14:52 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 17, 2014 at 07:26:29PM +0530, Krishna Mohan Dani wrote:
> 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>
Applied, thanks. It's really weird that such a trivial patch would have
multiple authors, if you're forwarding on a patch from someone else
please preserve their authorship as well as signoff.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141117/f5ad631d/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-17 13:56 [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled Krishna Mohan Dani
2014-11-17 14:52 ` Mark Brown
@ 2014-11-17 15:56 ` Uwe Kleine-König
2014-11-24 7:18 ` D Krishna Mohan
1 sibling, 1 reply; 9+ messages in thread
From: Uwe Kleine-König @ 2014-11-17 15:56 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 17, 2014 at 07:26:29PM +0530, Krishna Mohan Dani wrote:
> 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, 2 insertions(+)
>
> diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
> index 3b7d5e4..9425545 100644
> --- a/sound/soc/codecs/rt5631.c
> +++ b/sound/soc/codecs/rt5631.c
> @@ -1691,12 +1691,14 @@ static const struct i2c_device_id rt5631_i2c_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
>
> +#ifdef CONFIG_OF
> static struct of_device_id rt5631_i2c_dt_ids[] = {
> { .compatible = "realtek,rt5631"},
> { .compatible = "realtek,alc5631"},
> { }
> };
> MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
> +#endif
An (IMHO nicer) alternative is:
-static struct of_device_id rt5631_i2c_dt_ids[] = {
+static struct of_device_id rt5631_i2c_dt_ids[] __maybe_unused = {
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-17 15:56 ` Uwe Kleine-König
@ 2014-11-24 7:18 ` D Krishna Mohan
2014-11-24 11:05 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: D Krishna Mohan @ 2014-11-24 7:18 UTC (permalink / raw)
To: linux-arm-kernel
Attaching the patch with changes suggested by Uwe. Though there is another
patch which I submitted, but I leave it to Mark Brown as to which patch to
pick.
Previous patch :
>From 80b55f898d0a31b63fd6ed3bd82c548a0559b07b Mon Sep 17 00:00:00 2001
From: Krishna Mohan Dani <krishna.md@samsung.com>
Date: Mon, 17 Nov 2014 19:24:46 +0530
Subject: [PATCH 1/2] ASoC: rt5631: Fixing compilation warning when DT is
disabled
-Krishna
--------------------------------------------------
From: "UweKleine-K?nig" <u.kleine-koenig@pengutronix.de>
Sent: Monday, November 17, 2014 9:26 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>;
<broonie@kernel.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 17, 2014 at 07:26:29PM +0530, Krishna Mohan Dani wrote:
>> 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, 2 insertions(+)
>>
>> diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
>> index 3b7d5e4..9425545 100644
>> --- a/sound/soc/codecs/rt5631.c
>> +++ b/sound/soc/codecs/rt5631.c
>> @@ -1691,12 +1691,14 @@ static const struct i2c_device_id rt5631_i2c_id[]
>> = {
>> };
>> MODULE_DEVICE_TABLE(i2c, rt5631_i2c_id);
>>
>> +#ifdef CONFIG_OF
>> static struct of_device_id rt5631_i2c_dt_ids[] = {
>> { .compatible = "realtek,rt5631"},
>> { .compatible = "realtek,alc5631"},
>> { }
>> };
>> MODULE_DEVICE_TABLE(of, rt5631_i2c_dt_ids);
>> +#endif
>
> An (IMHO nicer) alternative is:
>
> -static struct of_device_id rt5631_i2c_dt_ids[] = {
> +static struct of_device_id rt5631_i2c_dt_ids[] __maybe_unused = {
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-K?nig |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ASoC-rt5631-Fixing-compilation-warning-when-DT-is-di.patch
Type: application/octet-stream
Size: 1051 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141124/c50ab313/attachment.obj>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-24 7:18 ` D Krishna Mohan
@ 2014-11-24 11:05 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-11-24 11:05 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Nov 24, 2014 at 12:48:31PM +0530, D Krishna Mohan wrote:
> Attaching the patch with changes suggested by Uwe. Though there is another
> patch which I submitted, but I leave it to Mark Brown as to which patch to
> pick.
Please send patches in the format covered in SubmittingPatches, the
tools can't apply this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141124/3c5867f4/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
@ 2014-11-24 11:22 Krishna Mohan Dani
2014-11-24 17:04 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Krishna Mohan Dani @ 2014-11-24 11:22 UTC (permalink / raw)
To: linux-arm-kernel
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"},
{ }
--
1.7.9.5
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-24 11:22 Krishna Mohan Dani
@ 2014-11-24 17:04 ` Mark Brown
2014-11-26 8:56 ` D Krishna Mohan
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2014-11-24 17:04 UTC (permalink / raw)
To: linux-arm-kernel
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141124/2ab4a5e3/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-24 17:04 ` Mark Brown
@ 2014-11-26 8:56 ` D Krishna Mohan
2014-11-26 18:14 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: D Krishna Mohan @ 2014-11-26 8:56 UTC (permalink / raw)
To: linux-arm-kernel
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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled
2014-11-26 8:56 ` D Krishna Mohan
@ 2014-11-26 18:14 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-11-26 18:14 UTC (permalink / raw)
To: linux-arm-kernel
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141126/4e81e6db/attachment.sig>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-26 18:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-17 13:56 [PATCH] ASoC: rt5631: Fixing compilation warning when DT is disabled Krishna Mohan Dani
2014-11-17 14:52 ` Mark Brown
2014-11-17 15:56 ` Uwe Kleine-König
2014-11-24 7:18 ` D Krishna Mohan
2014-11-24 11:05 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2014-11-24 11:22 Krishna Mohan Dani
2014-11-24 17:04 ` Mark Brown
2014-11-26 8:56 ` D Krishna Mohan
2014-11-26 18:14 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).