All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: constification patches
@ 2015-06-13 12:25 Mathias Krause
  2015-06-13 12:25 ` [PATCH 1/4] ASoC: max98090: Constify ACPI device ids and register map Mathias Krause
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Mathias Krause @ 2015-06-13 12:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: alsa-devel, Rafael J. Wysocki, Mathias Krause, Len Brown

Hi Liam, Mark,

this series constifies a few variables in the SoC code that are only
read, namely struct reg_default and struct acpi_device_id.

Please apply!


Mathias Krause (4):
  ASoC: max98090: Constify ACPI device ids and register map
  ASoC: rt5640: Constify ACPI device ids and register map
  ASoC: rt5670: Constify ACPI device ids and register map
  ASoC: intel: Constify ACPI device ids

 sound/soc/codecs/max98090.c       |    4 ++--
 sound/soc/codecs/rt5640.c         |    5 ++---
 sound/soc/codecs/rt5670.c         |    5 ++---
 sound/soc/intel/common/sst-acpi.c |    2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] ASoC: max98090: Constify ACPI device ids and register map
  2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
@ 2015-06-13 12:25 ` Mathias Krause
  2015-06-13 12:25 ` [PATCH 2/4] ASoC: rt5640: " Mathias Krause
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Mathias Krause @ 2015-06-13 12:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: alsa-devel, Rafael J. Wysocki, Mathias Krause, Len Brown

Constify the ACPI device ID array and the register map, no need to have
them writable at runtime.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 sound/soc/codecs/max98090.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 3e33ef2acf3c..2b7f1097bee8 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -27,7 +27,7 @@
 #include "max98090.h"
 
 /* Allows for sparsely populated register maps */
-static struct reg_default max98090_reg[] = {
+static const struct reg_default max98090_reg[] = {
 	{ 0x00, 0x00 }, /* 00 Software Reset */
 	{ 0x03, 0x04 }, /* 03 Interrupt Masks */
 	{ 0x04, 0x00 }, /* 04 System Clock Quick */
@@ -2696,7 +2696,7 @@ static const struct of_device_id max98090_of_match[] = {
 MODULE_DEVICE_TABLE(of, max98090_of_match);
 
 #ifdef CONFIG_ACPI
-static struct acpi_device_id max98090_acpi_match[] = {
+static const struct acpi_device_id max98090_acpi_match[] = {
 	{ "193C9890", MAX98090 },
 	{ }
 };
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] ASoC: rt5640: Constify ACPI device ids and register map
  2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
  2015-06-13 12:25 ` [PATCH 1/4] ASoC: max98090: Constify ACPI device ids and register map Mathias Krause
