Re: [PATCH v4 2/2] clk: cs2600: Add Fractional-N clock driver

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

 



Hi Paul,

kernel test robot noticed the following build warnings:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on linus/master v6.13-rc5 next-20241220]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Paul-Handrigan/dt-binding-clock-cs2600-Add-support-for-the-CS2600/20241231-061424
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
patch link:    https://lore.kernel.org/r/20241230221246.3927158-3-paulha%40opensource.cirrus.com
patch subject: [PATCH v4 2/2] clk: cs2600: Add Fractional-N clock driver
config: um-randconfig-r061-20250101 (https://download.01.org/0day-ci/archive/20250101/202501011656.Td8LworZ-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0

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/202501011656.Td8LworZ-lkp@xxxxxxxxx/

cocci warnings: (new ones prefixed by >>)
>> drivers/clk/clk-cs2600.c:300:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.
   drivers/clk/clk-cs2600.c:272:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_ul instead.

vim +300 drivers/clk/clk-cs2600.c

   277	
   278	static int cs2600_set_multi_ratio(struct cs2600 *cs2600, unsigned long rate,
   279					  unsigned long parent_rate,
   280					  unsigned int *ratio)
   281	{
   282		struct regmap *regmap = cs2600->regmap;
   283		u64 product = (u64)rate;
   284	
   285		if ((rate / parent_rate) > CS2600_PLL_MULTIPLY_MAX) {
   286			dev_err(cs2600->dev, "Ratio is too large %lu\n",
   287				rate / parent_rate);
   288			return -EINVAL;
   289		}
   290	
   291		if ((rate / parent_rate) > CS2600_HI_RES_MAX) {
   292			regmap_clear_bits(regmap, CS2600_PLL_CFG3, CS2600_RATIO_CFG);
   293			product <<= CS2600_20_12_SHIFT;
   294	
   295		} else {
   296			regmap_set_bits(regmap, CS2600_PLL_CFG3, CS2600_RATIO_CFG);
   297			product <<= CS2600_12_20_SHIFT;
   298		}
   299	
 > 300		do_div(product, parent_rate);
   301		*ratio = product;
   302	
   303		return 0;
   304	}
   305	

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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux