devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Alain Volmat <alain.volmat@foss.st.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Valentin Caron <valentin.caron@foss.st.com>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] i2c: stm32f7: add support for stm32mp25 soc
Date: Thu, 30 Nov 2023 07:09:03 +0800	[thread overview]
Message-ID: <202311300357.qiYAoEvz-lkp@intel.com> (raw)
In-Reply-To: <20231129125920.1702497-5-alain.volmat@foss.st.com>

Hi Alain,

kernel test robot noticed the following build warnings:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on atorgue-stm32/stm32-next robh/for-next linus/master v6.7-rc3 next-20231129]
[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/Alain-Volmat/i2c-stm32f7-perform-most-of-irq-job-in-threaded-handler/20231129-210806
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link:    https://lore.kernel.org/r/20231129125920.1702497-5-alain.volmat%40foss.st.com
patch subject: [PATCH 4/7] i2c: stm32f7: add support for stm32mp25 soc
config: arm-defconfig (https://download.01.org/0day-ci/archive/20231130/202311300357.qiYAoEvz-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311300357.qiYAoEvz-lkp@intel.com/reproduce)

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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311300357.qiYAoEvz-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-stm32f7.c:2029:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (i2c_dev->setup.fmp_cr1_bit) {
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-stm32f7.c:2044:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/i2c/busses/i2c-stm32f7.c:2029:2: note: remove the 'if' if its condition is always false
           if (i2c_dev->setup.fmp_cr1_bit) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-stm32f7.c:2022:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +2029 drivers/i2c/busses/i2c-stm32f7.c

  2018	
  2019	static int stm32f7_i2c_write_fm_plus_bits(struct stm32f7_i2c_dev *i2c_dev,
  2020						  bool enable)
  2021	{
  2022		int ret;
  2023	
  2024		if (i2c_dev->bus_rate <= I2C_MAX_FAST_MODE_FREQ ||
  2025		    (!i2c_dev->setup.fmp_cr1_bit && IS_ERR_OR_NULL(i2c_dev->regmap)))
  2026			/* Optional */
  2027			return 0;
  2028	
> 2029		if (i2c_dev->setup.fmp_cr1_bit) {
  2030			if (enable)
  2031				stm32f7_i2c_set_bits(i2c_dev->base + STM32F7_I2C_CR1, STM32_I2C_CR1_FMP);
  2032			else
  2033				stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1, STM32_I2C_CR1_FMP);
  2034		} else {
  2035			if (i2c_dev->fmp_sreg == i2c_dev->fmp_creg)
  2036				ret = regmap_update_bits(i2c_dev->regmap, i2c_dev->fmp_sreg,
  2037							 i2c_dev->fmp_mask, enable ? i2c_dev->fmp_mask : 0);
  2038			else
  2039				ret = regmap_write(i2c_dev->regmap,
  2040						   enable ? i2c_dev->fmp_sreg : i2c_dev->fmp_creg,
  2041						   i2c_dev->fmp_mask);
  2042		}
  2043	
  2044		return ret;
  2045	}
  2046	

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

  reply	other threads:[~2023-11-29 23:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 12:59 [PATCH 0/7] i2c: stm32f7: enhancements and support for stm32mp25 Alain Volmat
2023-11-29 12:59 ` [PATCH 1/7] i2c: stm32f7: perform most of irq job in threaded handler Alain Volmat
2023-11-29 12:59 ` [PATCH 2/7] i2c: stm32f7: simplify status messages in case of errors Alain Volmat
2023-11-29 12:59 ` [PATCH 3/7] dt-bindings: i2c: document st,stm32mp25-i2c compatible Alain Volmat
2023-11-29 14:23   ` Conor Dooley
2023-12-06 14:56   ` Rob Herring
2023-11-29 12:59 ` [PATCH 4/7] i2c: stm32f7: add support for stm32mp25 soc Alain Volmat
2023-11-29 23:09   ` kernel test robot [this message]
2023-11-29 12:59 ` [PATCH 5/7] arm64: dts: st: add all 8 i2c nodes on stm32mp251 Alain Volmat
2023-12-05 13:53   ` kernel test robot
2023-11-29 12:59 ` [PATCH 6/7] arm64: dts: st: add i2c2/i2c8 pins for stm32mp25 Alain Volmat
2023-11-29 12:59 ` [PATCH 7/7] arm64: dts: st: add i2c2 / i2c8 properties on stm32mp257f-ev1 Alain Volmat

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=202311300357.qiYAoEvz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andi.shyti@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=llvm@lists.linux.dev \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pierre-yves.mordret@foss.st.com \
    --cc=robh+dt@kernel.org \
    --cc=valentin.caron@foss.st.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;
as well as URLs for NNTP newsgroup(s).