All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Taniya Das" <tdas@codeaurora.org>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Michael Turquette  " <mturquette@baylibre.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Rajendra Nayak <rnayak@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	Taniya Das <tdas@codeaurora.org>
Subject: Re: [PATCH v1] clk: qcom: clk-rcg2: Add support for duty-cycle for RCG
Date: Thu, 11 Mar 2021 05:05:35 +0800	[thread overview]
Message-ID: <202103110455.Ag26PSp8-lkp@intel.com> (raw)
In-Reply-To: <1615401828-6905-1-git-send-email-tdas@codeaurora.org>

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

Hi Taniya,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on v5.12-rc2 next-20210310]
[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/Taniya-Das/clk-qcom-clk-rcg2-Add-support-for-duty-cycle-for-RCG/20210311-024657
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: powerpc64-randconfig-r035-20210310 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project cd9a69289c7825d54450cb6829fef2c8e0f1963a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/affeb4ce842dbf391537c4e7279ff85e050e1e47
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Taniya-Das/clk-qcom-clk-rcg2-Add-support-for-duty-cycle-for-RCG/20210311-024657
        git checkout affeb4ce842dbf391537c4e7279ff85e050e1e47
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All warnings (new ones prefixed by >>):

>> drivers/clk/qcom/clk-rcg2.c:377:36: warning: variable 'duty_per' is uninitialized when used here [-Wuninitialized]
           d_val = DIV_ROUND_CLOSEST(n_val * duty_per * 2, 100);
                                             ^~~~~~~~
   include/linux/math.h:87:18: note: expanded from macro 'DIV_ROUND_CLOSEST'
           typeof(x) __x = x;                              \
                           ^
   drivers/clk/qcom/clk-rcg2.c:363:64: note: initialize the variable 'duty_per' to silence this warning
           u32 notn_m_val, n_val, m_val, d_val, not2d_val, mask, duty_per;
                                                                         ^
                                                                          = 0
   1 warning generated.


vim +/duty_per +377 drivers/clk/qcom/clk-rcg2.c

   359	
   360	static int clk_rcg2_set_duty_cycle(struct clk_hw *hw, struct clk_duty *duty)
   361	{
   362		struct clk_rcg2 *rcg = to_clk_rcg2(hw);
   363		u32 notn_m_val, n_val, m_val, d_val, not2d_val, mask, duty_per;
   364		int ret;
   365	
   366		if (!rcg->mnd_width)
   367			return 0;
   368	
   369		mask = BIT(rcg->mnd_width) - 1;
   370	
   371		regmap_read(rcg->clkr.regmap, RCG_N_OFFSET(rcg), &notn_m_val);
   372		regmap_read(rcg->clkr.regmap, RCG_M_OFFSET(rcg), &m_val);
   373	
   374		n_val = (~(notn_m_val) + m_val) & mask;
   375	
   376		/* Calculate 2d value */
 > 377		d_val = DIV_ROUND_CLOSEST(n_val * duty_per * 2, 100);
   378	
   379		 /* Check BIT WIDTHS OF 2d. If D is too big reduce Duty cycle. */
   380		if (d_val > mask)
   381			d_val = mask;
   382	
   383		if ((d_val / 2) > (n_val - m_val))
   384			d_val = (n_val - m_val) * 2;
   385		else if ((d_val / 2) < (m_val / 2))
   386			d_val = m_val;
   387	
   388		not2d_val = ~d_val & mask;
   389	
   390		ret = regmap_update_bits(rcg->clkr.regmap, RCG_D_OFFSET(rcg), mask,
   391					 not2d_val);
   392		if (ret)
   393			return ret;
   394	
   395		return update_config(rcg);
   396	}
   397	

---
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: 38998 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1] clk: qcom: clk-rcg2: Add support for duty-cycle for RCG
Date: Thu, 11 Mar 2021 05:05:35 +0800	[thread overview]
Message-ID: <202103110455.Ag26PSp8-lkp@intel.com> (raw)
In-Reply-To: <1615401828-6905-1-git-send-email-tdas@codeaurora.org>

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

Hi Taniya,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on v5.12-rc2 next-20210310]
[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/Taniya-Das/clk-qcom-clk-rcg2-Add-support-for-duty-cycle-for-RCG/20210311-024657
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
config: powerpc64-randconfig-r035-20210310 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project cd9a69289c7825d54450cb6829fef2c8e0f1963a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://github.com/0day-ci/linux/commit/affeb4ce842dbf391537c4e7279ff85e050e1e47
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Taniya-Das/clk-qcom-clk-rcg2-Add-support-for-duty-cycle-for-RCG/20210311-024657
        git checkout affeb4ce842dbf391537c4e7279ff85e050e1e47
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All warnings (new ones prefixed by >>):

>> drivers/clk/qcom/clk-rcg2.c:377:36: warning: variable 'duty_per' is uninitialized when used here [-Wuninitialized]
           d_val = DIV_ROUND_CLOSEST(n_val * duty_per * 2, 100);
                                             ^~~~~~~~
   include/linux/math.h:87:18: note: expanded from macro 'DIV_ROUND_CLOSEST'
           typeof(x) __x = x;                              \
                           ^
   drivers/clk/qcom/clk-rcg2.c:363:64: note: initialize the variable 'duty_per' to silence this warning
           u32 notn_m_val, n_val, m_val, d_val, not2d_val, mask, duty_per;
                                                                         ^
                                                                          = 0
   1 warning generated.


vim +/duty_per +377 drivers/clk/qcom/clk-rcg2.c

   359	
   360	static int clk_rcg2_set_duty_cycle(struct clk_hw *hw, struct clk_duty *duty)
   361	{
   362		struct clk_rcg2 *rcg = to_clk_rcg2(hw);
   363		u32 notn_m_val, n_val, m_val, d_val, not2d_val, mask, duty_per;
   364		int ret;
   365	
   366		if (!rcg->mnd_width)
   367			return 0;
   368	
   369		mask = BIT(rcg->mnd_width) - 1;
   370	
   371		regmap_read(rcg->clkr.regmap, RCG_N_OFFSET(rcg), &notn_m_val);
   372		regmap_read(rcg->clkr.regmap, RCG_M_OFFSET(rcg), &m_val);
   373	
   374		n_val = (~(notn_m_val) + m_val) & mask;
   375	
   376		/* Calculate 2d value */
 > 377		d_val = DIV_ROUND_CLOSEST(n_val * duty_per * 2, 100);
   378	
   379		 /* Check BIT WIDTHS OF 2d. If D is too big reduce Duty cycle. */
   380		if (d_val > mask)
   381			d_val = mask;
   382	
   383		if ((d_val / 2) > (n_val - m_val))
   384			d_val = (n_val - m_val) * 2;
   385		else if ((d_val / 2) < (m_val / 2))
   386			d_val = m_val;
   387	
   388		not2d_val = ~d_val & mask;
   389	
   390		ret = regmap_update_bits(rcg->clkr.regmap, RCG_D_OFFSET(rcg), mask,
   391					 not2d_val);
   392		if (ret)
   393			return ret;
   394	
   395		return update_config(rcg);
   396	}
   397	

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

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

  reply	other threads:[~2021-03-10 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 18:43 [PATCH v1] clk: qcom: clk-rcg2: Add support for duty-cycle for RCG Taniya Das
2021-03-10 21:05 ` kernel test robot [this message]
2021-03-10 21:05   ` kernel test robot

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=202103110455.Ag26PSp8-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=rnayak@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=tdas@codeaurora.org \
    /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 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.