@ 2015-06-13 12:25 ` Mathias Krause
  2015-06-15 10:19   ` Mark Brown
  2015-06-13 12:25 ` [PATCH 3/4] ASoC: rt5670: " Mathias Krause
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Mathias Krause @ 2015-06-13 12:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Oder Chiou, alsa-devel, Rafael J. Wysocki, Mathias Krause, Len Brown

Constify the ACPI device ID array and the register map, no need to have
them writable at runtime. Also drop the unneeded RT5640_INIT_REG_LEN
define.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Bard Liao <bardliao@realtek.com
Cc: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5640.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 178e55d4d481..914681978222 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -51,7 +51,7 @@ static const struct regmap_range_cfg rt5640_ranges[] = {
 	  .window_len = 0x1, },
 };
 
-static struct reg_default init_list[] = {
+static const struct reg_default init_list[] = {
 	{RT5640_PR_BASE + 0x3d,	0x3600},
 	{RT5640_PR_BASE + 0x12,	0x0aa8},
 	{RT5640_PR_BASE + 0x14,	0x0aaa},
@@ -59,7 +59,6 @@ static struct reg_default init_list[] = {
 	{RT5640_PR_BASE + 0x21,	0xe0e0},
 	{RT5640_PR_BASE + 0x23,	0x1804},
 };
-#define RT5640_INIT_REG_LEN ARRAY_SIZE(init_list)
 
 static const struct reg_default rt5640_reg[] = {
 	{ 0x00, 0x000e },
@@ -2122,7 +2121,7 @@ MODULE_DEVICE_TABLE(of, rt5640_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
-static struct acpi_device_id rt5640_acpi_match[] = {
+static const struct acpi_device_id rt5640_acpi_match[] = {
 	{ "INT33CA", 0 },
 	{ "10EC5640", 0 },
 	{ "10EC5642", 0 },
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] ASoC: rt5670: Constify ACPI device ids and register map
  2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
  2015-06-13 12:25 ` [PATCH 1/4] ASoC: max98090: Constify ACPI device ids and register map Mathias Krause
  2015-06-13 12:25 ` [PATCH 2/4] ASoC: rt5640: " Mathias Krause
@ 2015-06-13 12:25 ` Mathias Krause
  2015-06-13 12:25 ` [PATCH 4/4] ASoC: intel: Constify ACPI device ids Mathias Krause
  2015-06-15 10:32 ` [PATCH 0/4] ASoC: constification patches Mark Brown
  4 siblings, 0 replies; 11+ messages in thread
From: Mathias Krause @ 2015-06-13 12:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Oder Chiou, alsa-devel, Rafael J. Wysocki, Mathias Krause, Len Brown

Constify the ACPI device ID array and the register map, no need to have
them writable at runtime. Also drop the unneeded RT5670_INIT_REG_LEN
define.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Oder Chiou <oder_chiou@realtek.com>
Cc: Bard Liao <bardliao@realtek.com
---
 sound/soc/codecs/rt5670.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index cc7f84a150a7..f87a6dabbd49 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -51,12 +51,11 @@ static const struct regmap_range_cfg rt5670_ranges[] = {
 	  .window_len = 0x1, },
 };
 
