Skip to content

Commit 0208b5a

Browse files
committed
ASoC: wcd9335: remove redundant tests
cppcheck warning: sound/soc/codecs/wcd9335.c:1810:23: style: Condition 'tx_port>=4' is always true [knownConditionTrueFalse] } else if ((tx_port >= 4) && (tx_port < 8)) { ^ sound/soc/codecs/wcd9335.c:1806:15: note: Assuming that condition 'tx_port<4' is not redundant if (tx_port < 4) { ^ sound/soc/codecs/wcd9335.c:1810:23: note: Condition 'tx_port>=4' is always true } else if ((tx_port >= 4) && (tx_port < 8)) { ^ Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent e84fbd9 commit 0208b5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/codecs/wcd9335.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,11 +1807,11 @@ static int wcd9335_set_decimator_rate(struct snd_soc_dai *dai,
18071807
tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG0;
18081808
shift = (tx_port << 1);
18091809
shift_val = 0x03;
1810-
} else if ((tx_port >= 4) && (tx_port < 8)) {
1810+
} else if (tx_port < 8) {
18111811
tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG1;
18121812
shift = ((tx_port - 4) << 1);
18131813
shift_val = 0x03;
1814-
} else if ((tx_port >= 8) && (tx_port < 11)) {
1814+
} else if (tx_port < 11) {
18151815
tx_port_reg = WCD9335_CDC_IF_ROUTER_TX_MUX_CFG2;
18161816
shift = ((tx_port - 8) << 1);
18171817
shift_val = 0x03;

0 commit comments

Comments
 (0)