All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static
@ 2022-07-04 14:28 ` Tom Rix
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rix @ 2022-07-04 14:28 UTC (permalink / raw)
  To: perex, tiwai, vitalyr, sbinding, tanureal
  Cc: alsa-devel, linux-kernel, Tom Rix

sparse reports
sound/pci/hda/patch_cs8409-tables.c:79:25: warning: symbol 'cs8409_cs42l42_pincfgs_no_dmic' was not declared. Should it be static?

cs8409_cs42l42_pincfgs_no_dmic is only used by cs8409_fixups table as an
initializer for the hda_fixup element v.pins.  Both are defined in the
patch_cs8408-table.c file but only cs8409_fixups is used externally in
patch_cs8409.c.  So cs8409_cs42l42_pincfgs_no_dmic should have a static
storage class specifier.

The other v.pins initializers in cs8409_fixups table, though declared
extern in patch_cs8409.h are also only used in patch_cs8409-tables.c.
So change all the v.pins initializers to static.

Fixes: 9e7647b5070f ("ALSA: hda/cs8409: Move arrays of configuration to a new file")
Signed-off-by: Tom Rix <trix@redhat.com>
---
 sound/pci/hda/patch_cs8409-tables.c | 6 +++---
 sound/pci/hda/patch_cs8409.h        | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/patch_cs8409-tables.c b/sound/pci/hda/patch_cs8409-tables.c
index 4f4cc8215917..e0d3a8be2e38 100644
--- a/sound/pci/hda/patch_cs8409-tables.c
+++ b/sound/pci/hda/patch_cs8409-tables.c
@@ -68,7 +68,7 @@ const struct hda_verb cs8409_cs42l42_init_verbs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
+static const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
 	{ CS8409_PIN_ASP1_TRANSMITTER_A, 0x042120f0 },	/* ASP-1-TX */
 	{ CS8409_PIN_ASP1_RECEIVER_A, 0x04a12050 },	/* ASP-1-RX */
 	{ CS8409_PIN_ASP2_TRANSMITTER_A, 0x901000f0 },	/* ASP-2-TX */
@@ -76,7 +76,7 @@ const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl cs8409_cs42l42_pincfgs_no_dmic[] = {
+static const struct hda_pintbl cs8409_cs42l42_pincfgs_no_dmic[] = {
 	{ CS8409_PIN_ASP1_TRANSMITTER_A, 0x042120f0 },	/* ASP-1-TX */
 	{ CS8409_PIN_ASP1_RECEIVER_A, 0x04a12050 },	/* ASP-1-RX */
 	{ CS8409_PIN_ASP2_TRANSMITTER_A, 0x901000f0 },	/* ASP-2-TX */
@@ -279,7 +279,7 @@ const struct hda_verb dolphin_init_verbs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl dolphin_pincfgs[] = {
+static const struct hda_pintbl dolphin_pincfgs[] = {
 	{ 0x24, 0x022210f0 }, /* ASP-1-TX-A */
 	{ 0x25, 0x010240f0 }, /* ASP-1-TX-B */
 	{ 0x34, 0x02a21050 }, /* ASP-1-RX */
diff --git a/sound/pci/hda/patch_cs8409.h b/sound/pci/hda/patch_cs8409.h
index 260388a6256c..2a8dfb4ff046 100644
--- a/sound/pci/hda/patch_cs8409.h
+++ b/sound/pci/hda/patch_cs8409.h
@@ -358,13 +358,11 @@ extern const struct snd_pci_quirk cs8409_fixup_tbl[];
 extern const struct hda_model_fixup cs8409_models[];
 extern const struct hda_fixup cs8409_fixups[];
 extern const struct hda_verb cs8409_cs42l42_init_verbs[];
-extern const struct hda_pintbl cs8409_cs42l42_pincfgs[];
 extern const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[];
 extern const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[];
 extern struct sub_codec cs8409_cs42l42_codec;
 
 extern const struct hda_verb dolphin_init_verbs[];
-extern const struct hda_pintbl dolphin_pincfgs[];
 extern const struct cs8409_cir_param dolphin_hw_cfg[];
 extern struct sub_codec dolphin_cs42l42_0;
 extern struct sub_codec dolphin_cs42l42_1;
-- 
2.27.0


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

* [PATCH] ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static
@ 2022-07-04 14:28 ` Tom Rix
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rix @ 2022-07-04 14:28 UTC (permalink / raw)
  To: perex, tiwai, vitalyr, sbinding, tanureal
  Cc: Tom Rix, alsa-devel, linux-kernel

sparse reports
sound/pci/hda/patch_cs8409-tables.c:79:25: warning: symbol 'cs8409_cs42l42_pincfgs_no_dmic' was not declared. Should it be static?

cs8409_cs42l42_pincfgs_no_dmic is only used by cs8409_fixups table as an
initializer for the hda_fixup element v.pins.  Both are defined in the
patch_cs8408-table.c file but only cs8409_fixups is used externally in
patch_cs8409.c.  So cs8409_cs42l42_pincfgs_no_dmic should have a static
storage class specifier.

The other v.pins initializers in cs8409_fixups table, though declared
extern in patch_cs8409.h are also only used in patch_cs8409-tables.c.
So change all the v.pins initializers to static.

