linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cosmin Tanislav <demonsingur@gmail.com>
Cc: kbuild-all@lists.01.org, demonsingur@gmail.com,
	cosmin.tanislav@analog.com, Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iio: addac: add AD74413R driver
Date: Mon, 1 Nov 2021 06:47:03 +0800	[thread overview]
Message-ID: <202111010625.hX9H1pWq-lkp@intel.com> (raw)
In-Reply-To: <20211028134849.3664969-3-demonsingur@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 6557 bytes --]

Hi Cosmin,

I love your patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on robh/for-next linus/master v5.15-rc7 next-20211029]
[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]

url:    https://github.com/0day-ci/linux/commits/Cosmin-Tanislav/iio-add-adddac-subdirectory/20211028-225639
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/94ef24d0c0f35d99ddebc9dda85e262b70ea87db
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cosmin-Tanislav/iio-add-adddac-subdirectory/20211028-225639
        git checkout 94ef24d0c0f35d99ddebc9dda85e262b70ea87db
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/iio/addac/ad74413r.c: In function 'ad74413r_probe':
>> drivers/iio/addac/ad74413r.c:1289:72: error: 'struct iio_dev' has no member named 'id'
    1289 |  st->trig = devm_iio_trigger_alloc(st->dev, "%s-dev%d", name, indio_dev->id);
         |                                                                        ^~


