lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202507150934.VLFQsCyK-lkp@intel.com>
Date: Tue, 15 Jul 2025 10:16:17 +0800
From: kernel test robot <lkp@...el.com>
To: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	linux-mediatek@...ts.infradead.org
Cc: oe-kbuild-all@...ts.linux.dev, lee@...nel.org, robh@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org, matthias.bgg@...il.com,
	angelogioacchino.delregno@...labora.com, lgirdwood@...il.com,
	broonie@...nel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	kernel@...labora.com
Subject: Re: [PATCH v2 4/8] regulator: Add support for MediaTek MT6363 SPMI
 PMIC Regulators

Hi AngeloGioacchino,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on lee-mfd/for-mfd-next lee-mfd/for-mfd-fixes lee-leds/for-leds-next linus/master v6.16-rc6 next-20250714]
[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/20250707-214911
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link:    https://lore.kernel.org/r/20250707134451.154346-5-angelogioacchino.delregno%40collabora.com
patch subject: [PATCH v2 4/8] regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators
config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20250715/202507150934.VLFQsCyK-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250715/202507150934.VLFQsCyK-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507150934.VLFQsCyK-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/regulator/mt6363-regulator.c: In function 'mt6363_vemc_set_voltage_sel':
>> drivers/regulator/mt6363-regulator.c:457:23: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
     457 |                 sel = FIELD_PREP(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
         |                       ^~~~~~~~~~
   drivers/regulator/mt6363-regulator.c: In function 'mt6363_vemc_get_voltage_sel':
>> drivers/regulator/mt6363-regulator.c:489:23: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
     489 |                 ret = FIELD_GET(MT6363_RG_VEMC_VOSEL_1_MASK, sel);
         |                       ^~~~~~~~~


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

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