2020-07-07 10:20:24

by Lee Jones

[permalink] [raw]
Subject: [PATCH 00/28] Clean-up ASoC's W=1 build warnings

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

After these patches are applied, the build system no longer
complains about any W=0 nor W=1 level warnings in sound/soc.

Hurrah!

Lee Jones (28):
ASoC: atmel: atmel-pcm-dma: Demote function header which is clearly
not kerneldoc
ASoC: atmel: atmel_ssc_dai: Demote function header which is clearly
not kerneldoc
ASoC: fsl: fsl-asoc-card: Use correct format when providing struct
documentation
ASoC: fsl: fsl_asrc: Demote obvious misuse of kerneldoc to standard
comment blocks
ASoC: fsl: fsl_ssi: Demote obvious misuse of kerneldoc to standard
comment blocks
ASoC: fsl: fsl_ssi_dbg: Demote obvious misuse of kerneldoc to standard
comment blocks
ASoC: fsl: fsl_spdif: Use correct formatting when denoting struct
documentation
ASoC: fsl: fsl_spdif: Update 'struct fsl_spdif_priv's descriptions
ASoC: fsl: fsl_esai: Fix a bunch of kerneldoc issues
ASoC: fsl: fsl_esai: Add descriptions for 'tx_mask' and 'rx_mask' to
'fsl_esai'
ASoC: pxa: pxa-ssp: Demote seemingly unintentional kerneldoc header
ASoC: codecs: ak4458: Remove set but never checked variable 'ret'
ASoC: qcom: qdsp6: q6asm: Provide documentation for WMA
'codec_profile'
ASoC: samsung: pcm: Demote half-documented kerneldoc header
ASoC: samsung: spdif: Fix 3 misspelled struct properties
ASoC: sunxi: sun4i-i2s: Demote half-documented kerneldoc header
ASoC: uniphier: aio-core: Fix incorrectly named struct property and
remove another
ASoC: sunxi: sun4i-spdif: Fix misspelling of 'reg_dac_txdata'
ASoC: ux500: ux500_msp_i2s: Remove unused variables 'reg_val_DR' and
'reg_val_TSTDR'
ASoC: sti: uniperif: Mark 'uni_tdm_hw' as __maybe_unused
ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'
ASoC: codecs: da7210: Fix formatting issues in da7210_set_dai_pll()
header
ASoC: soc-ac97: Demote seemingly unintentional kerneldoc header
ASoC: codecs: jz4770: Remove defined but never used variable
'mic_boost_tlv'
ASoC: codecs: rt5631: Demote misuse of kerneldoc to standard comment
blocks
ASoC: codecs: rt5659: Remove many unused const variables
ASoC: codecs: tlv320aic26: Demote seemingly unintentional kerneldoc
header
ASoC: codecs: wm8400: Remove a bunch of unused variables

sound/soc/atmel/atmel-pcm-dma.c | 2 +-
sound/soc/atmel/atmel_ssc_dai.c | 2 +-
sound/soc/codecs/ak4458.c | 6 +++---
sound/soc/codecs/da7210.c | 12 ++++++-----
sound/soc/codecs/jz4770.c | 1 -
sound/soc/codecs/rt5631.c | 12 +++++------
sound/soc/codecs/rt5659.c | 37 ---------------------------------
sound/soc/codecs/tlv320aic26.c | 2 +-
sound/soc/codecs/wm8400.c | 12 -----------
sound/soc/fsl/fsl-asoc-card.c | 16 +++++++-------
sound/soc/fsl/fsl_asrc.c | 28 ++++++++++++-------------
sound/soc/fsl/fsl_esai.c | 19 ++++++++++-------
sound/soc/fsl/fsl_spdif.c | 5 +++--
sound/soc/fsl/fsl_ssi.c | 28 ++++++++++++-------------
sound/soc/fsl/fsl_ssi_dbg.c | 4 ++--
sound/soc/pxa/pxa-ssp.c | 2 +-
sound/soc/qcom/qdsp6/q6asm.c | 1 +
sound/soc/samsung/pcm.c | 2 +-
sound/soc/samsung/spdif.c | 6 +++---
sound/soc/soc-ac97.c | 2 +-
sound/soc/sti/uniperif.h | 2 +-
sound/soc/sunxi/sun4i-i2s.c | 2 +-
sound/soc/sunxi/sun4i-spdif.c | 2 +-
sound/soc/ti/omap-mcbsp-st.c | 3 +--
sound/soc/uniphier/aio-core.c | 7 +++----
sound/soc/ux500/ux500_msp_i2s.c | 8 +++----
26 files changed, 89 insertions(+), 134 deletions(-)

--
2.25.1


2020-07-07 10:20:39

by Lee Jones

[permalink] [raw]
Subject: [PATCH 28/28] ASoC: codecs: wm8400: Remove a bunch of unused variables

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

sound/soc/codecs/wm8400.c:443:38: warning: ‘wm8400_dapm_rxvoice_controls’ defined but not used [-Wunused-const-variable=]
443 | static const struct snd_kcontrol_new wm8400_dapm_rxvoice_controls[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/sound/tlv.h:10,
from sound/soc/codecs/wm8400.c:26:
sound/soc/codecs/wm8400.c:78:35: warning: ‘out_omix_tlv’ defined but not used [-Wunused-const-variable=]
78 | static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 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/wm8400.c:78:14: note: in expansion of macro ‘DECLARE_TLV_DB_SCALE’
78 | static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/codecs/wm8400.c:70:35: warning: ‘rec_mix_tlv’ defined but not used [-Wunused-const-variable=]
70 | static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 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/wm8400.c:70:14: note: in expansion of macro ‘DECLARE_TLV_DB_SCALE’
70 | static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
| ^~~~~~~~~~~~~~~~~~~~

Cc: Kuninori Morimoto <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/codecs/wm8400.c | 12 ------------
1 file changed, 12 deletions(-)

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 2551eb0f1868c..35ffa7765c85c 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -67,16 +67,12 @@ static void wm8400_component_reset(struct snd_soc_component *component)
wm8400_reset_codec_reg_cache(wm8400->wm8400);
}

-static const DECLARE_TLV_DB_SCALE(rec_mix_tlv, -1500, 600, 0);
-
static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);

static const DECLARE_TLV_DB_SCALE(out_mix_tlv, -2100, 0, 0);

static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0);

-static const DECLARE_TLV_DB_SCALE(out_omix_tlv, -600, 0, 0);
-
static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);

static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0);
@@ -439,14 +435,6 @@ static SOC_ENUM_SINGLE_DECL(wm8400_ainrmux_enum,
static const struct snd_kcontrol_new wm8400_dapm_ainrmux_controls =
SOC_DAPM_ENUM("Route", wm8400_ainrmux_enum);

-/* RXVOICE */
-static const struct snd_kcontrol_new wm8400_dapm_rxvoice_controls[] = {
-SOC_DAPM_SINGLE_TLV("LIN4/RXN", WM8400_INPUT_MIXER5, WM8400_LR4BVOL_SHIFT,
- WM8400_LR4BVOL_MASK, 0, in_mix_tlv),
-SOC_DAPM_SINGLE_TLV("RIN4/RXP", WM8400_INPUT_MIXER6, WM8400_RL4BVOL_SHIFT,
- WM8400_RL4BVOL_MASK, 0, in_mix_tlv),
-};
-
/* LOMIX */
static const struct snd_kcontrol_new wm8400_dapm_lomix_controls[] = {
SOC_DAPM_SINGLE("LOMIX Right ADC Bypass Switch", WM8400_OUTPUT_MIXER1,
--
2.25.1

2020-07-07 10:21:33

by Lee Jones

[permalink] [raw]
Subject: [PATCH 21/28] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'

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]

Cc: Peter Ujfalusi <[email protected]>
Cc: Jarkko Nikula <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/ti/omap-mcbsp-st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/ti/omap-mcbsp-st.c b/sound/soc/ti/omap-mcbsp-st.c
index 5a32b54bbf3bb..643ef7eb68fc8 100644
--- a/sound/soc/ti/omap-mcbsp-st.c
+++ b/sound/soc/ti/omap-mcbsp-st.c
@@ -142,10 +142,9 @@ 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_READ(mcbsp, SSELCR);

MCBSP_ST_WRITE(mcbsp, SGAINCR, ST_CH0GAIN(st_data->ch0gain) |
ST_CH1GAIN(st_data->ch1gain));
--
2.25.1

2020-07-07 10:21:45

by Lee Jones

[permalink] [raw]
Subject: [PATCH 19/28] ASoC: ux500: ux500_msp_i2s: Remove unused variables 'reg_val_DR' and 'reg_val_TSTDR'

Looks like these have been unchecked since the driver's inception in 2012.

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

sound/soc/ux500/ux500_msp_i2s.c: In function ‘flush_fifo_rx’:
sound/soc/ux500/ux500_msp_i2s.c:398:6: warning: variable ‘reg_val_DR’ set but not used [-Wunused-but-set-variable]
sound/soc/ux500/ux500_msp_i2s.c: In function ‘flush_fifo_tx’:
sound/soc/ux500/ux500_msp_i2s.c:415:6: warning: variable ‘reg_val_TSTDR’ set but not used [-Wunused-but-set-variable]

Cc: zhong jiang <[email protected]>
Cc: Ola Lilja <[email protected]>
Cc: Roger Nilsson <[email protected]>
Cc: Sandeep Kaushik <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/ux500/ux500_msp_i2s.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/ux500/ux500_msp_i2s.c b/sound/soc/ux500/ux500_msp_i2s.c
index 394d8b2a4a161..fd0b88bb79212 100644
--- a/sound/soc/ux500/ux500_msp_i2s.c
+++ b/sound/soc/ux500/ux500_msp_i2s.c
@@ -395,7 +395,7 @@ static int enable_msp(struct ux500_msp *msp, struct ux500_msp_config *config)

static void flush_fifo_rx(struct ux500_msp *msp)
{
- u32 reg_val_DR, reg_val_GCR, reg_val_FLR;
+ u32 reg_val_GCR, reg_val_FLR;
u32 limit = 32;

reg_val_GCR = readl(msp->registers + MSP_GCR);
@@ -403,7 +403,7 @@ static void flush_fifo_rx(struct ux500_msp *msp)

reg_val_FLR = readl(msp->registers + MSP_FLR);
while (!(reg_val_FLR & RX_FIFO_EMPTY) && limit--) {
- reg_val_DR = readl(msp->registers + MSP_DR);
+ readl(msp->registers + MSP_DR);
reg_val_FLR = readl(msp->registers + MSP_FLR);
}

@@ -412,7 +412,7 @@ static void flush_fifo_rx(struct ux500_msp *msp)

static void flush_fifo_tx(struct ux500_msp *msp)
{
- u32 reg_val_TSTDR, reg_val_GCR, reg_val_FLR;
+ u32 reg_val_GCR, reg_val_FLR;
u32 limit = 32;

reg_val_GCR = readl(msp->registers + MSP_GCR);
@@ -421,7 +421,7 @@ static void flush_fifo_tx(struct ux500_msp *msp)

reg_val_FLR = readl(msp->registers + MSP_FLR);
while (!(reg_val_FLR & TX_FIFO_EMPTY) && limit--) {
- reg_val_TSTDR = readl(msp->registers + MSP_TSTDR);
+ readl(msp->registers + MSP_TSTDR);
reg_val_FLR = readl(msp->registers + MSP_FLR);
}
writel(0x0, msp->registers + MSP_ITCR);
--
2.25.1

2020-07-07 10:21:50

by Lee Jones

[permalink] [raw]
Subject: [PATCH 17/28] ASoC: uniphier: aio-core: Fix incorrectly named struct property and remove another

Both issues are likely due to bitrot. Let's bring them up-to-date.

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

sound/soc/uniphier/aio-core.c:107: warning: Function parameter or member 'pll_id' not described in 'aio_chip_set_pll'
sound/soc/uniphier/aio-core.c:107: warning: Excess function parameter 'source' description in 'aio_chip_set_pll'
sound/soc/uniphier/aio-core.c:279: warning: Excess function parameter 'ch' description in 'aio_port_set_ch'

Cc: Masahiro Yamada <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
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 9bcba06ba52ea..86eb0915d80ad 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

2020-07-07 10:21:58

by Lee Jones

[permalink] [raw]
Subject: [PATCH 16/28] ASoC: sunxi: sun4i-i2s: Demote half-documented kerneldoc header

Ideally the author or someone 'in the know' should come back and
provide the remainder of the documentation. Until the kerneldoc
checkers have been satisfied, let's just demote the header to a
standard comment block.

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

sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'bclk_dividers' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'num_bclk_dividers' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'mclk_dividers' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'num_mclk_dividers' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_bclk_parent_rate' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_sr' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_wss' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'set_chan_cfg' not described in 'sun4i_i2s_quirks'
sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'set_fmt' not described in 'sun4i_i2s_quirks'

Cc: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Andrea Venturi <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/sunxi/sun4i-i2s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index d0a8d5810c0a5..34c24e3cedc78 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -126,7 +126,7 @@

struct sun4i_i2s;

-/**
+/*
* struct sun4i_i2s_quirks - Differences between SoC variants.
*
* @has_reset: SoC needs reset deasserted.
--
2.25.1

2020-07-07 10:22:05

by Lee Jones

[permalink] [raw]
Subject: [PATCH 02/28] ASoC: atmel: atmel_ssc_dai: Demote function header which is clearly not kerneldoc

No attempt has been made to document the demoted function here.

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

sound/soc/atmel/atmel_ssc_dai.c:892: warning: Function parameter or member 'ssc_id' not described in 'atmel_ssc_set_audio'

Cc: Codrin Ciubotariu <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Alexandre Belloni <[email protected]>
Cc: Ludovic Desroches <[email protected]>
Cc: Sedji Gaouaou <[email protected]>
Cc: Frank Mandarino <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/atmel/atmel_ssc_dai.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 0f18dfb85bfed..3a0335864034a 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -885,7 +885,7 @@ static int asoc_ssc_init(struct device *dev)
return 0;
}

-/**
+/*
* atmel_ssc_set_audio - Allocate the specified SSC for audio use.
*/
int atmel_ssc_set_audio(int ssc_id)
--
2.25.1

2020-07-07 10:22:08

by Lee Jones

[permalink] [raw]
Subject: [PATCH 14/28] ASoC: samsung: pcm: Demote half-documented kerneldoc header

Ideally the author or someone 'in the know' should come back and
provide the remainder of the documentation. Until the kerneldoc
checkers have been satisfied, let's just demote the header to a
standard comment block.

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

sound/soc/samsung/pcm.c:127: warning: Function parameter or member 'lock' not described in 's3c_pcm_info'
sound/soc/samsung/pcm.c:127: warning: Function parameter or member 'sclk_per_fs' not described in 's3c_pcm_info'
sound/soc/samsung/pcm.c:127: warning: Function parameter or member 'idleclk' not described in 's3c_pcm_info'
sound/soc/samsung/pcm.c:127: warning: Function parameter or member 'pclk' not described in 's3c_pcm_info'
sound/soc/samsung/pcm.c:127: warning: Function parameter or member 'cclk' not described in 's3c_pcm_info'

Cc: Krzysztof Kozlowski <[email protected]>
Cc: Sangbeom Kim <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Cc: Jaswinder Singh <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/samsung/pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index a5b1a12b34966..3116be4239f59 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -102,7 +102,7 @@
#define S3C_PCM_FIFOSTAT_RXFIFOFULL (0x1 << 1)
#define S3C_PCM_FIFOSTAT_RXFIFOALMSTFULL (0x1 << 0)

-/**
+/*
* struct s3c_pcm_info - S3C PCM Controller information
* @dev: The parent device passed to use from the probe.
* @regs: The pointer to the device register block.
--
2.25.1

2020-07-07 10:22:08

by Lee Jones

[permalink] [raw]
Subject: [PATCH 12/28] ASoC: codecs: ak4458: Remove set but never checked variable 'ret'

Looks as though the result of snd_soc_update_bits() has never been checked.

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

sound/soc/codecs/ak4458.c: In function ‘ak4458_set_dai_mute’:
sound/soc/codecs/ak4458.c:408:16: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Kuninori Morimoto <[email protected]>
Cc: Junichi Wakasugi <[email protected]>
Cc: Mihai Serban <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/codecs/ak4458.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/ak4458.c b/sound/soc/codecs/ak4458.c
index f180cb5dfe4f1..39ae089dcd1d8 100644
--- a/sound/soc/codecs/ak4458.c
+++ b/sound/soc/codecs/ak4458.c
@@ -405,7 +405,7 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
{
struct snd_soc_component *component = dai->component;
struct ak4458_priv *ak4458 = snd_soc_component_get_drvdata(component);
- int nfs, ndt, ret, reg;
+ int nfs, ndt, reg;
int ats;

nfs = ak4458->fs;
@@ -416,14 +416,14 @@ static int ak4458_set_dai_mute(struct snd_soc_dai *dai, int mute)
ndt = att_speed[ats] / (nfs / 1000);

if (mute) {
- ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1);
+ snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 1);
mdelay(ndt);
if (ak4458->mute_gpiod)
gpiod_set_value_cansleep(ak4458->mute_gpiod, 1);
} else {
if (ak4458->mute_gpiod)
gpiod_set_value_cansleep(ak4458->mute_gpiod, 0);
- ret = snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0);
+ snd_soc_component_update_bits(component, AK4458_01_CONTROL2, 0x01, 0);
mdelay(ndt);
}

--
2.25.1

2020-07-07 10:22:18

by Lee Jones

[permalink] [raw]
Subject: [PATCH 09/28] ASoC: fsl: fsl_esai: Fix a bunch of kerneldoc issues

Struct headers require a 'struct $NAME' title, all function parameters
require a description and need to be in the format '@.*:', else the
checker gets confused. Also demote one kerneldoc header where no effort
was made to document any of the function's params.

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

sound/soc/fsl/fsl_esai.c:30: warning: cannot understand function prototype: 'struct fsl_esai_soc_data '
sound/soc/fsl/fsl_esai.c:61: warning: cannot understand function prototype: 'struct fsl_esai '
sound/soc/fsl/fsl_esai.c:170: warning: Function parameter or member 'dai' not described in 'fsl_esai_divisor_cal'
sound/soc/fsl/fsl_esai.c:265: warning: Function parameter or member 'dai' not described in 'fsl_esai_set_dai_sysclk'
sound/soc/fsl/fsl_esai.c:265: warning: Function parameter or member 'clk_id' not described in 'fsl_esai_set_dai_sysclk'
sound/soc/fsl/fsl_esai.c:265: warning: Function parameter or member 'freq' not described in 'fsl_esai_set_dai_sysclk'
sound/soc/fsl/fsl_esai.c:265: warning: Function parameter or member 'dir' not described in 'fsl_esai_set_dai_sysclk'
sound/soc/fsl/fsl_esai.c:265: warning: Excess function parameter 'Parameters' description in 'fsl_esai_set_dai_sysclk'
sound/soc/fsl/fsl_esai.c:364: warning: Function parameter or member 'dai' not described in 'fsl_esai_set_bclk'
sound/soc/fsl/fsl_esai.c:364: warning: Function parameter or member 'tx' not described in 'fsl_esai_set_bclk'
sound/soc/fsl/fsl_esai.c:364: warning: Function parameter or member 'freq' not described in 'fsl_esai_set_bclk'

Cc: Timur Tabi <[email protected]>
Cc: Nicolin Chen <[email protected]>
Cc: Xiubo Li <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
sound/soc/fsl/fsl_esai.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index cbcb70d6f8c83..bb3c405df623c 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -22,7 +22,7 @@
SNDRV_PCM_FMTBIT_S24_LE)

/**
- * fsl_esai_soc_data: soc specific data
+ * struct fsl_esai_soc_data - soc specific data
*
* @imx: for imx platform
* @reset_at_xrun: flags for enable reset operaton
@@ -33,7 +33,7 @@ struct fsl_esai_soc_data {
};

/**
- * fsl_esai: ESAI private data
+ * struct fsl_esai - ESAI private data
*
* @dma_params_rx: DMA parameters for receive channel
* @dma_params_tx: DMA parameters for transmit channel
@@ -160,10 +160,11 @@ static irqreturn_t esai_isr(int irq, void *devid)
* This function is used to calculate the divisors of psr, pm, fp and it is
* supposed to be called in set_dai_sysclk() and set_bclk().
*
+ * @dai: SoC DAI
+ * @tx: current setting is for playback or capture
* @ratio: desired overall ratio for the paticipating dividers
* @usefp: for HCK setting, there is no need to set fp divider
* @fp: bypass other dividers by setting fp directly if fp != 0
- * @tx: current setting is for playback or capture
*/
static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
bool usefp, u32 fp)
@@ -252,11 +253,11 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
/**
* This function mainly configures the clock frequency of MCLK (HCKT/HCKR)
*
- * @Parameters:
- * clk_id: The clock source of HCKT/HCKR
+ * @dai: SoC DAI
+ * @clk_id: The clock source of HCKT/HCKR
* (Input from outside; output from inside, FSYS or EXTAL)
- * freq: The required clock rate of HCKT/HCKR
- * dir: The clock direction of HCKT/HCKR
+ * @freq: The required clock rate of HCKT/HCKR
+ * @dir: The clock direction of HCKT/HCKR
*
* Note: If the direction is input, we do not care about clk_id.
*/
@@ -357,7 +358,7 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
return 0;
}

-/**
+/*
* This function configures the related dividers according to the bclk rate
*/
static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
--
2.25.1

2020-07-07 10:25:30

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 00/28] Clean-up ASoC's W=1 build warnings

On Tue, Jul 07, 2020 at 11:16:14AM +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.

Please coordinate with Pierre (CCed) who is also submitting patches for
this issue, there's a whole bunch in flight already.


Attachments:
(No filename) (348.00 B)
signature.asc (499.00 B)
Download all attachments

2020-07-07 10:38:09

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 00/28] Clean-up ASoC's W=1 build warnings

On Tue, 07 Jul 2020, Mark Brown wrote:

> On Tue, Jul 07, 2020 at 11:16:14AM +0100, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
>
> Please coordinate with Pierre (CCed) who is also submitting patches for
> this issue, there's a whole bunch in flight already.

Well that's frustrating.

Some of these issues have been present for years. It's quite the
coincidence that we both submitted these this week!

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2020-07-07 10:41:32

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 00/28] Clean-up ASoC's W=1 build warnings

On Tue, Jul 07, 2020 at 11:37:35AM +0100, Lee Jones wrote:

> Some of these issues have been present for years. It's quite the
> coincidence that we both submitted these this week!

I'm guessing you've both been inspired by the 0day bot turning W=1
warnings on without having first done a cleanup run :/


Attachments:
(No filename) (312.00 B)
signature.asc (499.00 B)
Download all attachments

2020-07-07 10:49:14

by Peter Ujfalusi

[permalink] [raw]
Subject: Re: [PATCH 21/28] ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w'

Hi Lee,

On 07/07/2020 13.16, Lee Jones wrote:
> 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]
>
> Cc: Peter Ujfalusi <[email protected]>
> Cc: Jarkko Nikula <[email protected]>
> Cc: Samuel Ortiz <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> sound/soc/ti/omap-mcbsp-st.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/ti/omap-mcbsp-st.c b/sound/soc/ti/omap-mcbsp-st.c
> index 5a32b54bbf3bb..643ef7eb68fc8 100644
> --- a/sound/soc/ti/omap-mcbsp-st.c
> +++ b/sound/soc/ti/omap-mcbsp-st.c
> @@ -142,10 +142,9 @@ 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_READ(mcbsp, SSELCR);

