public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "周琰杰 (Zhou Yanjie)" <zhouyanjie@wanyeetech.com>,
	mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org
Cc: kbuild-all@lists.01.org, linux-mips@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, paul@crapouillou.net,
	dongsheng.qiu@ingenic.com, aric.pzqi@ingenic.com
Subject: Re: [PATCH v5 02/11] clk: Ingenic: Adjust cgu code to make it compatible with I2S PLL.
Date: Tue, 29 Jun 2021 06:32:21 +0800	[thread overview]
Message-ID: <202106290639.OGYP7Ulm-lkp@intel.com> (raw)
In-Reply-To: <1624904444-2618-3-git-send-email-zhouyanjie@wanyeetech.com>

[-- Attachment #1: Type: text/plain, Size: 2789 bytes --]

Hi "周琰杰,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on robh/for-next v5.13 next-20210628]
[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]

url:    https://github.com/0day-ci/linux/commits/Zhou-Yanjie/Add-new-clocks-and-fix-bugs-for-Ingenic-SoCs/20210629-022157
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: x86_64-randconfig-m001-20210628 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

smatch warnings:
drivers/clk/ingenic/cgu.c:309 ingenic_pll_set_rate() warn: always true condition '(pll_info->stable_bit >= 0) => (0-255 >= 0)'

vim +309 drivers/clk/ingenic/cgu.c

   272	
   273	static int
   274	ingenic_pll_set_rate(struct clk_hw *hw, unsigned long req_rate,
   275			     unsigned long parent_rate)
   276	{
   277		struct ingenic_clk *ingenic_clk = to_ingenic_clk(hw);
   278		struct ingenic_cgu *cgu = ingenic_clk->cgu;
   279		const struct ingenic_cgu_clk_info *clk_info = to_clk_info(ingenic_clk);
   280		const struct ingenic_cgu_pll_info *pll_info = &clk_info->pll;
   281		unsigned long rate, flags;
   282		unsigned int m, n, od;
   283		int ret = 0;
   284		u32 ctl;
   285	
   286		rate = ingenic_pll_calc(clk_info, req_rate, parent_rate,
   287				       &m, &n, &od);
   288		if (rate != req_rate)
   289			pr_info("ingenic-cgu: request '%s' rate %luHz, actual %luHz\n",
   290				clk_info->name, req_rate, rate);
   291	
   292		spin_lock_irqsave(&cgu->lock, flags);
   293		ctl = readl(cgu->base + pll_info->reg);
   294	
   295		ctl &= ~(GENMASK(pll_info->m_bits - 1, 0) << pll_info->m_shift);
   296		ctl |= (m - pll_info->m_offset) << pll_info->m_shift;
   297	
   298		ctl &= ~(GENMASK(pll_info->n_bits - 1, 0) << pll_info->n_shift);
   299		ctl |= (n - pll_info->n_offset) << pll_info->n_shift;
   300	
   301		if (pll_info->od_encoding) {
   302			ctl &= ~(GENMASK(pll_info->od_bits - 1, 0) << pll_info->od_shift);
   303			ctl |= pll_info->od_encoding[od - 1] << pll_info->od_shift;
   304		}
   305	
   306		writel(ctl, cgu->base + pll_info->reg);
   307	
   308		/* If the PLL is enabled, verify that it's stable */
 > 309		if ((pll_info->stable_bit >= 0) && (ctl & BIT(pll_info->enable_bit)))
   310			ret = ingenic_pll_check_stable(cgu, pll_info);
   311	
   312		spin_unlock_irqrestore(&cgu->lock, flags);
   313	
   314		return ret;
   315	}
   316	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37173 bytes --]

  reply	other threads:[~2021-06-28 22:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 18:20 [PATCH v5 00/11] Add new clocks and fix bugs for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 01/11] clk: JZ4780: Add function for disable the second core 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 02/11] clk: Ingenic: Adjust cgu code to make it compatible with I2S PLL 周琰杰 (Zhou Yanjie)
2021-06-28 22:32   ` kernel test robot [this message]
2021-06-28 18:20 ` [PATCH v5 03/11] dt-bindings: clock: Add missing clocks for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 04/11] clk: Ingenic: Fix problem of MAC clock in Ingenic X1000 and X1830 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 05/11] clk: Ingenic: Add missing clocks for Ingenic SoCs 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 06/11] clk: Ingenic: Clean up and reformat the code 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 07/11] dt-bindings: clock: Add documentation for JZ4775 and X2000 bindings 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 08/11] dt-bindings: clock: Add JZ4775 clock bindings 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 09/11] dt-bindings: clock: Add X2000 " 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 10/11] clk: Ingenic: Add CGU driver for JZ4775 周琰杰 (Zhou Yanjie)
2021-06-28 18:20 ` [PATCH v5 11/11] clk: Ingenic: Add CGU driver for X2000 周琰杰 (Zhou Yanjie)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202106290639.OGYP7Ulm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=aric.pzqi@ingenic.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dongsheng.qiu@ingenic.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=paul@crapouillou.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=zhouyanjie@wanyeetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox