linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 01/13] ASoC: atmel: fix kernel-doc
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 02/13] ASoC: samsung: spdif: " Pierre-Louis Bossart
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart,
	Alexandre Belloni, Codrin Ciubotariu, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Nicolas Ferre, Ludovic Desroches,
	moderated list:ARM/Microchip (AT91) SoC support, open list

Fix W=1 warning

Kernel-doc is not used in one file and missing argument in the second.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/atmel/atmel-pcm-dma.c | 2 +-
 sound/soc/atmel/atmel_ssc_dai.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index cb03c4f7324c..0a2e956232af 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -44,7 +44,7 @@ static const struct snd_pcm_hardware atmel_pcm_dma_hardware = {
 	.buffer_bytes_max	= 512 * 1024,
 };
 
-/**
+/*
  * atmel_pcm_dma_irq: SSC interrupt handler for DMAENGINE enabled SSC
  *
  * We use DMAENGINE to send/receive data to/from SSC so this ISR is only to
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 0f18dfb85bfe..6a63e8797a0b 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -887,6 +887,7 @@ static int asoc_ssc_init(struct device *dev)
 
 /**
  * atmel_ssc_set_audio - Allocate the specified SSC for audio use.
+ * @ssc_id: SSD ID in [0, NUM_SSC_DEVICES[
  */
 int atmel_ssc_set_audio(int ssc_id)
 {
-- 
2.25.1


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

* [PATCH v3 02/13] ASoC: samsung: spdif: fix kernel-doc
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
  2020-07-07 19:06 ` [PATCH v3 01/13] ASoC: atmel: fix kernel-doc Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 03/13] ASoC: samsung: pcm: " Pierre-Louis Bossart
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart,
	Sylwester Nawrocki, Krzysztof Kozlowski, Sangbeom Kim,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, open list

Fix W=1 warnings - typos with structure fields

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/samsung/spdif.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 759fc6644329..4ae7ff623b82 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -70,9 +70,9 @@
  * @clk_rate: Current clock rate for calcurate ratio.
  * @pclk: The peri-clock pointer for spdif master operation.
  * @sclk: The source clock pointer for making sync signals.
- * @save_clkcon: Backup clkcon reg. in suspend.
- * @save_con: Backup con reg. in suspend.
- * @save_cstas: Backup cstas reg. in suspend.
+ * @saved_clkcon: Backup clkcon reg. in suspend.
+ * @saved_con: Backup con reg. in suspend.
+ * @saved_cstas: Backup cstas reg. in suspend.
  * @dma_playback: DMA information for playback channel.
  */
 struct samsung_spdif_info {
-- 
2.25.1


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

* [PATCH v3 03/13] ASoC: samsung: pcm: fix kernel-doc
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
  2020-07-07 19:06 ` [PATCH v3 01/13] ASoC: atmel: fix kernel-doc Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 02/13] ASoC: samsung: spdif: " Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 04/13] ASoC: tegra: tegra20_das: remove always-true comparison Pierre-Louis Bossart
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart,
	Sylwester Nawrocki, Krzysztof Kozlowski, Sangbeom Kim,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, open list

Fix W=1 warnings - missing fields in structure

Credits to Sylwester Nawrocki for the pclk and cclk descriptions.

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/samsung/pcm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index a5b1a12b3496..45dfc534c6c7 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -104,8 +104,13 @@
 
 /**
  * struct s3c_pcm_info - S3C PCM Controller information
+ * @lock: Spin lock
  * @dev: The parent device passed to use from the probe.
  * @regs: The pointer to the device register block.
+ * @sclk_per_fs: number of sclk per frame sync
+ * @idleclk: Whether to keep PCMSCLK enabled even when idle (no active xfer)
+ * @pclk: the PCLK_PCM (pcm) clock pointer
+ * @cclk: the SCLK_AUDIO (audio-bus) clock pointer
  * @dma_playback: DMA information for playback channel.
  * @dma_capture: DMA information for capture channel.
  */
-- 
2.25.1


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

* [PATCH v3 04/13] ASoC: tegra: tegra20_das: remove always-true comparison
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (2 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 03/13] ASoC: samsung: pcm: " Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 05/13] ASoC: uniphier: aio-core: fix kernel-doc Pierre-Louis Bossart
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Jon Hunter,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Thierry Reding,
	YueHaibing, open list:TEGRA ARCHITECTURE SUPPORT, open list

Fix W=1 warning:

sound/soc//tegra/tegra20_das.c:101:11: warning:
comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  101 |  if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) &&
      |           ^~

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/tegra/tegra20_das.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c
index 1070b2710d5e..79dba878d854 100644
--- a/sound/soc/tegra/tegra20_das.c
+++ b/sound/soc/tegra/tegra20_das.c
@@ -98,8 +98,7 @@ EXPORT_SYMBOL_GPL(tegra20_das_connect_dac_to_dap);
 
 static bool tegra20_das_wr_rd_reg(struct device *dev, unsigned int reg)
 {
-	if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) &&
-	    (reg <= LAST_REG(DAP_CTRL_SEL)))
+	if (reg <= LAST_REG(DAP_CTRL_SEL))
 		return true;
 	if ((reg >= TEGRA20_DAS_DAC_INPUT_DATA_CLK_SEL) &&
 	    (reg <= LAST_REG(DAC_INPUT_DATA_CLK_SEL)))
-- 
2.25.1


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

* [PATCH v3 05/13] ASoC: uniphier: aio-core: fix kernel-doc
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (3 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 04/13] ASoC: tegra: tegra20_das: remove always-true comparison Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 06/13] ASoC: codecs: da7210: " Pierre-Louis Bossart
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Masahiro Yamada,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	moderated list:ARM/UNIPHIER ARCHITECTURE, open list

Fix W=1 warning - wrong parameter description and bad format

Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/uniphier/aio-core.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/uniphier/aio-core.c b/sound/soc/uniphier/aio-core.c
index 9bcba06ba52e..b8195778953e 100644
--- a/sound/soc/uniphier/aio-core.c
+++ b/sound/soc/uniphier/aio-core.c
@@ -93,9 +93,9 @@ void aio_iecout_set_enable(struct uniphier_aio_chip *chip, bool enable)
 
 /**
  * aio_chip_set_pll - set frequency to audio PLL
- * @chip  : the AIO chip pointer
- * @source: PLL
- * @freq  : frequency in Hz, 0 is ignored
+ * @chip: the AIO chip pointer
+ * @pll_id: PLL
+ * @freq: frequency in Hz, 0 is ignored
  *
  * Sets frequency of audio PLL. This function can be called anytime,
  * but it takes time till PLL is locked.
@@ -267,7 +267,6 @@ void aio_port_reset(struct uniphier_aio_sub *sub)
 /**
  * aio_port_set_ch - set channels of LPCM
  * @sub: the AIO substream pointer, PCM substream only
- * @ch : count of channels
  *
  * Set suitable slot selecting to input/output port block of AIO.
  *
-- 
2.25.1


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

* [PATCH v3 06/13] ASoC: codecs: da7210: fix kernel-doc
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (4 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 05/13] ASoC: uniphier: aio-core: fix kernel-doc Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 07/13] ASoC: codecs: da7219: fix 'defined but not used' warning Pierre-Louis Bossart
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Adam Thomson,
	Support Opensource, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	open list

Fix W=1 warning, the kernel-doc syntax was probably from Doxygen?

Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/da7210.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 0c99dcf242e4..2bb727dd3a20 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -971,14 +971,16 @@ static int da7210_set_dai_sysclk(struct snd_soc_dai *codec_dai,
 
 /**
  * da7210_set_dai_pll	:Configure the codec PLL
- * @param codec_dai	: pointer to codec DAI
- * @param pll_id	: da7210 has only one pll, so pll_id is always zero
- * @param fref		: MCLK frequency, should be < 20MHz
- * @param fout		: FsDM value, Refer page 44 & 45 of datasheet
- * @return int		: Zero for success, negative error code for error
+ * @codec_dai: pointer to codec DAI
+ * @pll_id: da7210 has only one pll, so pll_id is always zero
+ * @source: clock source
+ * @fref: MCLK frequency, should be < 20MHz
+ * @fout: FsDM value, Refer page 44 & 45 of datasheet
  *
  * Note: Supported PLL input frequencies are 12MHz, 13MHz, 13.5MHz, 14.4MHz,
  *       19.2MHz, 19.6MHz and 19.8MHz
+ *
+ * Return: Zero for success, negative error code for error
  */
 static int da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
 			      int source, unsigned int fref, unsigned int fout)
