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]
Date:	Fri, 2 Oct 2015 21:53:06 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Paul Cercueil <paul.cercueil@...log.com>
Cc:	kbuild-all@...org, Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Lars-Peter Clausen <lars@...afoo.de>,
	Peter Meerwald <pmeerw@...erw.net>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	Antonio Fiol <antonio@...l.es>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org,
	Paul Cercueil <paul.cercueil@...log.com>
Subject: Re: [PATCH 2/2] iio: dac: Add support for the AD5592R/AD5593R
 ADCs/DACs

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