mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Joy Zou <joy.zou@nxp.com>, Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	Frank Li <Frank.Li@nxp.com>, Ye Li <ye.li@nxp.com>,
	Jacky Bai <ping.bai@nxp.com>, Dong Aisheng <aisheng.dong@nxp.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2 2/2] regulator: pf0900: Add PMIC PF0900 support
Date: Tue, 22 Jul 2025 18:19:39 +0800	[thread overview]
Message-ID: <202507221720.jxsGRfcE-lkp@intel.com> (raw)
In-Reply-To: <20250721-b4-pf09-v2-v2-2-e2c568548032@nxp.com>

Hi Joy,

kernel test robot noticed the following build errors:

[auto build test ERROR on d086c886ceb9f59dea6c3a9dae7eb89e780a20c9]

url:    https://github.com/intel-lab-lkp/linux/commits/Joy-Zou/dt-bindings-regulator-add-PF0900-regulator-yaml/20250721-151818
base:   d086c886ceb9f59dea6c3a9dae7eb89e780a20c9
patch link:    https://lore.kernel.org/r/20250721-b4-pf09-v2-v2-2-e2c568548032%40nxp.com
patch subject: [PATCH v2 2/2] regulator: pf0900: Add PMIC PF0900 support
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250722/202507221720.jxsGRfcE-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250722/202507221720.jxsGRfcE-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/202507221720.jxsGRfcE-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/regulator/pf0900-regulator.c: In function 'pf0900_regmap_read':
>> drivers/regulator/pf0900-regulator.c:377:64: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
     377 |                 crc = crc8_j1850(pf0900->addr << 1 | 0x1, reg, FIELD_GET(GENMASK(7, 0), *val));
         |                                                                ^~~~~~~~~
   drivers/regulator/pf0900-regulator.c: In function 'pf0900_regmap_write':
>> drivers/regulator/pf0900-regulator.c:416:23: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
     416 |                 val = FIELD_PREP(GENMASK(15, 8), data[1]) | data[0];
         |                       ^~~~~~~~~~


vim +/FIELD_GET +377 drivers/regulator/pf0900-regulator.c

   351	
   352	static int pf0900_regmap_read(void *context, unsigned int reg,
   353				      unsigned int *val)
   354	{
   355		struct device *dev = context;
   356		struct i2c_client *i2c = to_i2c_client(dev);
   357		struct pf0900 *pf0900 = dev_get_drvdata(dev);
   358		int ret;
   359		u8 crc;
   360	
   361		if (!pf0900 || !pf0900->dev)
   362			return -EINVAL;
   363	
   364		if (reg >= PF0900_MAX_REGISTER) {
   365			dev_err(pf0900->dev, "Invalid register address: 0x%x\n", reg);
   366			return -EINVAL;
   367		}
   368	
   369		if (pf0900->crc_en) {
   370			ret = i2c_smbus_read_word_data(i2c, reg);
   371			if (ret < 0) {
   372				dev_err(pf0900->dev, "Read error at reg=0x%x: %d\n", reg, ret);
   373				return ret;
   374			}
   375	
   376			*val = (u16)ret;
 > 377			crc = crc8_j1850(pf0900->addr << 1 | 0x1, reg, FIELD_GET(GENMASK(7, 0), *val));
   378			if (crc != FIELD_GET(GENMASK(15, 8), *val)) {
   379				dev_err(pf0900->dev, "Crc check error!\n");
   380				return -EINVAL;
   381			}
   382			*val = FIELD_GET(GENMASK(7, 0), *val);
   383		} else {
   384			ret = i2c_smbus_read_byte_data(i2c, reg);
   385			if (ret < 0) {
   386				dev_err(pf0900->dev, "Read error at reg=0x%x: %d\n", reg, ret);
   387				return ret;
   388			}
   389			*val = ret;
   390		}
   391	
   392		return 0;
   393	}
   394	
   395	static int pf0900_regmap_write(void *context, unsigned int reg,
   396				       unsigned int val)
   397	{
   398		struct device *dev = context;
   399		struct i2c_client *i2c = to_i2c_client(dev);
   400		struct pf0900 *pf0900 = dev_get_drvdata(dev);
   401		uint8_t data[2];
   402		int ret;
   403	
   404		if (!pf0900 || !pf0900->dev)
   405			return -EINVAL;
   406	
   407		if (reg >= PF0900_MAX_REGISTER) {
   408			dev_err(pf0900->dev, "Invalid register address: 0x%x\n", reg);
   409			return -EINVAL;
   410		}
   411	
   412		data[0] = val;
   413		if (pf0900->crc_en) {
   414			/* Get CRC */
   415			data[1] = crc8_j1850(pf0900->addr << 1, reg, data[0]);
 > 416			val = FIELD_PREP(GENMASK(15, 8), data[1]) | data[0];
   417			ret = i2c_smbus_write_word_data(i2c, reg, val);
   418		} else {
   419			ret = i2c_smbus_write_byte_data(i2c, reg, data[0]);
   420		}
   421	
   422		if (ret) {
   423			dev_err(pf0900->dev, "Write reg=0x%x error!\n", reg);
   424			return ret;
   425		}
   426	
   427		return 0;
   428	}
   429	

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

      parent reply	other threads:[~2025-07-22 10:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21  7:11 [PATCH v2 0/2] regulator: add new " Joy Zou
2025-07-21  7:11 ` [PATCH v2 1/2] dt-bindings: regulator: add PF0900 regulator yaml Joy Zou
2025-07-21  7:28   ` Krzysztof Kozlowski
2025-07-21 12:00     ` Mark Brown
2025-07-24 10:51     ` Joy Zou
2025-07-24 18:58       ` Krzysztof Kozlowski
2025-07-21  7:11 ` [PATCH v2 2/2] regulator: pf0900: Add PMIC PF0900 support Joy Zou
2025-07-21  7:30   ` Krzysztof Kozlowski
2025-07-21 12:26   ` Mark Brown
2025-07-22 10:19   ` kernel test robot [this message]

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=202507221720.jxsGRfcE-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Frank.Li@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=joy.zou@nxp.com \
    --cc=krzk@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=ping.bai@nxp.com \
    --cc=robh@kernel.org \
    --cc=ye.li@nxp.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

all inboxes | Powered by JetHome®