Fixes: 9e7647b5070f ("ALSA: hda/cs8409: Move arrays of configuration to a new file")
Signed-off-by: Tom Rix <trix@redhat.com>
---
 sound/pci/hda/patch_cs8409-tables.c | 6 +++---
 sound/pci/hda/patch_cs8409.h        | 2 --
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/pci/hda/patch_cs8409-tables.c b/sound/pci/hda/patch_cs8409-tables.c
index 4f4cc8215917..e0d3a8be2e38 100644
--- a/sound/pci/hda/patch_cs8409-tables.c
+++ b/sound/pci/hda/patch_cs8409-tables.c
@@ -68,7 +68,7 @@ const struct hda_verb cs8409_cs42l42_init_verbs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
+static const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
 	{ CS8409_PIN_ASP1_TRANSMITTER_A, 0x042120f0 },	/* ASP-1-TX */
 	{ CS8409_PIN_ASP1_RECEIVER_A, 0x04a12050 },	/* ASP-1-RX */
 	{ CS8409_PIN_ASP2_TRANSMITTER_A, 0x901000f0 },	/* ASP-2-TX */
@@ -76,7 +76,7 @@ const struct hda_pintbl cs8409_cs42l42_pincfgs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl cs8409_cs42l42_pincfgs_no_dmic[] = {
+static const struct hda_pintbl cs8409_cs42l42_pincfgs_no_dmic[] = {
 	{ CS8409_PIN_ASP1_TRANSMITTER_A, 0x042120f0 },	/* ASP-1-TX */
 	{ CS8409_PIN_ASP1_RECEIVER_A, 0x04a12050 },	/* ASP-1-RX */
 	{ CS8409_PIN_ASP2_TRANSMITTER_A, 0x901000f0 },	/* ASP-2-TX */
@@ -279,7 +279,7 @@ const struct hda_verb dolphin_init_verbs[] = {
 	{} /* terminator */
 };
 
-const struct hda_pintbl dolphin_pincfgs[] = {
+static const struct hda_pintbl dolphin_pincfgs[] = {
 	{ 0x24, 0x022210f0 }, /* ASP-1-TX-A */
 	{ 0x25, 0x010240f0 }, /* ASP-1-TX-B */
 	{ 0x34, 0x02a21050 }, /* ASP-1-RX */
diff --git a/sound/pci/hda/patch_cs8409.h b/sound/pci/hda/patch_cs8409.h
index 260388a6256c..2a8dfb4ff046 100644
--- a/sound/pci/hda/patch_cs8409.h
+++ b/sound/pci/hda/patch_cs8409.h
@@ -358,13 +358,11 @@ extern const struct snd_pci_quirk cs8409_fixup_tbl[];
 extern const struct hda_model_fixup cs8409_models[];
 extern const struct hda_fixup cs8409_fixups[];
 extern const struct hda_verb cs8409_cs42l42_init_verbs[];
-extern const struct hda_pintbl cs8409_cs42l42_pincfgs[];
 extern const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[];
 extern const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[];
 extern struct sub_codec cs8409_cs42l42_codec;
 
 extern const struct hda_verb dolphin_init_verbs[];
-extern const struct hda_pintbl dolphin_pincfgs[];
 extern const struct cs8409_cir_param dolphin_hw_cfg[];
 extern struct sub_codec dolphin_cs42l42_0;
 extern struct sub_codec dolphin_cs42l42_1;
-- 
2.27.0


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

* Re: [PATCH] ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static
  2022-07-04 14:28 ` Tom Rix
@ 2022-07-05  7:45   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-07-05  7:45 UTC (permalink / raw)
  To: Tom Rix
  Cc: perex, tiwai, vitalyr, sbinding, tanureal, alsa-devel, linux-kernel

On Mon, 04 Jul 2022 16:28:36 +0200,
Tom Rix wrote:
> 
> sparse reports
> sound/pci/hda/patch_cs8409-tables.c:79:25: warning: symbol 'cs8409_cs42l42_pincfgs_no_dmic' was not declared. Should it be static?
> 
> cs8409_cs42l42_pincfgs_no_dmic is only used by cs8409_fixups table as an
> initializer for the hda_fixup element v.pins.  Both are defined in the
> patch_cs8408-table.c file but only cs8409_fixups is used externally in
> patch_cs8409.c.  So cs8409_cs42l42_pincfgs_no_dmic should have a static
> storage class specifier.
> 
> The other v.pins initializers in cs8409_fixups table, though declared
> extern in patch_cs8409.h are also only used in patch_cs8409-tables.c.
> So change all the v.pins initializers to static.
> 
> Fixes: 9e7647b5070f ("ALSA: hda/cs8409: Move arrays of configuration to a new file")
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks, applied now.


Takashi

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

* Re: [PATCH] ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static
@ 2022-07-05  7:45   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-07-05  7:45 UTC (permalink / raw)
  To: Tom Rix; +Cc: sbinding, tanureal, vitalyr, linux-kernel, alsa-devel, tiwai

On Mon, 04 Jul 2022 16:28:36 +0200,
Tom Rix wrote:
> 
> sparse reports
> sound/pci/hda/patch_cs8409-tables.c:79:25: warning: symbol 'cs8409_cs42l42_pincfgs_no_dmic' was not declared. Should it be static?
> 
> cs8409_cs42l42_pincfgs_no_dmic is only used by cs8409_fixups table as an
> initializer for the hda_fixup element v.pins.  Both are defined in the
> patch_cs8408-table.c file but only cs8409_fixups is used externally in
> patch_cs8409.c.  So cs8409_cs42l42_pincfgs_no_dmic should have a static
> storage class specifier.
> 
> The other v.pins initializers in cs8409_fixups table, though declared
> extern in patch_cs8409.h are also only used in patch_cs8409-tables.c.
> So change all the v.pins initializers to static.
> 
> Fixes: 9e7647b5070f ("ALSA: hda/cs8409: Move arrays of configuration to a new file")
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2022-07-05  7:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-04 14:28 [PATCH] ALSA: hda/cs8409: change cs8409_fixups v.pins initializers to static Tom Rix
2022-07-04 14:28 ` Tom Rix
2022-07-05  7:45 ` Takashi Iwai
2022-07-05  7:45   ` Takashi Iwai

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.