linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v3 5/7] iio: multiplexer: new iio category and iio-mux driver
Date: Mon, 21 Nov 2016 22:33:16 +0800	[thread overview]
Message-ID: <201611212209.NPKVHJoP%fengguang.wu@intel.com> (raw)
In-Reply-To: <1479734235-18837-6-git-send-email-peda@axentia.se>

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

Hi Peter,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.9-rc6]
[cannot apply to next-20161117]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Peter-Rosin/mux-controller-abstraction-and-iio-i2c-muxes/20161121-215311
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/iio/multiplexer/iio-mux.c: In function 'mux_read_avail':
>> drivers/iio/multiplexer/iio-mux.c:134:9: error: implicit declaration of function 'iio_read_avail_channel_raw' [-Werror=implicit-function-declaration]
      ret = iio_read_avail_channel_raw(mux->parent, vals, length);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/multiplexer/iio-mux.c: At top level:
>> drivers/iio/multiplexer/iio-mux.c:174:2: error: unknown field 'read_avail' specified in initializer
     .read_avail = mux_read_avail,
     ^
>> drivers/iio/multiplexer/iio-mux.c:174:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .read_avail = mux_read_avail,
                   ^~~~~~~~~~~~~~
   drivers/iio/multiplexer/iio-mux.c:174:16: note: (near initialization for 'mux_info.read_raw_multi')
   drivers/iio/multiplexer/iio-mux.c: In function 'mux_configure_channel':
>> drivers/iio/multiplexer/iio-mux.c:267:6: error: implicit declaration of function 'iio_channel_has_available' [-Werror=implicit-function-declaration]
     if (iio_channel_has_available(pchan, IIO_CHAN_INFO_RAW))
         ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/multiplexer/iio-mux.c:268:7: error: 'struct iio_chan_spec' has no member named 'info_mask_separate_available'; did you mean 'info_mask_separate'?
      chan->info_mask_separate_available |= BIT(IIO_CHAN_INFO_RAW);
          ^~
   cc1: some warnings being treated as errors