vim +1289 drivers/iio/addac/ad74413r.c

  1202	
  1203	static int ad74413r_probe(struct spi_device *spi)
  1204	{
  1205		struct ad74413r_state *st;
  1206		struct iio_dev *indio_dev;
  1207		unsigned int sillicon_rev_id;
  1208		const char *name;
  1209		int ret;
  1210	
  1211		indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
  1212		if (indio_dev == NULL)
  1213			return -ENOMEM;
  1214	
  1215		st = iio_priv(indio_dev);
  1216		spi_set_drvdata(spi, st);
  1217	
  1218		st->spi = spi;
  1219		st->dev = &spi->dev;
  1220		st->config = of_device_get_match_data(&spi->dev);
  1221		st->indio_dev = indio_dev;
  1222		mutex_init(&st->lock);
  1223		init_completion(&st->adc_data_completion);
  1224	
  1225		name = dev_name(st->dev);
  1226	
  1227		st->regmap = devm_regmap_init(st->dev, NULL, &spi->dev, &ad74413r_regmap_config);
  1228		if (IS_ERR(st->regmap)) {
  1229			ret = PTR_ERR(st->regmap);
  1230			dev_err(st->dev, "Failed to create regmap: %d\n", ret);
  1231			return ret;
  1232		}
  1233	
  1234		ret = regmap_read(st->regmap, AD74413R_REG_SILLICON_REV, &sillicon_rev_id);
  1235		if (ret) {
  1236			dev_err(st->dev, "Failed to read sillicon rev: %d\n", ret);
  1237			return ret;
  1238		}
  1239	
  1240		sillicon_rev_id = FIELD_GET(AD74413R_SILLICON_REV_ID_MASK, sillicon_rev_id);
  1241		if (sillicon_rev_id != AD74413R_SILLICON_REV_ID_EXPECTED) {
  1242			dev_err(st->dev, "Read sillicon rev id %d does not match expected rev id %d\n",
  1243				sillicon_rev_id, AD74413R_SILLICON_REV_ID_EXPECTED);
  1244			return -EINVAL;
  1245		}
  1246	
  1247		st->refin_reg = devm_regulator_get(st->dev, "refin");
  1248		if (IS_ERR(st->refin_reg)) {
  1249			dev_err(st->dev, "Failed to get refin regulator: %d\n", ret);
  1250			return PTR_ERR(st->refin_reg);
  1251		}
  1252	
  1253		ret = regulator_enable(st->refin_reg);
  1254		if (ret) {
  1255			dev_err(st->dev, "Failed to enable refin regulator: %d\n", ret);
  1256			return ret;
  1257		}
  1258	
  1259		ret = devm_add_action_or_reset(st->dev, ad74413r_regulator_disable,
  1260					       st->refin_reg);
  1261		if (ret) {
  1262			dev_err(st->dev, "Failed to add refin regulator disable action: %d\n", ret);
  1263			return ret;
  1264		}
  1265	
  1266		ret = of_property_read_u32(st->dev->of_node, "adi,rsense-resistance-ohms",
  1267					   &st->rsense_resistance_ohms);
  1268		if (ret) {
  1269			dev_err(st->dev, "Failed to get rsense resistance: %d\n", ret);
  1270			return ret;
  1271		}
  1272	
  1273		st->gpiochip.label = name;
  1274		st->gpiochip.base = -1;
  1275		st->gpiochip.ngpio = AD74413R_CHANNEL_MAX;
  1276		st->gpiochip.parent = st->dev;
  1277		st->gpiochip.can_sleep = true;
  1278		st->gpiochip.set = ad74413r_gpio_set;
  1279		st->gpiochip.set_multiple = ad74413r_gpio_set_multiple;
  1280		st->gpiochip.owner = THIS_MODULE;
  1281		st->gpiochip.get = ad74413r_gpio_get;
  1282	
  1283		ret = devm_gpiochip_add_data(st->dev, &st->gpiochip, st);
  1284		if (ret) {
  1285			dev_err(st->dev, "Failed to add gpio chip: %d\n", ret);
  1286			return ret;
  1287		}
  1288	
> 1289		st->trig = devm_iio_trigger_alloc(st->dev, "%s-dev%d", name, indio_dev->id);
  1290		if (!st->trig)
  1291			return -ENOMEM;
  1292	
  1293		st->trig->ops = &ad74413r_trigger_ops;
  1294		st->trig->dev.parent = st->dev;
  1295		iio_trigger_set_drvdata(st->trig, st);
  1296	
  1297		ret = devm_iio_trigger_register(st->dev, st->trig);
  1298		if (ret)
  1299			return ret;
  1300	
  1301		indio_dev->dev.parent = st->dev;
  1302		indio_dev->name = name;
  1303		indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_SOFTWARE;
  1304		indio_dev->info = &ad74413r_info;
  1305		indio_dev->trig = iio_trigger_get(st->trig);
  1306	
  1307		ret = ad74413r_parse_channel_configs(st);
  1308		if (ret)
  1309			return ret;
  1310	
  1311		ret = ad74413r_count_iio_channels(st);
  1312		if (ret)
  1313			return ret;
  1314	
  1315		ret = ad74413r_setup_iio_channels(st);
  1316		if (ret) {
  1317			dev_err(st->dev, "Failed to setup iio channels: %d\n", ret);
  1318			return ret;
  1319		}
  1320	
  1321		ret = ad74413r_set_adc_conv_seq(st, AD74413R_CONV_SEQ_OFF);
  1322		if (ret)
  1323			return ret;
  1324	
  1325		ret = devm_request_irq(st->dev, spi->irq, ad74413r_adc_data_interrupt,
  1326				       IRQF_TRIGGER_FALLING, name, st);
  1327		if (ret) {
  1328			dev_err(st->dev, "Failed to request threaded irq: %d\n", ret);
  1329			return ret;
  1330		}
  1331	
  1332		ret = devm_iio_triggered_buffer_setup(st->dev, indio_dev, &iio_pollfunc_store_time,
  1333						      &ad74413r_trigger_handler, &ad74413r_buffer_ops);
  1334		if (ret) {
  1335			dev_err(st->dev, "Failed to setup triggered buffer: %d\n", ret);
  1336			return ret;
  1337		}
  1338	
  1339		return devm_iio_device_register(st->dev, indio_dev);
  1340	}
  1341	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 66130 bytes --]

  parent reply	other threads:[~2021-10-31 22:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 13:48 [PATCH 1/3] iio: add adddac subdirectory Cosmin Tanislav
2021-10-28 13:48 ` [PATCH 2/3] dt-bindings: iio: add AD74413R Cosmin Tanislav
2021-10-28 14:48   ` Jonathan Cameron
2021-10-28 13:48 ` [PATCH 3/3] iio: addac: add AD74413R driver Cosmin Tanislav
2021-10-28 15:58   ` Jonathan Cameron
     [not found]     ` <CAA+onPPObFeXQwJ450M=5Ue3uE6Cui0M0X49qgn_U1D6su=BcA@mail.gmail.com>
2021-10-30 15:54       ` Jonathan Cameron
     [not found]         ` <CAA+onPN89FJwUFRc3P7ROxPW1qcbSFSq9XxyA-UZw6Mx3XEO-A@mail.gmail.com>
2021-11-03 17:33           ` Jonathan Cameron
2021-10-31 22:47   ` kernel test robot [this message]
2021-10-28 13:56 ` [PATCH v2 1/3] iio: add adddac subdirectory Cosmin Tanislav
2021-10-28 13:56   ` [PATCH v2 2/3] dt-bindings: iio: add AD74413R Cosmin Tanislav
2021-10-28 19:08     ` Rob Herring
2021-10-28 13:56   ` [PATCH v2 3/3] iio: addac: add AD74413R driver Cosmin Tanislav
2021-10-28 16:02   ` [PATCH v2 1/3] iio: add adddac subdirectory Jonathan Cameron
2021-10-29  8:00   ` Sa, Nuno
2021-10-30 15:59     ` 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=202111010625.hX9H1pWq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=cosmin.tanislav@analog.com \
    --cc=demonsingur@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).