-- 
2.25.1


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

* [PATCH v3 07/13] ASoC: codecs: da7219: fix 'defined but not used' warning
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (5 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 06/13] ASoC: codecs: da7210: " Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 08/13] ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv' Pierre-Louis Bossart
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Adam Thomson,
	Support Opensource, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	open list

fix W=1 warning

sound/soc/codecs/da7219.c:1711:36: warning: 'da7219_acpi_match'
defined but not used [-Wunused-const-variable=]
 1711 | static const struct acpi_device_id da7219_acpi_match[] = {
      |                                    ^~~~~~~~~~~~~~~~~

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/da7219.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index f2520a6c7875..153ea30b5a8f 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1708,11 +1708,13 @@ static const struct of_device_id da7219_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, da7219_of_match);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id da7219_acpi_match[] = {
 	{ .id = "DLGS7219", },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, da7219_acpi_match);
+#endif
 
 static enum da7219_micbias_voltage
 	da7219_fw_micbias_lvl(struct device *dev, u32 val)
-- 
2.25.1


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

* [PATCH v3 08/13] ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv'
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (6 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 07/13] ASoC: codecs: da7219: fix 'defined but not used' warning Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Pierre-Louis Bossart
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, ter Huurne, Paul Cercueil,
	Pierre-Louis Bossart, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, open list

From: Lee Jones <lee.jones@linaro.org>

Fixes the following W=1 kernel build warning(s):

 In file included from include/sound/tlv.h:10,
 from sound/soc/codecs/jz4770.c:19:
 sound/soc/codecs/jz4770.c:306:35: warning: ‘mic_boost_tlv’ defined but not used [-Wunused-const-variable=]
 306 | static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0);
 | ^~~~~~~~~~~~~
 include/uapi/sound/tlv.h:64:15: note: in definition of macro ‘SNDRV_CTL_TLVD_DECLARE_DB_SCALE’
 64 | unsigned int name[] = { | ^~~~
 sound/soc/codecs/jz4770.c:306:14: note: in expansion of macro ‘DECLARE_TLV_DB_SCALE’
 306 | static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0);
 | ^~~~~~~~~~~~~~~~~~~~

Cc: ter Huurne <maarten@treewalker.org>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/jz4770.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c
index 34775aa62402..4dee585761c2 100644
--- a/sound/soc/codecs/jz4770.c
+++ b/sound/soc/codecs/jz4770.c
@@ -303,7 +303,6 @@ static int jz4770_codec_digital_mute(struct snd_soc_dai *dai, int mute)
 static const DECLARE_TLV_DB_MINMAX_MUTE(dac_tlv, -3100, 0);
 static const DECLARE_TLV_DB_SCALE(adc_tlv, 0, 100, 0);
 static const DECLARE_TLV_DB_MINMAX(out_tlv, -2500, 600);
-static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0);
 static const DECLARE_TLV_DB_SCALE(linein_tlv, -2500, 100, 0);
 
 /* Unconditional controls. */
-- 
2.25.1


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