-static struct reg_default init_list[] = {
+static const struct reg_default init_list[] = {
 	{ RT5670_PR_BASE + 0x14, 0x9a8a },
 	{ RT5670_PR_BASE + 0x38, 0x3ba1 },
 	{ RT5670_PR_BASE + 0x3d, 0x3640 },
 };
-#define RT5670_INIT_REG_LEN ARRAY_SIZE(init_list)
 
 static const struct reg_default rt5670_reg[] = {
 	{ 0x00, 0x0000 },
@@ -2809,7 +2808,7 @@ static const struct i2c_device_id rt5670_i2c_id[] = {
 MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id);
 
 #ifdef CONFIG_ACPI
-static struct acpi_device_id rt5670_acpi_match[] = {
+static const struct acpi_device_id rt5670_acpi_match[] = {
 	{ "10EC5670", 0},
 	{ },
 };
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] ASoC: intel: Constify ACPI device ids
  2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
                   ` (2 preceding siblings ...)
  2015-06-13 12:25 ` [PATCH 3/4] ASoC: rt5670: " Mathias Krause
@ 2015-06-13 12:25 ` Mathias Krause
  2015-06-15 13:07   ` Jarkko Nikula
  2015-06-15 10:32 ` [PATCH 0/4] ASoC: constification patches Mark Brown
  4 siblings, 1 reply; 11+ messages in thread
From: Mathias Krause @ 2015-06-13 12:25 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Jarkko Nikula, alsa-devel, Rafael J. Wysocki, Mathias Krause, Len Brown

Constify the ACPI device ID array, it doesn't need to be writable at
runtime.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
 sound/soc/intel/common/sst-acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/common/sst-acpi.c b/sound/soc/intel/common/sst-acpi.c
index 42f293f9c6e2..67b6d3d52f57 100644
--- a/sound/soc/intel/common/sst-acpi.c
+++ b/sound/soc/intel/common/sst-acpi.c
@@ -263,7 +263,7 @@ static struct sst_acpi_desc sst_acpi_baytrail_desc = {
 	.resindex_dma_base = -1,
 };
 
-static struct acpi_device_id sst_acpi_match[] = {
+static const struct acpi_device_id sst_acpi_match[] = {
 	{ "INT33C8", (unsigned long)&sst_acpi_haswell_desc },
 	{ "INT3438", (unsigned long)&sst_acpi_broadwell_desc },
 	{ "80860F28", (unsigned long)&sst_acpi_baytrail_desc },
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ASoC: rt5640: Constify ACPI device ids and register map
  2015-06-13 12:25 ` [PATCH 2/4] ASoC: rt5640: " Mathias Krause
@ 2015-06-15 10:19   ` Mark Brown
  2015-06-15 17:50     ` Mathias Krause
  0 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2015-06-15 10:19 UTC (permalink / raw)
  To: Mathias Krause
  Cc: Oder Chiou, alsa-devel, Rafael J. Wysocki, Liam Girdwood, Len Brown


[-- Attachment #1.1: Type: text/plain, Size: 513 bytes --]

On Sat, Jun 13, 2015 at 02:25:14PM +0200, Mathias Krause wrote:
> Constify the ACPI device ID array and the register map, no need to have
> them writable at runtime. Also drop the unneeded RT5640_INIT_REG_LEN
> define.
> 
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
> Cc: Bard Liao <bardliao@realtek.com
> Cc: Oder Chiou <oder_chiou@realtek.com>

Please don't include stuff like this in the commit log if you're not
using it - you've CCed Oder but not Bard here (you should be CCing him).

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] ASoC: constification patches
  2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
                   ` (3 preceding siblings ...)
  2015-06-13 12:25 ` [PATCH 4/4] ASoC: intel: Constify ACPI device ids Mathias Krause
@ 2015-06-15 10:32 ` Mark Brown
  2015-06-15 17:59   ` Mathias Krause
  4 siblings, 1 reply; 11+ messages in thread
From: Mark Brown @ 2015-06-15 10:32 UTC (permalink / raw)
  To: Mathias Krause; +Cc: alsa-devel, Rafael J. Wysocki, Liam Girdwood, Len Brown


[-- Attachment #1.1: Type: text/plain, Size: 304 bytes --]

On Sat, Jun 13, 2015 at 02:25:12PM +0200, Mathias Krause wrote:
> Hi Liam, Mark,
> 
> this series constifies a few variables in the SoC code that are only
> read, namely struct reg_default and struct acpi_device_id.

Applied, but again please make an effort to use relevant CC lists for
patches.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 4/4] ASoC: intel: Constify ACPI device ids
  2015-06-13 12:25 ` [PATCH 4/4] ASoC: intel: Constify ACPI device ids Mathias Krause
@ 2015-06-15 13:07   ` Jarkko Nikula
  0 siblings, 0 replies; 11+ messages in thread
From: Jarkko Nikula @ 2015-06-15 13:07 UTC (permalink / raw)
  To: Mathias Krause, Liam Girdwood, Mark Brown
  Cc: alsa-devel, Rafael J. Wysocki, Len Brown

On 06/13/2015 03:25 PM, Mathias Krause wrote:
> Constify the ACPI device ID array, it doesn't need to be writable at
> runtime.
>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
>   sound/soc/intel/common/sst-acpi.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] ASoC: rt5640: Constify ACPI device ids and register map
  2015-06-15 10:19   ` Mark Brown
@ 2015-06-15 17:50     ` Mathias Krause
  0 siblings, 0 replies; 11+ messages in thread
From: Mathias Krause @ 2015-06-15 17:50 UTC (permalink / raw)
  To: Mark Brown
  Cc: Oder Chiou, alsa-devel, Rafael J. Wysocki, Liam Girdwood, Len Brown

On 15 June 2015 at 12:19, Mark Brown <broonie@kernel.org> wrote:
> On Sat, Jun 13, 2015 at 02:25:14PM +0200, Mathias Krause wrote:
>> Constify the ACPI device ID array and the register map, no need to have
>> them writable at runtime. Also drop the unneeded RT5640_INIT_REG_LEN
>> define.
>>
>> Signed-off-by: Mathias Krause <minipli@googlemail.com>
>> Cc: Bard Liao <bardliao@realtek.com
>> Cc: Oder Chiou <oder_chiou@realtek.com>
>
> Please don't include stuff like this in the commit log if you're not
> using it - you've CCed Oder but not Bard here (you should be CCing him).

Sorry, I messed it up! I relied in 'git send-email' to add the
required Cc's but due to the missing closing bracket Bard was skipped.
Sorry. Will take more care next time!

Thanks,
Mathias

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] ASoC: constification patches
  2015-06-15 10:32 ` [PATCH 0/4] ASoC: constification patches Mark Brown
@ 2015-06-15 17:59   ` Mathias Krause
  2015-06-15 19:17     ` Mark Brown
  0 siblings, 1 reply; 11+ messages in thread
From: Mathias Krause @ 2015-06-15 17:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Rafael J. Wysocki, Liam Girdwood, Len Brown

On 15 June 2015 at 12:32, Mark Brown <broonie@kernel.org> wrote:
> On Sat, Jun 13, 2015 at 02:25:12PM +0200, Mathias Krause wrote:
>> Hi Liam, Mark,
>>
>> this series constifies a few variables in the SoC code that are only
>> read, namely struct reg_default and struct acpi_device_id.
>
> Applied, but again please make an effort to use relevant CC lists for
> patches.

Sorry, actually I tried to. It's what get_maintainer.pl told me but I
tried to trim down the list because of the simpleness of the patches.
I omitted LKML to avoid cross-posting. I messed up patches 2 and 3,
admitted. But what else was wrong?

Regards,
Mathias

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/4] ASoC: constification patches
  2015-06-15 17:59   ` Mathias Krause