The read can be removed at the same time.

> 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

2020-07-07 11:04:37

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 17/28] ASoC: uniphier: aio-core: Fix incorrectly named struct property and remove another

On Tue, Jul 7, 2020 at 7:18 PM Lee Jones <[email protected]> wrote:
>
> Both issues are likely due to bitrot. Let's bring them up-to-date.
>
> Fixes the following W=1 kernel build warning(s):
>
> sound/soc/uniphier/aio-core.c:107: warning: Function parameter or member 'pll_id' not described in 'aio_chip_set_pll'
> sound/soc/uniphier/aio-core.c:107: warning: Excess function parameter 'source' description in 'aio_chip_set_pll'
> sound/soc/uniphier/aio-core.c:279: warning: Excess function parameter 'ch' description in 'aio_port_set_ch'
>
> Cc: Masahiro Yamada <[email protected]>

Reviewed-by: Masahiro Yamada <[email protected]>

but Pierre-Louis Bossart had already sent an equivalent patch.



> Signed-off-by: Lee Jones <[email protected]>
> ---
> 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 9bcba06ba52ea..86eb0915d80ad 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
>


--
Best Regards
Masahiro Yamada

2020-07-07 15:47:49

by Pierre-Louis Bossart

[permalink] [raw]
Subject: Re: [PATCH 00/28] Clean-up ASoC's W=1 build warnings



On 7/7/20 5:40 AM, Mark Brown wrote:
> On Tue, Jul 07, 2020 at 11:37:35AM +0100, Lee Jones wrote:
>
>> Some of these issues have been present for years. It's quite the
>> coincidence that we both submitted these this week!
>
> I'm guessing you've both been inspired by the 0day bot turning W=1
> warnings on without having first done a cleanup run :/

Yep, I was tired of seeing my email polluted with trivial problems last
week, as well as seeing dead code that reviewers miss but tools don't.

Lee, do you mind if I merge your v2 series and my own v2, and then
resubmit what hasn't been merged by Mark?