linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol
@ 2021-09-07 18:42 Pierre-Louis Bossart
  2021-09-13 10:53 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Louis Bossart @ 2021-09-07 18:42 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Pierre-Louis Bossart, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Vijendar Mukunda, Chuhong Yuan,
	Mario Limonciello, Gu Shengxian, open list

Sparse reports the following warning:

sound/soc/amd/acp-pcm-dma.c:39:6: error: symbol 'bt_uart_enable' was
not declared. Should it be static?

It's not very good practice to export such symbols that can easily
conflict, add the acp_ prefix and add declaration in header file.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/amd/acp-da7219-max98357a.c | 6 +++---
 sound/soc/amd/acp-pcm-dma.c          | 6 +++---
 sound/soc/amd/acp.h                  | 2 ++
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index b3df98a9f9f3..b2065f3fe42c 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -33,7 +33,7 @@ static struct clk *da7219_dai_wclk;
 static struct clk *da7219_dai_bclk;
 static struct clk *rt5682_dai_wclk;
 static struct clk *rt5682_dai_bclk;
-extern bool bt_uart_enable;
+
 void *acp_soc_is_rltk_max(struct device *dev);
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
@@ -760,8 +760,8 @@ static int cz_probe(struct platform_device *pdev)
 				"devm_snd_soc_register_card(%s) failed\n",
 				card->name);
 	}
-	bt_uart_enable = !device_property_read_bool(&pdev->dev,
-						    "bt-pad-enable");
+	acp_bt_uart_enable = !device_property_read_bool(&pdev->dev,
+							"bt-pad-enable");
 	return 0;
 }
 
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 11b3c4f39eba..1f322accd9ea 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -36,8 +36,8 @@
 #define ST_MIN_BUFFER ST_MAX_BUFFER
 
 #define DRV_NAME "acp_audio_dma"
-bool bt_uart_enable = true;
-EXPORT_SYMBOL(bt_uart_enable);
+bool acp_bt_uart_enable = true;
+EXPORT_SYMBOL(acp_bt_uart_enable);
 
 static const struct snd_pcm_hardware acp_pcm_hardware_playback = {
 	.info = SNDRV_PCM_INFO_INTERLEAVED |
@@ -596,7 +596,7 @@ static int acp_init(void __iomem *acp_mmio, u32 asic_type)
 	acp_reg_write(val, acp_mmio, mmACP_SOFT_RESET);
 
 	/* For BT instance change pins from UART to BT */
-	if (!bt_uart_enable) {
+	if (!acp_bt_uart_enable) {
 		val = acp_reg_read(acp_mmio, mmACP_BT_UART_PAD_SEL);
 		val |= ACP_BT_UART_PAD_SELECT_MASK;
 		acp_reg_write(val, acp_mmio, mmACP_BT_UART_PAD_SEL);
diff --git a/sound/soc/amd/acp.h b/sound/soc/amd/acp.h
index e5ab6c6040a6..85529ed7e5f5 100644
--- a/sound/soc/amd/acp.h
+++ b/sound/soc/amd/acp.h
@@ -204,4 +204,6 @@ typedef struct acp_dma_dscr_transfer {
 	u32 reserved;
 } acp_dma_dscr_transfer_t;
 
+extern bool acp_bt_uart_enable;
+
 #endif /*__ACP_HW_H */
-- 
2.25.1


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

* Re: [PATCH] ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol
  2021-09-07 18:42 [PATCH] ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol Pierre-Louis Bossart
@ 2021-09-13 10:53 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-09-13 10:53 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel
  Cc: Mark Brown, Jaroslav Kysela, Chuhong Yuan, Gu Shengxian,
	Liam Girdwood, Mario Limonciello, open list, tiwai,
	Vijendar Mukunda, Takashi Iwai

On Tue, 7 Sep 2021 13:42:14 -0500, Pierre-Louis Bossart wrote:
> Sparse reports the following warning:
> 
> sound/soc/amd/acp-pcm-dma.c:39:6: error: symbol 'bt_uart_enable' was
> not declared. Should it be static?
> 
> It's not very good practice to export such symbols that can easily
> conflict, add the acp_ prefix and add declaration in header file.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol
      commit: 198433023ef962b71f3d4274ca7a4c8f04e7ace1

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

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

end of thread, other threads:[~2021-09-13 10:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 18:42 [PATCH] ASoC: amd: acp: declare and add prefix to 'bt_uart_enable' symbol Pierre-Louis Bossart
2021-09-13 10:53 ` 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).