devicetree.vger.kernel.org archive mirror
 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 v2 4/6] regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators
Date: Sun, 6 Jul 2025 14:22:01 +0800	[thread overview]
Message-ID: <202507061437.VKBqvJPn-lkp@intel.com> (raw)
In-Reply-To: <20250624073548.29732-5-angelogioacchino.delregno@collabora.com>

Hi AngeloGioacchino,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on linus/master v6.16-rc4 next-20250704]
[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/20250624-154048
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link:    https://lore.kernel.org/r/20250624073548.29732-5-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v2 4/6] regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250706/202507061437.VKBqvJPn-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250706/202507061437.VKBqvJPn-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/202507061437.VKBqvJPn-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/regulator/mt6363-regulator.c:375:14: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     375 |                 } else if (cur_mode == REGULATOR_MODE_IDLE) {
         |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/mt6363-regulator.c:388:6: note: uninitialized use occurs here
     388 |         if (ret) {
         |             ^~~
   drivers/regulator/mt6363-regulator.c:375:10: note: remove the 'if' if its condition is always true
     375 |                 } else if (cur_mode == REGULATOR_MODE_IDLE) {
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/regulator/mt6363-regulator.c:347:19: note: initialize the variable 'ret' to silence this warning
     347 |         int cur_mode, ret;
         |                          ^
         |                           = 0
   drivers/regulator/mt6363-regulator.c:351:28: warning: variable 'regmap' is uninitialized when used here [-Wuninitialized]
     351 |                 ret = mt6363_buck_unlock(regmap, true);
         |                                          ^~~~~~
   drivers/regulator/mt6363-regulator.c:346:23: note: initialize the variable 'regmap' to silence this warning
     346 |         struct regmap *regmap;
         |                              ^
         |                               = NULL
>> drivers/regulator/mt6363-regulator.c:455:9: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     455 |                 sel = FIELD_PREP(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
         |                       ^
>> drivers/regulator/mt6363-regulator.c:487:9: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     487 |                 ret = FIELD_GET(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
         |                       ^
   2 warnings and 2 errors generated.


vim +/FIELD_PREP +455 drivers/regulator/mt6363-regulator.c

   430	
   431	static int mt6363_vemc_set_voltage_sel(struct regulator_dev *rdev, unsigned int sel)
   432	{
   433		const u16 tma_unlock_key = MT6363_TMA_UNLOCK_VALUE;
   434		struct regmap *regmap = rdev->regmap;
   435		unsigned int val;
   436		u16 mask;
   437		int ret;
   438	
   439		ret = regmap_read(rdev->regmap, MT6363_TOP_TRAP, &val);
   440		if (ret)
   441			return ret;
   442	
   443		if (val > 1)
   444			return -EINVAL;
   445	
   446		/* Unlock TMA for writing */
   447		ret = regmap_bulk_write(rdev->regmap, MT6363_TOP_TMA_KEY_L,
   448					&tma_unlock_key, sizeof(tma_unlock_key));
   449		if (ret)
   450			return ret;
   451	
   452		/* If HW trapping value is 1, use VEMC_VOSEL_1 instead of VEMC_VOSEL_0 */
   453		if (val == 1) {
   454			mask = MT6363_RG_VEMC_VOSEL_1_MASK;
 > 455			sel = FIELD_PREP(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
   456		} else {
   457			mask = rdev->desc->vsel_mask;
   458		}
   459	
   460		/* Function must return the result of this write operation */
   461		ret = regmap_update_bits(regmap, rdev->desc->vsel_reg, mask, sel);
   462	
   463		/* Unconditionally re-lock TMA */
   464		val = 0;
   465		regmap_bulk_write(rdev->regmap, MT6363_TOP_TMA_KEY_L, &val, 2);
   466	
   467		return ret;
   468	}
   469	
   470	static int mt6363_vemc_get_voltage_sel(struct regulator_dev *rdev)
   471	{
   472		unsigned int sel, trap;
   473		int ret;
   474	
   475		ret = regmap_read(rdev->regmap, rdev->desc->vsel_reg, &sel);
   476		if (ret)
   477			return ret;
   478	
   479		ret = regmap_read(rdev->regmap, MT6363_TOP_TRAP, &trap);
   480		if (ret)
   481			return ret;
   482	
   483		/* If HW trapping value is 1, use VEMC_VOSEL_1 instead of VEMC_VOSEL_0 */
   484		if (trap > 1)
   485			return -EINVAL;
   486		else if (trap == 1)
 > 487			ret = FIELD_GET(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
   488		else
   489			ret = sel & rdev->desc->vsel_mask;
   490	
   491		return ret;
   492	}
   493	

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

  parent reply	other threads:[~2025-07-06  6:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-24  7:35 [PATCH v2 0/6] regulator: Add support for MediaTek MT6316/6363/6373 PMICs AngeloGioacchino Del Regno
2025-06-24  7:35 ` [PATCH v2 1/6] dt-bindings: regulator: Document MediaTek MT6316 PMIC Regulators AngeloGioacchino Del Regno
2025-06-27  8:16   ` Krzysztof Kozlowski
2025-06-24  7:35 ` [PATCH v2 2/6] regulator: Add support for MediaTek MT6316 SPMI " AngeloGioacchino Del Regno
2025-06-25  5:06   ` Chen-Yu Tsai
2025-06-25  8:43     ` AngeloGioacchino Del Regno
2025-06-24  7:35 ` [PATCH v2 3/6] dt-bindings: regulator: Document MediaTek MT6363 " AngeloGioacchino Del Regno
2025-06-27  8:18   ` Krzysztof Kozlowski
2025-06-30  3:25     ` Chen-Yu Tsai
2025-06-30  7:52       ` AngeloGioacchino Del Regno
2025-06-30  8:34         ` Chen-Yu Tsai
2025-06-24  7:35 ` [PATCH v2 4/6] regulator: Add support for MediaTek MT6363 SPMI " AngeloGioacchino Del Regno
2025-06-27 19:42   ` Dan Carpenter
2025-07-06  6:22   ` kernel test robot [this message]
2025-06-24  7:35 ` [PATCH v2 5/6] dt-bindings: regulator: Document MediaTek MT6373 " AngeloGioacchino Del Regno
2025-06-27  8:21   ` Krzysztof Kozlowski
2025-06-24  7:35 ` [PATCH v2 6/6] regulator: Add support for MediaTek MT6373 SPMI " AngeloGioacchino Del Regno

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=202507061437.VKBqvJPn-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;
as well as URLs for NNTP newsgroup(s).