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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202508262023.u2lGZ2mB-lkp@intel.com>
Date: Tue, 26 Aug 2025 21:10:41 +0800
From: kernel test robot <lkp@...el.com>
To: Abhinav Jain <jain.abhinav177@...il.com>, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, lars@...afoo.de,
	Michael.Hennerich@...log.com, alexandru.ardelean@...log.com,
	jlc23@...nel.org, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	Marcelo.Schmitt@...log.com, dumitru.ceclan@...log.com,
	Jonathan.Santos@...log.com, dragos.bogdan@...log.com,
	Abhinav Jain <jain.abhinav177@...il.com>
Subject: Re: [PATCH v1 2/2] iio: adc: Add initial support for MAX22531 ADC

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