Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Radhakrishna Sripada <radhakrishna.sripada@intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [Intel-gfx] [PATCH 1/4] drm/i915/mtl: Squashed Phy Support
Date: Sat, 18 Mar 2023 13:46:19 +0800	[thread overview]
Message-ID: <202303181322.TIgxE4wA-lkp@intel.com> (raw)
In-Reply-To: <20230318005852.2303937-2-radhakrishna.sripada@intel.com>

Hi Radhakrishna,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]

url:    https://github.com/intel-lab-lkp/linux/commits/Radhakrishna-Sripada/drm-i915-mtl-Squashed-Phy-Support/20230318-090025
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
patch link:    https://lore.kernel.org/r/20230318005852.2303937-2-radhakrishna.sripada%40intel.com
patch subject: [Intel-gfx] [PATCH 1/4] drm/i915/mtl: Squashed Phy Support
config: x86_64-randconfig-a016-20230313 (https://download.01.org/0day-ci/archive/20230318/202303181322.TIgxE4wA-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/09eaa092cb75c3ac2a82dbf3b83bff437be2abfa
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Radhakrishna-Sripada/drm-i915-mtl-Squashed-Phy-Support/20230318-090025
        git checkout 09eaa092cb75c3ac2a82dbf3b83bff437be2abfa
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/gpu/drm/i915/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303181322.TIgxE4wA-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_cx0_phy.c:2174:13: warning: variable 'multiplier' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           } else if (pll_state->mplla[6] & C20_MPLLA_FRACEN) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_cx0_phy.c:2184:10: note: uninitialized use occurs here
           tmp2 = (multiplier << 15) + frac_quot + DIV_ROUND_CLOSEST(frac_rem,frac_den);
                   ^~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_cx0_phy.c:2174:9: note: remove the 'if' if its condition is always true
           } else if (pll_state->mplla[6] & C20_MPLLA_FRACEN) {
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_cx0_phy.c:2162:25: note: initialize the variable 'multiplier' to silence this warning
           unsigned int multiplier, refclk = 38400;
                                  ^
                                   = 0
   1 warning generated.


vim +2174 drivers/gpu/drm/i915/display/intel_cx0_phy.c

  2157	
  2158	int intel_c20pll_calc_port_clock(struct intel_encoder *encoder,
  2159					 const struct intel_c20pll_state *pll_state)
  2160	{
  2161		unsigned int frac_quot = 0, frac_rem = 0, frac_den = 1;
  2162		unsigned int multiplier, refclk = 38400;
  2163		unsigned ref_clk_mpllb_div = 0;
  2164		unsigned fb_clk_div4_en = 0;
  2165		unsigned long tmp1, tmp2;
  2166	
  2167		if (pll_state->mpllb[6] & C20_MPLLB_FRACEN) {
  2168			multiplier = REG_FIELD_GET(C20_MULTIPLIER_MASK, pll_state->mpllb[0]);
  2169			ref_clk_mpllb_div = REG_FIELD_GET(C20_REF_CLK_MPLLB_DIV_MASK, pll_state->mpllb[6]);
  2170			fb_clk_div4_en = REG_FIELD_GET(C20_FB_CLK_DIV4_EN, pll_state->mpllb[6]);
  2171			frac_den = pll_state->mpllb[7];
  2172			frac_quot = pll_state->mpllb[8];
  2173			frac_rem = pll_state->mpllb[9];
> 2174		} else if (pll_state->mplla[6] & C20_MPLLA_FRACEN) {
  2175			multiplier = REG_FIELD_GET(C20_MULTIPLIER_MASK, pll_state->mplla[0]);
  2176			ref_clk_mpllb_div = REG_FIELD_GET(C20_REF_CLK_MPLLB_DIV_MASK, pll_state->mpllb[6]);
  2177			fb_clk_div4_en = REG_FIELD_GET(C20_FB_CLK_DIV4_EN, pll_state->mpllb[6]);
  2178			frac_den = pll_state->mpllb[7];
  2179			frac_quot = pll_state->mplla[8];
  2180			frac_rem = pll_state->mplla[9];
  2181		}
  2182	
  2183		tmp1 = DIV_ROUND_CLOSEST(refclk * (1 << (1 + fb_clk_div4_en)), 1 << ref_clk_mpllb_div);
  2184		tmp2 = (multiplier << 15) + frac_quot + DIV_ROUND_CLOSEST(frac_rem,frac_den);
  2185	
  2186		return DIV_ROUND_CLOSEST((tmp1 * tmp2) >> 17, 10);
  2187	}
  2188	

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

  reply	other threads:[~2023-03-18  5:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-18  0:58 [Intel-gfx] [PATCH 0/4] Add MTL DP and HDMI Sequences Radhakrishna Sripada
2023-03-18  0:58 ` [Intel-gfx] [PATCH 1/4] drm/i915/mtl: Squashed Phy Support Radhakrishna Sripada
2023-03-18  5:46   ` kernel test robot [this message]
2023-03-21 12:33   ` kernel test robot
2023-03-18  0:58 ` [Intel-gfx] [PATCH 2/4] drm/i915/mtl/display: Implement DisplayPort sequences Radhakrishna Sripada
2023-03-18  0:58 ` [Intel-gfx] [PATCH 3/4] drm/i915/display/mtl: Fill port width in DDI_BUF_/TRANS_DDI_FUNC_/PORT_BUF_CTL for HDMI Radhakrishna Sripada
2023-03-18  0:58 ` [Intel-gfx] [PATCH 4/4] drm/i915/mtl: Skip pcode qgv restrictions for MTL Radhakrishna Sripada
2023-04-20 15:26   ` Govindapillai, Vinod
2023-03-18  4:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add MTL DP and HDMI Sequences Patchwork
2023-03-18  4:46 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-18  4:46 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2023-03-18  5:01 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-18  6:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=202303181322.TIgxE4wA-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=radhakrishna.sripada@intel.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