@ 2015-06-15 19:17     ` Mark Brown
  0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2015-06-15 19:17 UTC (permalink / raw)
  To: Mathias Krause; +Cc: alsa-devel, Rafael J. Wysocki, Liam Girdwood, Len Brown


[-- Attachment #1.1: Type: text/plain, Size: 565 bytes --]

On Mon, Jun 15, 2015 at 07:59:30PM +0200, Mathias Krause wrote:

> Sorry, actually I tried to. It's what get_maintainer.pl told me but I
> tried to trim down the list because of the simpleness of the patches.
> I omitted LKML to avoid cross-posting. I messed up patches 2 and 3,
> admitted. But what else was wrong?

I can't remember now, perhaps it was just the second Realtek patch.
Like I say you shouldn't treat get_maintainer.pl as reliable (it can be
a good start but without --git it often misses people and with --git it
gets way too many false positives).

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-06-15 19:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-13 12:25 [PATCH 0/4] ASoC: constification patches Mathias Krause
2015-06-13 12:25 ` [PATCH 1/4] ASoC: max98090: Constify ACPI device ids and register map Mathias Krause
2015-06-13 12:25 ` [PATCH 2/4] ASoC: rt5640: " Mathias Krause
2015-06-15 10:19   ` Mark Brown
2015-06-15 17:50     ` Mathias Krause
2015-06-13 12:25 ` [PATCH 3/4] ASoC: rt5670: " Mathias Krause
2015-06-13 12:25 ` [PATCH 4/4] ASoC: intel: Constify ACPI device ids Mathias Krause
2015-06-15 13:07   ` Jarkko Nikula
2015-06-15 10:32 ` [PATCH 0/4] ASoC: constification patches Mark Brown
2015-06-15 17:59   ` Mathias Krause
2015-06-15 19:17     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.