Re: [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nuno,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 82f69876ef45ad66c0b114b786c7c6ac0f6a4580]

url:    https://github.com/intel-lab-lkp/linux/commits/Nuno-S-via-B4-Relay/clk-clk-axi-clkgen-fix-fpfd_max-frequency-for-zynq/20250313-231624
base:   82f69876ef45ad66c0b114b786c7c6ac0f6a4580
patch link:    https://lore.kernel.org/r/20250313-dev-axi-clkgen-limits-v2-6-173ae2ad6311%40analog.com
patch subject: [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues
config: riscv-randconfig-002-20250314 (https://download.01.org/0day-ci/archive/20250314/202503141741.UAwRQuuG-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250314/202503141741.UAwRQuuG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503141741.UAwRQuuG-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/clk/clk-axi-clkgen.c: In function 'axi_clkgen_calc_clk_params':
>> drivers/clk/clk-axi-clkgen.c:229:35: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
     229 |                 if ((params->edge == 0 ^ frac_divider == 1) ||
         |                      ~~~~~~~~~~~~~^~~~


vim +229 drivers/clk/clk-axi-clkgen.c

   198	
   199	static void axi_clkgen_calc_clk_params(unsigned int divider,
   200					       unsigned int frac_divider,
   201					       struct axi_clkgen_div_params *params)
   202	{
   203		memset(params, 0x0, sizeof(*params));
   204	
   205		if (divider == 1) {
   206			params->nocount = 1;
   207			return;
   208		}
   209	
   210		if (frac_divider == 0) {
   211			params->high = divider / 2;
   212			params->edge = divider % 2;
   213			params->low = divider - params->high;
   214		} else {
   215			params->frac_en = 1;
   216			params->frac = frac_divider;
   217	
   218			params->high = divider / 2;
   219			params->edge = divider % 2;
   220			params->low = params->high;
   221	
   222			if (params->edge == 0) {
   223				params->high--;
   224				params->frac_wf_r = 1;
   225			}
   226	
   227			if (params->edge == 0 || frac_divider == 1)
   228				params->low--;
 > 229			if ((params->edge == 0 ^ frac_divider == 1) ||
   230			    (divider == 2 && frac_divider == 1))
   231				params->frac_wf_f = 1;
   232	
   233			params->frac_phase = params->edge * 4 + frac_divider / 2;
   234		}
   235	}
   236	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux