* [PATCH 1/5] ASoC: hdmi-codec: remove unused definitions
[not found] <20220822184239.169757-1-pierre-louis.bossart@linux.intel.com>
@ 2022-08-22 18:42 ` Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 2/5] ASoC: wcd-mbhc-v2: remove always-true condition Pierre-Louis Bossart
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-08-22 18:42 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Bard Liao, Kai Vehmanen,
Chao Song, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Charles Keepax, Dmitry Osipenko, open list
cppcheck warning:
sound/soc/codecs/hdmi-codec.c:24:16: style: struct member
'hdmi_codec_channel_ma`p_table::map' is never used. [unusedStructMember]
unsigned char map; /* ALSA API channel map position */
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
---
sound/soc/codecs/hdmi-codec.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 5679102de91f8..863e679d2ac11 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -20,10 +20,6 @@
#define HDMI_CODEC_CHMAP_IDX_UNKNOWN -1
-struct hdmi_codec_channel_map_table {
- unsigned char map; /* ALSA API channel map position */
-};
-
/*
* CEA speaker placement for HDMI 1.4:
*
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/5] ASoC: wcd-mbhc-v2: remove always-true condition
[not found] <20220822184239.169757-1-pierre-louis.bossart@linux.intel.com>
2022-08-22 18:42 ` [PATCH 1/5] ASoC: hdmi-codec: remove unused definitions Pierre-Louis Bossart
@ 2022-08-22 18:42 ` Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 3/5] ASoC: wcd9335: " Pierre-Louis Bossart
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-08-22 18:42 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Bard Liao, Kai Vehmanen,
Chao Song, Srinivas Kandagatla, Banajit Goswami, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, open list
cppcheck warning:
sound/soc/codecs/wcd-mbhc-v2.c:1192:26: style: Condition
'cross_conn<0' is always true [knownConditionTrueFalse]
} else if (cross_conn < 0) /* Error */
^
sound/soc/codecs/wcd-mbhc-v2.c:1188:15: note: Assuming that condition
'!cross_conn' is not redundant
} else if (!cross_conn) { /* no cross connection */
^
sound/soc/codecs/wcd-mbhc-v2.c:1192:26: note: Condition 'cross_conn<0'
is always true
} else if (cross_conn < 0) /* Error */
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
---
sound/soc/codecs/wcd-mbhc-v2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wcd-mbhc-v2.c b/sound/soc/codecs/wcd-mbhc-v2.c
index 98baef594bf31..b16a18dbfe7af 100644
--- a/sound/soc/codecs/wcd-mbhc-v2.c
+++ b/sound/soc/codecs/wcd-mbhc-v2.c
@@ -1189,7 +1189,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
pt_gnd_mic_swap_cnt = 0;
plug_type = wcd_mbhc_get_plug_from_adc(mbhc, output_mv);
continue;
- } else if (cross_conn < 0) /* Error */
+ } else /* Error if (cross_conn < 0) */
continue;
if (pt_gnd_mic_swap_cnt == GND_MIC_SWAP_THRESHOLD) {
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/5] ASoC: wcd9335: remove always-true condition
[not found] <20220822184239.169757-1-pierre-louis.bossart@linux.intel.com>
2022-08-22 18:42 ` [PATCH 1/5] ASoC: hdmi-codec: remove unused definitions Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 2/5] ASoC: wcd-mbhc-v2: remove always-true condition Pierre-Louis Bossart
@ 2022-08-22 18:42 ` Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 4/5] ASoC: fsl: fsl-utils: remove useless assignment Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 5/5] ASoC: ti: omap-mcbsp: " Pierre-Louis Bossart
4 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-08-22 18:42 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Bard Liao, Kai Vehmanen,
Chao Song, Srinivas Kandagatla, Banajit Goswami, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, open list
cppcheck warning:
sound/soc/codecs/wcd9335.c:1824:22: style: Condition 'tx_port==13' is
always true [knownConditionTrueFalse]
} else if (tx_port == 13) {
^
sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition
'tx_port==12' is not redundant
if ((tx_port == 12) || (tx_port >= 14)) {
^
sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition
'tx_port>=14' is not redundant
if ((tx_port == 12) || (tx_port >= 14)) {
^
sound/soc/codecs/wcd9335.c:1824:22: note: Condition 'tx_port==13' is
always true
} else if (tx_port == 13) {
^
sound/soc/codecs/wcd9335.c:1845:22: style: Condition 'tx_port==13' is
always true [knownConditionTrueFalse]
} else if (tx_port == 13) {
^
sound/soc/codecs/wcd9335.c:1802:16: note: Assuming that condition
'tx_port==12' is not redundant
if ((tx_port == 12) || (tx_port >= 14)) {
^
sound/soc/codecs/wcd9335.c:1802:35: note: Assuming that condition
'tx_port>=14' is not redundant
if ((tx_port == 12) || (tx_port >= 14)) {
^
sound/soc/codecs/wcd9335.c:1845:22: note: Condition 'tx_port==13' is
always true
} else if (tx_port == 13) {
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
---
sound/soc/codecs/wcd9335.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index beeeb35e80321..5b4d3c5973532 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -1821,12 +1821,10 @@ static int wcd9335_set_decimator_rate(struct snd_soc_dai *dai,
tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG3;
shift = 0;
shift_val = 0x0F;
- } else if (tx_port == 13) {
+ } else /* (tx_port == 13) */ {
tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG3;
shift = 4;
shift_val = 0x03;
- } else {
- return -EINVAL;
}
tx_mux_sel = snd_soc_component_read(comp, tx_port_reg) &
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/5] ASoC: fsl: fsl-utils: remove useless assignment
[not found] <20220822184239.169757-1-pierre-louis.bossart@linux.intel.com>
` (2 preceding siblings ...)
2022-08-22 18:42 ` [PATCH 3/5] ASoC: wcd9335: " Pierre-Louis Bossart
@ 2022-08-22 18:42 ` Pierre-Louis Bossart
2022-08-22 18:42 ` [PATCH 5/5] ASoC: ti: omap-mcbsp: " Pierre-Louis Bossart
4 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-08-22 18:42 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Bard Liao, Kai Vehmanen,
Chao Song, Shengjiu Wang, Xiubo Li, Fabio Estevam, Nicolin Chen,
Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
open list:FREESCALE SOC SOUND DRIVERS, open list
cppcheck warning:
sound/soc/fsl/fsl_utils.c:127:10: style: Variable 'ret' is assigned a
value that is never used. [unreadVariable]
int ret = 0;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
---
sound/soc/fsl/fsl_utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_utils.c b/sound/soc/fsl/fsl_utils.c
index d0fc430f7033d..a5ab27c2f711c 100644
--- a/sound/soc/fsl/fsl_utils.c
+++ b/sound/soc/fsl/fsl_utils.c
@@ -124,7 +124,7 @@ void fsl_asoc_reparent_pll_clocks(struct device *dev, struct clk *clk,
{
struct clk *p, *pll = NULL, *npll = NULL;
bool reparent = false;
- int ret = 0;
+ int ret;
if (!clk || !pll8k_clk || !pll11k_clk)
return;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 5/5] ASoC: ti: omap-mcbsp: remove useless assignment
[not found] <20220822184239.169757-1-pierre-louis.bossart@linux.intel.com>
` (3 preceding siblings ...)
2022-08-22 18:42 ` [PATCH 4/5] ASoC: fsl: fsl-utils: remove useless assignment Pierre-Louis Bossart
@ 2022-08-22 18:42 ` Pierre-Louis Bossart
4 siblings, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2022-08-22 18:42 UTC (permalink / raw)
To: alsa-devel
Cc: tiwai, broonie, Pierre-Louis Bossart, Bard Liao, Kai Vehmanen,
Chao Song, Peter Ujfalusi, Jarkko Nikula, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, open list:OMAP AUDIO SUPPORT,
open list
sound/soc/ti/omap-mcbsp.c:617:10: style: Variable 'ret' is assigned a
value that is never used. [unreadVariable]
int ret = 0;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
---
sound/soc/ti/omap-mcbsp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
index 0b377bb7737fd..7c539a41a6a34 100644
--- a/sound/soc/ti/omap-mcbsp.c
+++ b/sound/soc/ti/omap-mcbsp.c
@@ -614,7 +614,7 @@ static int omap_mcbsp_init(struct platform_device *pdev)
{
struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
struct resource *res;
- int ret = 0;
+ int ret;
spin_lock_init(&mcbsp->lock);
mcbsp->free = true;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread