From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Antonio Fiol <antonio@fiol.es>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-iio@vger.kernel.org,
Paul Cercueil <paul.cercueil@analog.com>
Subject: Re: [PATCH 2/2] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs
Date: Fri, 2 Oct 2015 21:53:06 +0800 [thread overview]
Message-ID: <201510022121.1QklnZU3%fengguang.wu@intel.com> (raw)
In-Reply-To: <1443789956-25340-2-git-send-email-paul.cercueil@analog.com>
Hi Paul,
[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/dac/ad5592r.c:20:19: sparse: incorrect type in initializer (different base types)
drivers/iio/dac/ad5592r.c:20:19: expected unsigned short [unsigned] [usertype] msg
drivers/iio/dac/ad5592r.c:20:19: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5592r.c:28:19: sparse: incorrect type in initializer (different base types)
drivers/iio/dac/ad5592r.c:28:19: expected unsigned short [unsigned] [usertype] msg
drivers/iio/dac/ad5592r.c:28:19: got restricted __be16 [usertype] <noident>
>> drivers/iio/dac/ad5592r.c:41:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5592r.c:41:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5592r.c:41:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5592r.c:41:18: sparse: cast to restricted __be16
drivers/iio/dac/ad5592r.c:48:19: sparse: incorrect type in initializer (different base types)
drivers/iio/dac/ad5592r.c:48:19: expected unsigned short [unsigned] [usertype] msg
drivers/iio/dac/ad5592r.c:48:19: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5592r.c:56:19: sparse: incorrect type in initializer (different base types)
drivers/iio/dac/ad5592r.c:56:19: expected unsigned short [unsigned] [usertype] msg
drivers/iio/dac/ad5592r.c:56:19: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5592r.c:68:26: sparse: cast to restricted __be16
drivers/iio/dac/ad5592r.c:68:26: sparse: cast to restricted __be16
drivers/iio/dac/ad5592r.c:68:26: sparse: cast to restricted __be16
drivers/iio/dac/ad5592r.c:68:26: sparse: cast to restricted __be16
--
>> drivers/iio/dac/ad5593r.c:28:15: sparse: incorrect type in assignment (different base types)
drivers/iio/dac/ad5593r.c:28:15: expected unsigned short [unsigned] [usertype] value
drivers/iio/dac/ad5593r.c:28:15: got restricted __be16 [usertype] <noident>
>> drivers/iio/dac/ad5593r.c:38:25: sparse: incorrect type in argument 3 (different base types)
drivers/iio/dac/ad5593r.c:38:25: expected unsigned short [unsigned] [usertype] value
drivers/iio/dac/ad5593r.c:38:25: got restricted __be16 [usertype] <noident>
>> drivers/iio/dac/ad5593r.c:48:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5593r.c:48:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5593r.c:48:18: sparse: cast to restricted __be16
>> drivers/iio/dac/ad5593r.c:48:18: sparse: cast to restricted __be16
drivers/iio/dac/ad5593r.c:56:15: sparse: incorrect type in assignment (different base types)
drivers/iio/dac/ad5593r.c:56:15: expected unsigned short [unsigned] [usertype] value
drivers/iio/dac/ad5593r.c:56:15: got restricted __be16 [usertype] <noident>
drivers/iio/dac/ad5593r.c:69:18: sparse: cast to restricted __be16
drivers/iio/dac/ad5593r.c:69:18: sparse: cast to restricted __be16
drivers/iio/dac/ad5593r.c:69:18: sparse: cast to restricted __be16
drivers/iio/dac/ad5593r.c:69:18: sparse: cast to restricted __be16
vim +20 drivers/iio/dac/ad5592r.c
14 #include <linux/of.h>
15 #include <linux/spi/spi.h>
16
17 static int ad5592r_dac_write(struct ad5592r_state *st, unsigned chan, u16 value)
18 {
19 struct spi_device *spi = container_of(st->dev, struct spi_device, dev);
> 20 u16 msg = cpu_to_be16(BIT(15) | (chan << 12) | value);
21
22 return spi_write(spi, &msg, sizeof(msg));
23 }
24
25 static int ad5592r_adc_read(struct ad5592r_state *st, unsigned chan, u16 *value)
26 {
27 struct spi_device *spi = container_of(st->dev, struct spi_device, dev);
28 u16 msg = cpu_to_be16((AD5592R_REG_ADC_SEQ << 11) | BIT(chan));
29 int ret;
30
31 ret = spi_write(spi, &msg, sizeof(msg));
32 if (ret)
33 return ret;
34
35 spi_read(spi, &msg, sizeof(msg)); /* Invalid data */
36
37 ret = spi_read(spi, &msg, sizeof(msg));
38 if (ret)
39 return ret;
40
> 41 *value = be16_to_cpu(msg);
42 return 0;
43 }
44
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
next prev parent reply other threads:[~2015-10-02 13:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 12:45 [PATCH 1/2] Documentation: ad5592r: Added devicetree bindings documentation Paul Cercueil
[not found] ` <1443789956-25340-1-git-send-email-paul.cercueil-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
2015-10-02 12:45 ` [PATCH 2/2] iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs Paul Cercueil
2015-10-02 13:53 ` kbuild test robot [this message]
[not found] ` <1443789956-25340-2-git-send-email-paul.cercueil-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>
2015-10-04 13:45 ` 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=201510022121.1QklnZU3%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=antonio@fiol.es \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jic23@kernel.org \
--cc=kbuild-all@01.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=paul.cercueil@analog.com \
--cc=pawel.moll@arm.com \
--cc=pmeerw@pmeerw.net \
--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).