Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
From: Alexandru Ardelean <ardeleanalex@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	kbuild-all@lists.01.org, Jonathan Cameron <jic23@kernel.org>
Subject: Re: [PATCH] iio: adc: ad7887: invert/rework external ref logic
Date: Fri, 2 Oct 2020 11:13:10 +0300
Message-ID: <CA+U=DspTK=o9azwa1tP=tUzD_ZK5FzvfBqj9Fnzj7gtGYJ-F5A@mail.gmail.com> (raw)
In-Reply-To: <202010020651.AJIzQmxM-lkp@intel.com>

On Fri, Oct 2, 2020 at 1:47 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Alexandru,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on iio/togreg]
> [also build test ERROR on linux/master linus/master v5.9-rc7 next-20201001]
> [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/Alexandru-Ardelean/iio-adc-ad7887-invert-rework-external-ref-logic/20201001-220829
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> config: c6x-randconfig-r034-20200930 (attached as .config)
> compiler: c6x-elf-gcc (GCC) 9.3.0
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://github.com/0day-ci/linux/commit/98dbf5fa747aac2e245826d8c6cd34b087aeaa27
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Alexandru-Ardelean/iio-adc-ad7887-invert-rework-external-ref-logic/20201001-220829
>         git checkout 98dbf5fa747aac2e245826d8c6cd34b087aeaa27
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
>
> 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/adc/ad7887.c: In function 'ad7887_probe':
> >> drivers/iio/adc/ad7887.c:276:22: error: 'struct ad7887_platform_data' has no member named 'use_onchip_ref'
>      276 |  if (!pdata || !pdata->use_onchip_ref)
>          |                      ^~
>

oh, i really did miss part;
another day of too much multi-tasking


> vim +276 drivers/iio/adc/ad7887.c
>
> 6fe8135fccd66ae drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-05-18  234
> fc52692c49969ec drivers/iio/adc/ad7887.c              Greg Kroah-Hartman 2012-12-21  235  static int ad7887_probe(struct spi_device *spi)
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  236  {
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  237        struct ad7887_platform_data *pdata = spi->dev.platform_data;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  238        struct ad7887_state *st;
> 82429e0d33ece55 drivers/iio/adc/ad7887.c              Sachin Kamat       2013-07-23  239        struct iio_dev *indio_dev;
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  240        uint8_t mode;
> bf5d2613c9083b8 drivers/staging/iio/adc/ad7887_core.c Lars-Peter Clausen 2012-11-05  241        int ret;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  242
> 82429e0d33ece55 drivers/iio/adc/ad7887.c              Sachin Kamat       2013-07-23  243        indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  244        if (indio_dev == NULL)
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  245                return -ENOMEM;
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  246
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  247        st = iio_priv(indio_dev);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  248
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  249        st->reg = devm_regulator_get_optional(&spi->dev, "vref");
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  250        if (IS_ERR(st->reg)) {
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  251                if (PTR_ERR(st->reg) != -ENODEV)
> 82429e0d33ece55 drivers/iio/adc/ad7887.c              Sachin Kamat       2013-07-23  252                        return PTR_ERR(st->reg);
> bf5d2613c9083b8 drivers/staging/iio/adc/ad7887_core.c Lars-Peter Clausen 2012-11-05  253
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  254                st->reg = NULL;
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  255        }
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  256
> 98dbf5fa747aac2 drivers/iio/adc/ad7887.c              Alexandru Ardelean 2020-10-01  257        if (st->reg) {
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  258                ret = regulator_enable(st->reg);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  259                if (ret)
> 82429e0d33ece55 drivers/iio/adc/ad7887.c              Sachin Kamat       2013-07-23  260                        return ret;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  261        }
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  262
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  263        st->chip_info =
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  264                &ad7887_chip_info_tbl[spi_get_device_id(spi)->driver_data];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  265
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  266        spi_set_drvdata(spi, indio_dev);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  267        st->spi = spi;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  268
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  269        indio_dev->name = spi_get_device_id(spi)->name;
> 6fe8135fccd66ae drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-05-18  270        indio_dev->info = &ad7887_info;
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  271        indio_dev->modes = INDIO_DIRECT_MODE;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  272
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  273        /* Setup default message */
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  274
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  275        mode = AD7887_PM_MODE4;
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05 @276        if (!pdata || !pdata->use_onchip_ref)
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  277                mode |= AD7887_REF_DIS;
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  278        if (pdata && pdata->en_dual)
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  279                mode |= AD7887_DUAL;
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  280
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  281        st->tx_cmd_buf[0] = AD7887_CH_AIN0 | mode;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  282
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  283        st->xfer[0].rx_buf = &st->data[0];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  284        st->xfer[0].tx_buf = &st->tx_cmd_buf[0];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  285        st->xfer[0].len = 2;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  286
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  287        spi_message_init(&st->msg[AD7887_CH0]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  288        spi_message_add_tail(&st->xfer[0], &st->msg[AD7887_CH0]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  289
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  290        if (pdata && pdata->en_dual) {
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  291                st->tx_cmd_buf[2] = AD7887_CH_AIN1 | mode;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  292
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  293                st->xfer[1].rx_buf = &st->data[0];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  294                st->xfer[1].tx_buf = &st->tx_cmd_buf[2];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  295                st->xfer[1].len = 2;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  296
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  297                st->xfer[2].rx_buf = &st->data[2];
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  298                st->xfer[2].tx_buf = &st->tx_cmd_buf[0];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  299                st->xfer[2].len = 2;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  300
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  301                spi_message_init(&st->msg[AD7887_CH0_CH1]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  302                spi_message_add_tail(&st->xfer[1], &st->msg[AD7887_CH0_CH1]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  303                spi_message_add_tail(&st->xfer[2], &st->msg[AD7887_CH0_CH1]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  304
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  305                st->xfer[3].rx_buf = &st->data[2];
> fce7c3eac7d4ca7 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  306                st->xfer[3].tx_buf = &st->tx_cmd_buf[2];
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  307                st->xfer[3].len = 2;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  308
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  309                spi_message_init(&st->msg[AD7887_CH1]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  310                spi_message_add_tail(&st->xfer[3], &st->msg[AD7887_CH1]);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  311
> b0ec7a44393e0d7 drivers/iio/adc/ad7887.c              Beniamin Bia       2019-11-25  312                indio_dev->channels = st->chip_info->dual_channels;
> b0ec7a44393e0d7 drivers/iio/adc/ad7887.c              Beniamin Bia       2019-11-25  313                indio_dev->num_channels = st->chip_info->num_dual_channels;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  314        } else {
> b0ec7a44393e0d7 drivers/iio/adc/ad7887.c              Beniamin Bia       2019-11-25  315                indio_dev->channels = st->chip_info->channels;
> b0ec7a44393e0d7 drivers/iio/adc/ad7887.c              Beniamin Bia       2019-11-25  316                indio_dev->num_channels = st->chip_info->num_channels;
> 596d06097f7843e drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  317        }
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  318
> 65dd3d3d7a9bca6 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  319        ret = iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time,
> 65dd3d3d7a9bca6 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  320                        &ad7887_trigger_handler, &ad7887_ring_setup_ops);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  321        if (ret)
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  322                goto error_disable_reg;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  323
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  324        ret = iio_device_register(indio_dev);
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  325        if (ret)
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  326                goto error_unregister_ring;
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  327
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  328        return 0;
> 26d25ae3f0d8ffe drivers/staging/iio/adc/ad7887_core.c Jonathan Cameron   2011-09-02  329  error_unregister_ring:
> 65dd3d3d7a9bca6 drivers/staging/iio/adc/ad7887.c      Lars-Peter Clausen 2012-11-05  330        iio_triggered_buffer_cleanup(indio_dev);
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  331  error_disable_reg:
> bf5d2613c9083b8 drivers/staging/iio/adc/ad7887_core.c Lars-Peter Clausen 2012-11-05  332        if (st->reg)
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  333                regulator_disable(st->reg);
> f39e086adcbdb95 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2011-05-18  334
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  335        return ret;
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  336  }
> 2b4756aa36909a9 drivers/staging/iio/adc/ad7887_core.c Michael Hennerich  2010-11-22  337
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 14:11 Alexandru Ardelean
2020-10-01 22:46 ` kernel test robot
2020-10-02  8:13   ` Alexandru Ardelean [this message]
2020-10-02  8:27 ` [PATCH v2] " Alexandru Ardelean
2020-10-10 16:12   ` 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='CA+U=DspTK=o9azwa1tP=tUzD_ZK5FzvfBqj9Fnzj7gtGYJ-F5A@mail.gmail.com' \
    --to=ardeleanalex@gmail.com \
    --cc=alexandru.ardelean@analog.com \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.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

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git