All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues
@ 2025-03-16 16:19 kernel test robot
  0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-03-16 16:19 UTC (permalink / raw)
  To: oe-kbuild; +Cc: lkp, Dan Carpenter

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250313-dev-axi-clkgen-limits-v2-6-173ae2ad6311@analog.com>
References: <20250313-dev-axi-clkgen-limits-v2-6-173ae2ad6311@analog.com>
TO: "Nuno Sá via B4 Relay" <devnull+nuno.sa.analog.com@kernel.org>
TO: linux-clk@vger.kernel.org
TO: linux-fpga@vger.kernel.org
CC: Stephen Boyd <sboyd@kernel.org>
CC: Michael Turquette <mturquette@baylibre.com>
CC: Moritz Fischer <mdf@kernel.org>
CC: Wu Hao <hao.wu@intel.com>
CC: Xu Yilun <yilun.xu@intel.com>
CC: Tom Rix <trix@redhat.com>

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
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: riscv-randconfig-r073-20250316 (https://download.01.org/0day-ci/archive/20250316/202503162319.83BPHA2N-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 14.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@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202503162319.83BPHA2N-lkp@intel.com/

smatch warnings:
drivers/clk/clk-axi-clkgen.c:229 axi_clkgen_calc_clk_params() warn: add some parenthesis here?

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

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH v2 0/6] clk: clk-axi-clkgen: improvements and some fixes
@ 2025-03-13 15:14 Nuno Sá
  2025-03-13 15:14   ` Nuno Sá via B4 Relay
  0 siblings, 1 reply; 6+ messages in thread
From: Nuno Sá @ 2025-03-13 15:14 UTC (permalink / raw)
  To: linux-clk, linux-fpga
  Cc: Stephen Boyd, Michael Turquette, Moritz Fischer, Wu Hao, Xu Yilun,
	Tom Rix

This series starts with a small fix and then a bunch of small
improvements. The main change though is to allow detecting of
struct axi_clkgen_limits during probe().

---
Changes in v2:
- Patch 3
   * Rename adi_axi_fgpa_technology -> adi_axi_fpga_technology.

- Link to v1: https://lore.kernel.org/r/20250219-dev-axi-clkgen-limits-v1-0-26f7ef14cd9c@analog.com

---
Nuno Sá (6):
      clk: clk-axi-clkgen: fix fpfd_max frequency for zynq
      clk: clk-axi-clkgen: make sure to include mod_devicetable.h
      include: fpga: adi-axi-common: add new helper macros
      clk: clk-axi-clkgen: detect axi_clkgen_limits at runtime
      clk: clk-axi-clkgen move to min/max()
      clk: clk-axi-clkgen: fix coding style issues

 drivers/clk/clk-axi-clkgen.c        | 149 +++++++++++++++++++++++++-----------
 include/linux/fpga/adi-axi-common.h |  35 +++++++++
 2 files changed, 141 insertions(+), 43 deletions(-)
---
base-commit: 82f69876ef45ad66c0b114b786c7c6ac0f6a4580
change-id: 20250218-dev-axi-clkgen-limits-63fb0c5ec38b
--

Thanks!
- Nuno Sá


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-17 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-16 16:19 [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2025-03-13 15:14 [PATCH v2 0/6] clk: clk-axi-clkgen: improvements and some fixes Nuno Sá
2025-03-13 15:14 ` [PATCH v2 6/6] clk: clk-axi-clkgen: fix coding style issues Nuno Sá
2025-03-13 15:14   ` Nuno Sá via B4 Relay
2025-03-14  9:23   ` kernel test robot
2025-03-17  5:26   ` Dan Carpenter
2025-03-17 16:47     ` Nuno Sá

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.