mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	broonie@kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	lgirdwood@gmail.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH v1 2/6] regulator: Add support for MediaTek MT6316 SPMI PMIC Regulators
Date: Tue, 24 Jun 2025 11:56:58 +0800	[thread overview]
Message-ID: <202506241156.TWxCzjh3-lkp@intel.com> (raw)
In-Reply-To: <20250623120016.108732-3-angelogioacchino.delregno@collabora.com>

Hi AngeloGioacchino,

kernel test robot noticed the following build warnings:

[auto build test WARNING on broonie-regulator/for-next]
[also build test WARNING on linus/master v6.16-rc3 next-20250623]
[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/AngeloGioacchino-Del-Regno/dt-bindings-regulator-Document-MediaTek-MT6316-PMIC-Regulators/20250623-200316
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link:    https://lore.kernel.org/r/20250623120016.108732-3-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v1 2/6] regulator: Add support for MediaTek MT6316 SPMI PMIC Regulators
config: i386-buildonly-randconfig-004-20250624 (https://download.01.org/0day-ci/archive/20250624/202506241156.TWxCzjh3-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250624/202506241156.TWxCzjh3-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/202506241156.TWxCzjh3-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/regulator/mt6316-regulator.c:205:14: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     205 |                 } else if (cur_mode == REGULATOR_MODE_IDLE) {
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/mt6316-regulator.c:218:6: note: uninitialized use occurs here
     218 |         if (ret) {
         |             ^~~
   drivers/regulator/mt6316-regulator.c:205:10: note: remove the 'if' if its condition is always true
     205 |                 } else if (cur_mode == REGULATOR_MODE_IDLE) {
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/mt6316-regulator.c:189:19: note: initialize the variable 'ret' to silence this warning
     189 |         int cur_mode, ret;
         |                          ^
         |                           = 0
>> drivers/regulator/mt6316-regulator.c:193:25: warning: variable 'regmap' is uninitialized when used here [-Wuninitialized]
     193 |                 ret = regmap_set_bits(regmap, info->modeset_reg, info->modeset_mask);
         |                                       ^~~~~~
   drivers/regulator/mt6316-regulator.c:188:23: note: initialize the variable 'regmap' to silence this warning
     188 |         struct regmap *regmap;
         |                              ^
         |                               = NULL
   2 warnings generated.


vim +205 drivers/regulator/mt6316-regulator.c

   183	
   184	static int mt6316_regulator_set_mode(struct regulator_dev *rdev,
   185					     unsigned int mode)
   186	{
   187		struct mt6316_regulator_info *info = rdev_get_drvdata(rdev);
   188		struct regmap *regmap;
   189		int cur_mode, ret;
   190	
   191		switch (mode) {
   192		case REGULATOR_MODE_FAST:
 > 193			ret = regmap_set_bits(regmap, info->modeset_reg, info->modeset_mask);
   194			break;
   195		case REGULATOR_MODE_NORMAL:
   196			cur_mode = mt6316_regulator_get_mode(rdev);
   197			if (cur_mode < 0) {
   198				ret = cur_mode;
   199				break;
   200			}
   201	
   202			if (cur_mode == REGULATOR_MODE_FAST) {
   203				ret = regmap_clear_bits(regmap, info->modeset_reg, info->modeset_mask);
   204				break;
 > 205			} else if (cur_mode == REGULATOR_MODE_IDLE) {
   206				ret = regmap_clear_bits(regmap, info->lp_mode_reg, info->lp_mode_mask);
   207				if (ret == 0)
   208					usleep_range(100, 200);
   209			}
   210			break;
   211		case REGULATOR_MODE_IDLE:
   212			ret = regmap_set_bits(regmap, info->lp_mode_reg, info->lp_mode_mask);
   213			break;
   214		default:
   215			ret = -EINVAL;
   216		}
   217	
   218		if (ret) {
   219			dev_err(&rdev->dev, "Failed to set mode %u: %d\n", mode, ret);
   220			return ret;
   221		}
   222	
   223		return 0;
   224	}
   225	

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

  reply	other threads:[~2025-06-24  3:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 12:00 [PATCH v1 0/6] regulator: Add support for MediaTek MT6316/6363/6373 PMICs AngeloGioacchino Del Regno
2025-06-23 12:00 ` [PATCH v1 1/6] dt-bindings: regulator: Document MediaTek MT6316 PMIC Regulators AngeloGioacchino Del Regno
2025-06-23 12:00 ` [PATCH v1 2/6] regulator: Add support for MediaTek MT6316 SPMI " AngeloGioacchino Del Regno
2025-06-24  3:56   ` kernel test robot [this message]
2025-06-23 12:00 ` [PATCH v1 3/6] dt-bindings: regulator: Document MediaTek MT6363 " AngeloGioacchino Del Regno
2025-06-23 12:00 ` [PATCH v1 4/6] regulator: Add support for MediaTek MT6363 SPMI " AngeloGioacchino Del Regno
2025-06-23 12:00 ` [PATCH v1 5/6] dt-bindings: regulator: Document MediaTek MT6373 " AngeloGioacchino Del Regno
2025-06-23 12:00 ` [PATCH v1 6/6] regulator: Add support for MediaTek MT6373 SPMI " AngeloGioacchino Del Regno
2025-06-24 15:11 ` [PATCH v1 0/6] regulator: Add support for MediaTek MT6316/6363/6373 PMICs Nícolas F. R. A. Prado

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=202506241156.TWxCzjh3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=matthias.bgg@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®