mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Abhinav Jain <jain.abhinav177@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, lars@metafoo.de,
	Michael.Hennerich@analog.com, alexandru.ardelean@analog.com,
	jlc23@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
	Marcelo.Schmitt@analog.com, dumitru.ceclan@analog.com,
	Jonathan.Santos@analog.com, dragos.bogdan@analog.com,
	Abhinav Jain <jain.abhinav177@gmail.com>
Subject: Re: [PATCH v1 2/2] iio: adc: Add initial support for MAX22531 ADC
Date: Tue, 26 Aug 2025 21:10:41 +0800	[thread overview]
Message-ID: <202508262023.u2lGZ2mB-lkp@intel.com> (raw)
In-Reply-To: <edc52c93e0d4e08619ba8a98674aeb7d49e6dd1b.1756115378.git.jain.abhinav177@gmail.com>

Hi Abhinav,

kernel test robot noticed the following build errors:

[auto build test ERROR on 19272b37aa4f83ca52bdf9c16d5d81bdd1354494]

url:    https://github.com/intel-lab-lkp/linux/commits/Abhinav-Jain/dt-bindings-iio-adc-Add-device-tree-binding-for-MAX22531-ADC/20250826-052702
base:   19272b37aa4f83ca52bdf9c16d5d81bdd1354494
patch link:    https://lore.kernel.org/r/edc52c93e0d4e08619ba8a98674aeb7d49e6dd1b.1756115378.git.jain.abhinav177%40gmail.com
patch subject: [PATCH v1 2/2] iio: adc: Add initial support for MAX22531 ADC
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20250826/202508262023.u2lGZ2mB-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250826/202508262023.u2lGZ2mB-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/202508262023.u2lGZ2mB-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/iio/adc/max22531.c: In function 'max22531_reg_read':
>> drivers/iio/adc/max22531.c:76:15: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
      76 |         cmd = FIELD_PREP(MAX22531_REG_ADDR_MASK, reg);
         |               ^~~~~~~~~~
   drivers/iio/adc/max22531.c: In function 'max22531_probe':
>> drivers/iio/adc/max22531.c:154:13: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
     154 |             FIELD_GET(MAX22531_DEVICE_REV_MSK, prod_id) != MAX22531_DEVICE_REV)
         |             ^~~~~~~~~


vim +/FIELD_PREP +76 drivers/iio/adc/max22531.c

    70	
    71	static int max22531_reg_read(struct max22531 *adc, unsigned int reg,
    72				     unsigned int *readval)
    73	{
    74		u8 cmd;
    75	
  > 76		cmd = FIELD_PREP(MAX22531_REG_ADDR_MASK, reg);
    77		*readval = spi_w8r16be(adc->spi_dev, cmd);
    78		if (*readval < 0)
    79			return *readval;
    80	
    81		return 0;
    82	}
    83	
    84	static int max22531_read_raw(struct iio_dev *indio_dev,
    85				     struct iio_chan_spec const *chan,
    86				     int *val, int *val2, long mask)
    87	{
    88		struct max22531 *adc = iio_priv(indio_dev);
    89		int ret;
    90	
    91		switch (mask) {
    92		case IIO_CHAN_INFO_RAW:
    93			ret = max22531_reg_read(adc, MAX22531_REG_ADC_CHAN(chan->channel), val);
    94			if (ret)
    95				return ret;
    96		return IIO_VAL_INT;
    97	
    98		case IIO_CHAN_INFO_AVERAGE_RAW:
    99			ret = max22531_reg_read(adc, MAX22531_REG_FADC_CHAN(chan->channel), val);
   100			if (ret)
   101				return ret;
   102			return IIO_VAL_INT;
   103	
   104		case IIO_CHAN_INFO_SCALE:
   105			*val = MAX22531_VREF_MV;
   106			*val2 = 12;
   107	
   108			return IIO_VAL_FRACTIONAL_LOG2;
   109	
   110		default:
   111			return -EINVAL;
   112		}
   113	}
   114	
   115	static const struct iio_info max22531_info = {
   116		.read_raw = max22531_read_raw,
   117	};
   118	
   119	static int max22531_probe(struct spi_device *spi)
   120	{
   121		struct iio_dev *indio_dev;
   122		struct max22531 *adc;
   123		unsigned int prod_id;
   124		int ret;
   125	
   126		indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*adc));
   127		if (!indio_dev)
   128			return -ENOMEM;
   129	
   130		adc = iio_priv(indio_dev);
   131		adc->spi_dev = spi;
   132		adc->chip_info = spi_get_device_match_data(spi);
   133		if (!adc->chip_info)
   134			return dev_err_probe(&spi->dev, -EINVAL,
   135					"no chip info\n");
   136	
   137		indio_dev->name = adc->chip_info->name;
   138		indio_dev->info = &max22531_info;
   139		indio_dev->channels = max22531_channels;
   140		indio_dev->num_channels = ARRAY_SIZE(max22531_channels);
   141	
   142		ret = devm_regulator_get_enable(&spi->dev, "vddl");
   143		if (ret)
   144			return dev_err_probe(&spi->dev, ret,
   145			       "Failed to retrieve power logic supply.\n");
   146	
   147		ret = devm_regulator_get_enable(&spi->dev, "vddpl");
   148		if (ret)
   149			return dev_err_probe(&spi->dev, ret,
   150			       "Failed to retrieve isolated DC-DC supply.\n");
   151	
   152		ret = max22531_reg_read(adc, MAX22531_REG_PROD_ID, &prod_id);
   153		if (ret ||
 > 154		    FIELD_GET(MAX22531_DEVICE_REV_MSK, prod_id) != MAX22531_DEVICE_REV)
   155			dev_warn(&spi->dev, "PROD_ID verification failed\n");
   156	
   157		return devm_iio_device_register(&spi->dev, indio_dev);
   158	}
   159	

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

  reply	other threads:[~2025-08-26 13:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-25 21:24 [PATCH v1 0/2] Add MAX22530-MAX22532 ADC Support Abhinav Jain
2025-08-25 21:25 ` [PATCH v1 1/2] dt-bindings: iio: adc: Add device tree binding for MAX22531 ADC Abhinav Jain
2025-08-26 17:55   ` Conor Dooley
2025-08-28 11:27   ` Krzysztof Kozlowski
2025-08-25 21:25 ` [PATCH v1 2/2] iio: adc: Add initial support " Abhinav Jain
2025-08-26 13:10   ` kernel test robot [this message]
2025-08-31 12:27   ` Jonathan Cameron

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=202508262023.u2lGZ2mB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jonathan.Santos@analog.com \
    --cc=Marcelo.Schmitt@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dragos.bogdan@analog.com \
    --cc=dumitru.ceclan@analog.com \
    --cc=jain.abhinav177@gmail.com \
    --cc=jlc23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh+dt@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®