* sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false
@ 2020-11-03 10:57 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-11-03 10:57 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wcd934x.c:1568:6: note: first condition
if (ret)
^
sound/soc/codecs/wcd934x.c:1571:9: note: second condition
return ret;
^
vim +/ret +1571 sound/soc/codecs/wcd934x.c
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1561
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1562 ret = wcd934x_set_prim_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1563 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1564 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1565 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1566 ret = wcd934x_set_mix_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1567 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1568 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1569 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1570
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 @1571 return ret;
^^^^^^^^^^^
Just "return 0;"
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1572 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread* [kbuild] sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false
@ 2020-11-03 10:57 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-11-03 10:57 UTC (permalink / raw)
To: kbuild, Stephen Boyd
Cc: lkp, kbuild-all, linux-kernel, Mark Brown, Arnd Bergmann
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wcd934x.c:1568:6: note: first condition
if (ret)
^
sound/soc/codecs/wcd934x.c:1571:9: note: second condition
return ret;
^
vim +/ret +1571 sound/soc/codecs/wcd934x.c
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1561
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1562 ret = wcd934x_set_prim_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1563 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1564 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1565 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1566 ret = wcd934x_set_mix_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1567 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1568 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1569 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1570
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 @1571 return ret;
^^^^^^^^^^^
Just "return 0;"
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1572 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread* [kbuild] sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false
@ 2020-11-03 10:57 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-11-03 10:57 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wcd934x.c:1568:6: note: first condition
if (ret)
^
sound/soc/codecs/wcd934x.c:1571:9: note: second condition
return ret;
^
vim +/ret +1571 sound/soc/codecs/wcd934x.c
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1561
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1562 ret = wcd934x_set_prim_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1563 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1564 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1565 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1566 ret = wcd934x_set_mix_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1567 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1568 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1569 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1570
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 @1571 return ret;
^^^^^^^^^^^
Just "return 0;"
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1572 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false
@ 2020-11-03 6:21 kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-11-03 6:21 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 3832 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Stephen Boyd <sboyd@kernel.org>
CC: Mark Brown <broonie@kernel.org>
CC: Arnd Bergmann <arnd@arndb.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
date: 6 months ago
:::::: branch date: 8 hours ago
:::::: commit date: 6 months ago
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
sound/soc/codecs/wcd934x.c:1568:6: note: first condition
if (ret)
^
sound/soc/codecs/wcd934x.c:1571:9: note: second condition
return ret;
^
vim +/ret +1571 sound/soc/codecs/wcd934x.c
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1544
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1545 static int wcd934x_set_interpolator_rate(struct snd_soc_dai *dai,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1546 u32 sample_rate)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1547 {
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1548 int rate_val = 0;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1549 int i, ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1550
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1551 for (i = 0; i < ARRAY_SIZE(sr_val_tbl); i++) {
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1552 if (sample_rate == sr_val_tbl[i].sample_rate) {
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1553 rate_val = sr_val_tbl[i].rate_val;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1554 break;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1555 }
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1556 }
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1557 if ((i == ARRAY_SIZE(sr_val_tbl)) || (rate_val < 0)) {
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1558 dev_err(dai->dev, "Unsupported sample rate: %d\n", sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1559 return -EINVAL;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1560 }
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1561
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1562 ret = wcd934x_set_prim_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1563 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1564 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1565 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1566 ret = wcd934x_set_mix_interpolator_rate(dai, (u8)rate_val,
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1567 sample_rate);
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1568 if (ret)
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1569 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1570
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 @1571 return ret;
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1572 }
a61f3b4f476eceb Srinivas Kandagatla 2019-12-19 1573
:::::: The code at line 1571 was first introduced by commit
:::::: a61f3b4f476eceb25274161e5a53a8d18e42610b ASoC: wcd934x: add support to wcd9340/wcd9341 codec
:::::: TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-03 10:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 10:57 sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition 'ret', second condition is always false Dan Carpenter
2020-11-03 10:57 ` [kbuild] " Dan Carpenter
2020-11-03 10:57 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2020-11-03 6:21 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.