CC: [email protected]
CC: [email protected]
TO: Jean Delvare <[email protected]>
CC: Stephen Boyd <[email protected]>
CC: Linus Walleij <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   6f513529296fd4f696afb4354c46508abe646541
commit: 323fd5955f844d1b6acf1a1af488da460f657ff2 clk: versatile: Rename ICST to 
CLK_ICST
date:   8 weeks ago
:::::: branch date: 18 hours ago
:::::: commit date: 8 weeks ago
compiler: aarch64-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/clk/versatile/clk-icst.c:277:24: warning: Redundant condition: If 
>> 'rate <= 25000000', the comparison 'rate < 29000000' is always true. 
>> [redundantCondition]
     if (rate <= 25000000 || rate < 29000000)
                          ^

vim +277 drivers/clk/versatile/clk-icst.c

91b87a4795c42b Linus Walleij 2012-06-11  236  
91b87a4795c42b Linus Walleij 2012-06-11  237  static long 
icst_round_rate(struct clk_hw *hw, unsigned long rate,
91b87a4795c42b Linus Walleij 2012-06-11  238                        unsigned 
long *prate)
91b87a4795c42b Linus Walleij 2012-06-11  239  {
91b87a4795c42b Linus Walleij 2012-06-11  240    struct clk_icst *icst = 
to_icst(hw);
91b87a4795c42b Linus Walleij 2012-06-11  241    struct icst_vco vco;
91b87a4795c42b Linus Walleij 2012-06-11  242  
5e23c593057520 Linus Walleij 2016-08-22  243    if (icst->ctype == 
ICST_INTEGRATOR_AP_CM ||
5e23c593057520 Linus Walleij 2016-08-22  244        icst->ctype == 
ICST_INTEGRATOR_CP_CM_CORE) {
5e23c593057520 Linus Walleij 2016-08-22  245            if (rate <= 12000000)
5e23c593057520 Linus Walleij 2016-08-22  246                    return 12000000;
5e23c593057520 Linus Walleij 2016-08-22  247            if (rate >= 160000000)
5e23c593057520 Linus Walleij 2016-08-22  248                    return 
160000000;
5e23c593057520 Linus Walleij 2016-08-22  249            /* Slam to closest 
megahertz */
5e23c593057520 Linus Walleij 2016-08-22  250            return 
DIV_ROUND_CLOSEST(rate, 1000000) * 1000000;
5e23c593057520 Linus Walleij 2016-08-22  251    }
5e23c593057520 Linus Walleij 2016-08-22  252  
5e23c593057520 Linus Walleij 2016-08-22  253    if (icst->ctype == 
ICST_INTEGRATOR_CP_CM_MEM) {
5e23c593057520 Linus Walleij 2016-08-22  254            if (rate <= 6000000)
5e23c593057520 Linus Walleij 2016-08-22  255                    return 6000000;
5e23c593057520 Linus Walleij 2016-08-22  256            if (rate >= 66000000)
5e23c593057520 Linus Walleij 2016-08-22  257                    return 66000000;
5e23c593057520 Linus Walleij 2016-08-22  258            /* Slam to closest 0.5 
megahertz */
5e23c593057520 Linus Walleij 2016-08-22  259            return 
DIV_ROUND_CLOSEST(rate, 500000) * 500000;
5e23c593057520 Linus Walleij 2016-08-22  260    }
5e23c593057520 Linus Walleij 2016-08-22  261  
fa62e10d2613b9 Linus Walleij 2016-08-27  262    if (icst->ctype == 
ICST_INTEGRATOR_AP_SYS) {
fa62e10d2613b9 Linus Walleij 2016-08-27  263            /* Divides between 3 
and 50 MHz in steps of 0.25 MHz */
fa62e10d2613b9 Linus Walleij 2016-08-27  264            if (rate <= 3000000)
fa62e10d2613b9 Linus Walleij 2016-08-27  265                    return 3000000;
fa62e10d2613b9 Linus Walleij 2016-08-27  266            if (rate >= 50000000)
fa62e10d2613b9 Linus Walleij 2016-08-27  267                    return 5000000;
fa62e10d2613b9 Linus Walleij 2016-08-27  268            /* Slam to closest 0.25 
MHz */
fa62e10d2613b9 Linus Walleij 2016-08-27  269            return 
DIV_ROUND_CLOSEST(rate, 250000) * 250000;
fa62e10d2613b9 Linus Walleij 2016-08-27  270    }
fa62e10d2613b9 Linus Walleij 2016-08-27  271  
fa62e10d2613b9 Linus Walleij 2016-08-27  272    if (icst->ctype == 
ICST_INTEGRATOR_AP_PCI) {
fa62e10d2613b9 Linus Walleij 2016-08-27  273            /*
fa62e10d2613b9 Linus Walleij 2016-08-27  274             * If we're below or 
less than halfway from 25 to 33 MHz
fa62e10d2613b9 Linus Walleij 2016-08-27  275             * select 25 MHz
fa62e10d2613b9 Linus Walleij 2016-08-27  276             */
fa62e10d2613b9 Linus Walleij 2016-08-27 @277            if (rate <= 25000000 || 
rate < 29000000)
fa62e10d2613b9 Linus Walleij 2016-08-27  278                    return 25000000;
fa62e10d2613b9 Linus Walleij 2016-08-27  279            /* Else just return the 
default frequency */
fa62e10d2613b9 Linus Walleij 2016-08-27  280            return 33000000;
fa62e10d2613b9 Linus Walleij 2016-08-27  281    }
fa62e10d2613b9 Linus Walleij 2016-08-27  282  
91b87a4795c42b Linus Walleij 2012-06-11  283    vco = 
icst_hz_to_vco(icst->params, rate);
91b87a4795c42b Linus Walleij 2012-06-11  284    return icst_hz(icst->params, 
vco);
91b87a4795c42b Linus Walleij 2012-06-11  285  }
91b87a4795c42b Linus Walleij 2012-06-11  286  

:::::: The code at line 277 was first introduced by commit
:::::: fa62e10d2613b9e9edbe944b890644b30e9d4ed7 clk: versatile/icst: support 
for AP baseboard clocks

:::::: TO: Linus Walleij <[email protected]>
:::::: CC: Stephen Boyd <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to