vim +/iio_read_avail_channel_raw +134 drivers/iio/multiplexer/iio-mux.c

   128		if (ret < 0)
   129			return ret;
   130	
   131		switch (mask) {
   132		case IIO_CHAN_INFO_RAW:
   133			*type = IIO_VAL_INT;
 > 134			ret = iio_read_avail_channel_raw(mux->parent, vals, length);
   135			break;
   136	
   137		default:
   138			ret = -EINVAL;
   139		}
   140	
   141		iio_mux_deselect(mux);
   142	
   143		return ret;
   144	}
   145	
   146	static int mux_write_raw(struct iio_dev *indio_dev,
   147				 struct iio_chan_spec const *chan,
   148				 int val, int val2, long mask)
   149	{
   150		struct mux *mux = iio_priv(indio_dev);
   151		int idx = chan - mux->chan;
   152		int ret;
   153	
   154		ret = iio_mux_select(mux, idx);
   155		if (ret < 0)
   156			return ret;
   157	
   158		switch (mask) {
   159		case IIO_CHAN_INFO_RAW:
   160			ret = iio_write_channel_raw(mux->parent, val);
   161			break;
   162	
   163		default:
   164			ret = -EINVAL;
   165		}
   166	
   167		iio_mux_deselect(mux);
   168	
   169		return ret;
   170	}
   171	
   172	static const struct iio_info mux_info = {
   173		.read_raw = mux_read_raw,
 > 174		.read_avail = mux_read_avail,
   175		.write_raw = mux_write_raw,
   176		.driver_module = THIS_MODULE,
   177	};
   178	
   179	static ssize_t mux_read_ext_info(struct iio_dev *indio_dev, uintptr_t private,
   180					 struct iio_chan_spec const *chan, char *buf)
   181	{
   182		struct mux *mux = iio_priv(indio_dev);
   183		int idx = chan - mux->chan;
   184		ssize_t ret;
   185	
   186		ret = iio_mux_select(mux, idx);
   187		if (ret < 0)
   188			return ret;
   189	
   190		ret = iio_read_channel_ext_info(mux->parent,
   191						mux->ext_info[private].name,
   192						buf);
   193	
   194		iio_mux_deselect(mux);
   195	
   196		return ret;
   197	}
   198	
   199	static ssize_t mux_write_ext_info(struct iio_dev *indio_dev, uintptr_t private,
   200					  struct iio_chan_spec const *chan,
   201					  const char *buf, size_t len)
   202	{
   203		struct device *dev = indio_dev->dev.parent;
   204		struct mux *mux = iio_priv(indio_dev);
   205		int idx = chan - mux->chan;
   206		char *new;
   207		ssize_t ret;
   208	
   209		ret = iio_mux_select(mux, idx);
   210		if (ret < 0)
   211			return ret;
   212	
   213		new = devm_kmemdup(dev, buf, len + 1, GFP_KERNEL);
   214		if (!new) {
   215			iio_mux_deselect(mux);
   216			return -ENOMEM;
   217		}
   218	
   219		new[len] = 0;
   220	
   221		ret = iio_write_channel_ext_info(mux->parent,
   222						 mux->ext_info[private].name,
   223						 buf, len);
   224		if (ret < 0) {
   225			iio_mux_deselect(mux);
   226			devm_kfree(dev, new);
   227			return ret;
   228		}
   229	
   230		devm_kfree(dev, mux->child[idx].ext_info_cache[private].data);
   231		mux->child[idx].ext_info_cache[private].data = new;
   232		mux->child[idx].ext_info_cache[private].size = len;
   233	
   234		iio_mux_deselect(mux);
   235	
   236		return ret;
   237	}
   238	
   239	static int mux_configure_channel(struct device *dev, struct mux *mux,
   240					 struct device_node *child_np, int idx)
   241	{
   242		struct mux_child *child = &mux->child[idx];
   243		struct iio_chan_spec *chan = &mux->chan[idx];
   244		struct iio_chan_spec const *pchan = mux->parent->channel;
   245		u32 state;
   246		char *page = NULL;
   247		int num_ext_info;
   248		int i;
   249		int ret;
   250	
   251		chan->indexed = 1;
   252		chan->output = pchan->output;
   253		chan->datasheet_name = child_np->name;
   254		chan->ext_info = mux->ext_info;
   255	
   256		ret = iio_get_channel_type(mux->parent, &chan->type);
   257		if (ret < 0) {
   258			dev_err(dev, "failed to get parent channel type\n");
   259			return ret;
   260		}
   261	
   262		if (iio_channel_has_info(pchan, IIO_CHAN_INFO_RAW))
   263			chan->info_mask_separate |= BIT(IIO_CHAN_INFO_RAW);
   264		if (iio_channel_has_info(pchan, IIO_CHAN_INFO_SCALE))
   265			chan->info_mask_separate |= BIT(IIO_CHAN_INFO_SCALE);
   266	
 > 267		if (iio_channel_has_available(pchan, IIO_CHAN_INFO_RAW))
 > 268			chan->info_mask_separate_available |= BIT(IIO_CHAN_INFO_RAW);
   269	
   270		ret = of_property_read_u32(child_np, "reg", &state);
   271		if (ret < 0) {

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2016-11-21 14:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21 13:17 [PATCH v3 0/7] mux controller abstraction and iio/i2c muxes Peter Rosin
2016-11-21 13:17 ` [PATCH v3 1/7] dt-bindings: document devicetree bindings for mux-controllers and mux-gpio Peter Rosin
2016-11-21 13:17 ` [PATCH v3 2/7] misc: minimal mux subsystem and gpio-based mux controller Peter Rosin
2016-11-21 13:17 ` [PATCH v3 3/7] iio: inkern: api for manipulating ext_info of iio channels Peter Rosin
2016-11-21 13:17 ` [PATCH v3 4/7] dt-bindings: iio: iio-mux: document iio-mux bindings Peter Rosin
2016-11-21 13:17 ` [PATCH v3 5/7] iio: multiplexer: new iio category and iio-mux driver Peter Rosin
2016-11-21 14:33   ` kbuild test robot [this message]
2016-11-21 13:17 ` [PATCH v3 6/7] dt-bindings: i2c: i2c-mux-simple: document i2c-mux-simple bindings Peter Rosin
2016-11-21 13:17 ` [PATCH v3 7/7] i2c: i2c-mux-simple: new driver Peter Rosin
2016-11-22 20:58 ` [PATCH v3 0/7] mux controller abstraction and iio/i2c muxes Lars-Peter Clausen
     [not found]   ` <b132143c-259b-6ed2-58c5-b223cc2e72df-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2016-11-23 11:47     ` Peter Rosin
2016-11-27 12:00       ` Jonathan Cameron
     [not found]         ` <d287dc3b-3605-d85d-1aa6-40f3bdcdc72c-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-11-29 16:02           ` Peter Rosin
2016-12-03 10:11             ` 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=201611212209.NPKVHJoP%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=arnd@arndb.de \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=kbuild-all@01.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peda@axentia.se \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=wsa@the-dreams.de \
    /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).