* [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (7 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 08/13] ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv' Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-08  5:39   ` Peter Ujfalusi
  2020-07-07 19:06 ` [PATCH v3 10/13] ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning Pierre-Louis Bossart
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Peter Ujfalusi, Jarkko Nikula,
	Samuel Ortiz, linux-omap, Pierre-Louis Bossart, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, open list

From: Lee Jones <lee.jones@linaro.org>

Looks like 'w' has remained unchecked since the driver's inception.

Fixes the following W=1 kernel build warning(s):

 sound/soc/ti/omap-mcbsp-st.c: In function ‘omap_mcbsp_st_chgain’:
 sound/soc/ti/omap-mcbsp-st.c:145:6: warning: variable ‘w’ set but not used [-Wunused-but-set-variable]

Peter suggested that the whole read can be removed, so that's
been done too.

Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Samuel Ortiz <samuel.ortiz@nokia.com>
Cc: linux-omap@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/ti/omap-mcbsp-st.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sound/soc/ti/omap-mcbsp-st.c b/sound/soc/ti/omap-mcbsp-st.c
index 5a32b54bbf3b..0bc7d26c660a 100644
--- a/sound/soc/ti/omap-mcbsp-st.c
+++ b/sound/soc/ti/omap-mcbsp-st.c
@@ -142,11 +142,8 @@ static void omap_mcbsp_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)
 
 static void omap_mcbsp_st_chgain(struct omap_mcbsp *mcbsp)
 {
-	u16 w;
 	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
 
-	w = MCBSP_ST_READ(mcbsp, SSELCR);
-
 	MCBSP_ST_WRITE(mcbsp, SGAINCR, ST_CH0GAIN(st_data->ch0gain) |
 		       ST_CH1GAIN(st_data->ch1gain));
 }
-- 
2.25.1


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

* [PATCH v3 10/13] ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (8 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 11/13] ASoC: codecs: es8316: " Pierre-Louis Bossart
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Cheng-Yi Chiang,
	Enric Balletbo i Serra, Guenter Roeck, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Benson Leung, open list

fix W=1 warning

sound/soc/codecs/cros_ec_codec.c:1056:36: warning:
'cros_ec_codec_acpi_id' defined but not used
[-Wunused-const-variable=]
 1056 | static const struct acpi_device_id cros_ec_codec_acpi_id[] = {
      |                                    ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/cros_ec_codec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c
index 8d45c628e988..f23956cf4ed8 100644
--- a/sound/soc/codecs/cros_ec_codec.c
+++ b/sound/soc/codecs/cros_ec_codec.c
@@ -1053,11 +1053,13 @@ static const struct of_device_id cros_ec_codec_of_match[] = {
 MODULE_DEVICE_TABLE(of, cros_ec_codec_of_match);
 #endif
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id cros_ec_codec_acpi_id[] = {
 	{ "GOOG0013", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, cros_ec_codec_acpi_id);
+#endif
 
 static struct platform_driver cros_ec_codec_platform_driver = {
 	.driver = {
-- 
2.25.1


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

* [PATCH v3 11/13] ASoC: codecs: es8316: fix 'defined but not used' warning
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (9 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 10/13] ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 12/13] ASoC: codecs: max98390: " Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 13/13] ASoC: codecs: rt*: " Pierre-Louis Bossart
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Katsuhiro Suzuki, Daniel Drake,
	open list

Fix W=1 warning

sound/soc/codecs/es8316.c:842:36: warning: 'es8316_acpi_match' defined
but not used [-Wunused-const-variable=]
  842 | static const struct acpi_device_id es8316_acpi_match[] = {
      |                                    ^~~~~~~~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/es8316.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index 36eef1fb3d18..70af35c5f727 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -839,11 +839,13 @@ static const struct of_device_id es8316_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, es8316_of_match);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id es8316_acpi_match[] = {
 	{"ESSX8316", 0},
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, es8316_acpi_match);
+#endif
 
 static struct i2c_driver es8316_i2c_driver = {
 	.driver = {
-- 
2.25.1


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

* [PATCH v3 12/13] ASoC: codecs: max98390: fix 'defined but not used' warning
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (10 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 11/13] ASoC: codecs: es8316: " Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  2020-07-07 19:06 ` [PATCH v3 13/13] ASoC: codecs: rt*: " Pierre-Louis Bossart
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Liam Girdwood,
	Jaroslav Kysela, Takashi Iwai, Steve Lee, open list

Fix W=1 warning and removed unused table. In this case this a
duplicate of

static const struct of_device_id max98390_of_match[] = {
	{ .compatible = "maxim,max98390", },
	{}
};
MODULE_DEVICE_TABLE(of, max98390_of_match);

already used in the rest of the code.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/max98390.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/sound/soc/codecs/max98390.c b/sound/soc/codecs/max98390.c
index b345e626956d..3e8094241645 100644
--- a/sound/soc/codecs/max98390.c
+++ b/sound/soc/codecs/max98390.c
@@ -944,14 +944,6 @@ static const struct regmap_config max98390_regmap = {
 	.cache_type       = REGCACHE_RBTREE,
 };
 
-#ifdef CONFIG_OF
-static const struct of_device_id max98390_dt_ids[] = {
-	{ .compatible = "maxim,max98390", },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, max98390_dt_ids);
-#endif
-
 static int max98390_i2c_probe(struct i2c_client *i2c,
 		const struct i2c_device_id *id)
 {
-- 
2.25.1


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

* [PATCH v3 13/13] ASoC: codecs: rt*: fix 'defined but not used' warning
       [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
                   ` (11 preceding siblings ...)
  2020-07-07 19:06 ` [PATCH v3 12/13] ASoC: codecs: max98390: " Pierre-Louis Bossart
@ 2020-07-07 19:06 ` Pierre-Louis Bossart
  12 siblings, 0 replies; 14+ messages in thread
From: Pierre-Louis Bossart @ 2020-07-07 19:06 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, broonie, Lee Jones, Pierre-Louis Bossart, Oder Chiou,
	Liam Girdwood, Jaroslav Kysela, Takashi Iwai, open list

Fix W=1 warning when ACPI is not defined

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/codecs/rt274.c      | 2 ++
 sound/soc/codecs/rt286.c      | 2 ++
 sound/soc/codecs/rt298.c      | 2 ++
 sound/soc/codecs/rt5660.c     | 2 ++
 sound/soc/codecs/rt5677-spi.c | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
index cbb5e176d11a..40a28fb4fd09 100644
--- a/sound/soc/codecs/rt274.c
+++ b/sound/soc/codecs/rt274.c
@@ -1105,12 +1105,14 @@ static const struct i2c_device_id rt274_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt274_i2c_id);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id rt274_acpi_match[] = {
 	{ "10EC0274", 0 },
 	{ "INT34C2", 0 },
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, rt274_acpi_match);
+#endif
 
 static int rt274_i2c_probe(struct i2c_client *i2c,
 			   const struct i2c_device_id *id)
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 9593a9a27bf8..89b1c8b68004 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -1079,11 +1079,13 @@ static const struct i2c_device_id rt286_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt286_i2c_id);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id rt286_acpi_match[] = {
 	{ "INT343A", 0 },
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, rt286_acpi_match);
+#endif
 
 static const struct dmi_system_id force_combo_jack_table[] = {
 	{
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index 7fc7d6181630..dc0273a5a11f 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -1145,11 +1145,13 @@ static const struct i2c_device_id rt298_i2c_id[] = {
 };
 MODULE_DEVICE_TABLE(i2c, rt298_i2c_id);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id rt298_acpi_match[] = {
 	{ "INT343A", 0 },
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, rt298_acpi_match);
+#endif
 
 static const struct dmi_system_id force_combo_jack_table[] = {
 	{
diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c
index 78371e51bc34..9e3813f7583d 100644
--- a/sound/soc/codecs/rt5660.c
+++ b/sound/soc/codecs/rt5660.c
@@ -1241,12 +1241,14 @@ static const struct of_device_id rt5660_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, rt5660_of_match);
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5660_acpi_match[] = {
 	{ "10EC5660", 0 },
 	{ "10EC3277", 0 },
 	{ },
 };
 MODULE_DEVICE_TABLE(acpi, rt5660_acpi_match);
+#endif
 
 static int rt5660_parse_dt(struct rt5660_priv *rt5660, struct device *dev)
 {
diff --git a/sound/soc/codecs/rt5677-spi.c b/sound/soc/codecs/rt5677-spi.c
index 7bfade8b3d6e..95ac12a5cc6b 100644
--- a/sound/soc/codecs/rt5677-spi.c
+++ b/sound/soc/codecs/rt5677-spi.c
@@ -614,11 +614,13 @@ static int rt5677_spi_probe(struct spi_device *spi)
 	return ret;
 }
 
+#ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5677_spi_acpi_id[] = {
 	{ "RT5677AA", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5677_spi_acpi_id);
+#endif
 
 static struct spi_driver rt5677_spi_driver = {
 	.driver = {
-- 
2.25.1


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

* Re: [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'
  2020-07-07 19:06 ` [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Pierre-Louis Bossart
@ 2020-07-08  5:39   ` Peter Ujfalusi
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Ujfalusi @ 2020-07-08  5:39 UTC (permalink / raw)
  To: Pierre-Louis Bossart, alsa-devel
  Cc: tiwai, broonie, Lee Jones, Jarkko Nikula, Samuel Ortiz,
	linux-omap, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	open list



On 07/07/2020 22.06, Pierre-Louis Bossart wrote:
> From: Lee Jones <lee.jones@linaro.org>
> 
> Looks like 'w' has remained unchecked since the driver's inception.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  sound/soc/ti/omap-mcbsp-st.c: In function ‘omap_mcbsp_st_chgain’:
>  sound/soc/ti/omap-mcbsp-st.c:145:6: warning: variable ‘w’ set but not used [-Wunused-but-set-variable]
> 
> Peter suggested that the whole read can be removed, so that's
> been done too.

Thank you,

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Cc: Samuel Ortiz <samuel.ortiz@nokia.com>
> Cc: linux-omap@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
>  sound/soc/ti/omap-mcbsp-st.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/sound/soc/ti/omap-mcbsp-st.c b/sound/soc/ti/omap-mcbsp-st.c
> index 5a32b54bbf3b..0bc7d26c660a 100644
> --- a/sound/soc/ti/omap-mcbsp-st.c
> +++ b/sound/soc/ti/omap-mcbsp-st.c
> @@ -142,11 +142,8 @@ static void omap_mcbsp_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)
>  
>  static void omap_mcbsp_st_chgain(struct omap_mcbsp *mcbsp)
>  {
> -	u16 w;
>  	struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
>  
> -	w = MCBSP_ST_READ(mcbsp, SSELCR);
> -
>  	MCBSP_ST_WRITE(mcbsp, SGAINCR, ST_CH0GAIN(st_data->ch0gain) |
>  		       ST_CH1GAIN(st_data->ch1gain));
>  }
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


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

end of thread, other threads:[~2020-07-08  5:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200707190612.97799-1-pierre-louis.bossart@linux.intel.com>
2020-07-07 19:06 ` [PATCH v3 01/13] ASoC: atmel: fix kernel-doc Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 02/13] ASoC: samsung: spdif: " Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 03/13] ASoC: samsung: pcm: " Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 04/13] ASoC: tegra: tegra20_das: remove always-true comparison Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 05/13] ASoC: uniphier: aio-core: fix kernel-doc Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 06/13] ASoC: codecs: da7210: " Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 07/13] ASoC: codecs: da7219: fix 'defined but not used' warning Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 08/13] ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv' Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 09/13] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Pierre-Louis Bossart
2020-07-08  5:39   ` Peter Ujfalusi
2020-07-07 19:06 ` [PATCH v3 10/13] ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 11/13] ASoC: codecs: es8316: " Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 12/13] ASoC: codecs: max98390: " Pierre-Louis Bossart
2020-07-07 19:06 ` [PATCH v3 13/13] ASoC: codecs: rt*: " Pierre-Louis Bossart

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).