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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 Oct 2021 11:07:17 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mihail Chindris <mihail.chindris@...log.com>,
        linux-kernel@...r.kernel.org, linux-iio@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, lars@...afoo.de,
        Michael.Hennerich@...log.com, jic23@...nel.org, nuno.sa@...log.com,
        dragos.bogdan@...log.com, alexandru.ardelean@...log.com,
        Mihail Chindris <mihail.chindris@...log.com>
Subject: Re: [PATCH v2 2/2] drivers:iio:dac: Add AD3552R driver support

Hi Mihail,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linux/master linus/master v5.15-rc4 next-20211008]
[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/Mihail-Chindris/Add-ad3552r-and-ad3542r-driver-support/20211008-204146
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/2d864149611f04bb764b81ebbad7dea5472921c5
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mihail-Chindris/Add-ad3552r-and-ad3542r-driver-support/20211008-204146
        git checkout 2d864149611f04bb764b81ebbad7dea5472921c5
        # 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@...el.com>

All errors (new ones prefixed by >>):

>> drivers/iio/dac/ad3552r.c:300:23: error: array type has incomplete element type 'struct iio_chan_spec'
     300 |  struct iio_chan_spec channels[AD3552R_NUM_CH + 1];
         |                       ^~~~~~~~
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_read_raw':
>> drivers/iio/dac/ad3552r.c:767:29: error: implicit declaration of function 'iio_priv'; did you mean 'bio_prio'? [-Werror=implicit-function-declaration]
     767 |  struct ad3552r_desc *dac = iio_priv(indio_dev);
         |                             ^~~~~~~~
         |                             bio_prio
>> drivers/iio/dac/ad3552r.c:767:29: error: initialization of 'struct ad3552r_desc *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
>> drivers/iio/dac/ad3552r.c:770:14: error: dereferencing pointer to incomplete type 'const struct iio_chan_spec'
     770 |  u8 ch = chan->channel;
         |              ^~
>> drivers/iio/dac/ad3552r.c:773:7: error: 'IIO_CHAN_INFO_RAW' undeclared (first use in this function)
     773 |  case IIO_CHAN_INFO_RAW:
         |       ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:773:7: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/iio/dac/ad3552r.c:790:7: error: 'IIO_CHAN_INFO_ENABLE' undeclared (first use in this function)
     790 |  case IIO_CHAN_INFO_ENABLE:
         |       ^~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ad3552r.c:801:7: error: 'IIO_CHAN_INFO_SCALE' undeclared (first use in this function)
     801 |  case IIO_CHAN_INFO_SCALE:
         |       ^~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ad3552r.c:804:10: error: 'IIO_VAL_INT_PLUS_MICRO' undeclared (first use in this function)
     804 |   return IIO_VAL_INT_PLUS_MICRO;
         |          ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ad3552r.c:805:7: error: 'IIO_CHAN_INFO_OFFSET' undeclared (first use in this function)
     805 |  case IIO_CHAN_INFO_OFFSET:
         |       ^~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ad3552r.c:813:9: error: 'IIO_VAL_INT' undeclared (first use in this function)
     813 |  return IIO_VAL_INT;
         |         ^~~~~~~~~~~
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_write_raw':
   drivers/iio/dac/ad3552r.c:822:29: error: initialization of 'struct ad3552r_desc *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
     822 |  struct ad3552r_desc *dac = iio_priv(indio_dev);
         |                             ^~~~~~~~
   drivers/iio/dac/ad3552r.c:827:7: error: 'IIO_CHAN_INFO_RAW' undeclared (first use in this function)
     827 |  case IIO_CHAN_INFO_RAW:
         |       ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:840:7: error: 'IIO_CHAN_INFO_ENABLE' undeclared (first use in this function)
     840 |  case IIO_CHAN_INFO_ENABLE:
         |       ^~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c: At top level:
>> drivers/iio/dac/ad3552r.c:872:21: error: variable 'ad3552r_iio_info' has initializer but incomplete type
     872 | static const struct iio_info ad3552r_iio_info = {
         |                     ^~~~~~~~
>> drivers/iio/dac/ad3552r.c:873:3: error: 'const struct iio_info' has no member named 'read_raw'
     873 |  .read_raw = ad3552r_read_raw,
         |   ^~~~~~~~
   drivers/iio/dac/ad3552r.c:873:14: error: excess elements in struct initializer [-Werror]
     873 |  .read_raw = ad3552r_read_raw,
         |              ^~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:873:14: note: (near initialization for 'ad3552r_iio_info')
>> drivers/iio/dac/ad3552r.c:874:3: error: 'const struct iio_info' has no member named 'write_raw'
     874 |  .write_raw = ad3552r_write_raw,
         |   ^~~~~~~~~
   drivers/iio/dac/ad3552r.c:874:15: error: excess elements in struct initializer [-Werror]
     874 |  .write_raw = ad3552r_write_raw,
         |               ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:874:15: note: (near initialization for 'ad3552r_iio_info')
>> drivers/iio/dac/ad3552r.c:875:3: error: 'const struct iio_info' has no member named 'update_scan_mode'
     875 |  .update_scan_mode = ad3552r_update_scan_mode
         |   ^~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:875:22: error: excess elements in struct initializer [-Werror]
     875 |  .update_scan_mode = ad3552r_update_scan_mode
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:875:22: note: (near initialization for 'ad3552r_iio_info')
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_trigger_handler':
>> drivers/iio/dac/ad3552r.c:882:36: error: dereferencing pointer to incomplete type 'struct iio_dev'
     882 |  struct iio_buffer *buf = indio_dev->buffer;
         |                                    ^~
   drivers/iio/dac/ad3552r.c:883:29: error: initialization of 'struct ad3552r_desc *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
     883 |  struct ad3552r_desc *dac = iio_priv(indio_dev);
         |                             ^~~~~~~~
>> drivers/iio/dac/ad3552r.c:888:8: error: implicit declaration of function 'iio_pop_from_buffer'; did you mean 'sg_pcopy_from_buffer'? [-Werror=implicit-function-declaration]
     888 |  err = iio_pop_from_buffer(buf, buff);
         |        ^~~~~~~~~~~~~~~~~~~
         |        sg_pcopy_from_buffer
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_configure_custom_gain':
>> drivers/iio/dac/ad3552r.c:1106:22: error: implicit declaration of function 'fwnode_get_named_child_node'; did you mean 'fwnode_get_named_gpiod'? [-Werror=implicit-function-declaration]
    1106 |  custom_gain_child = fwnode_get_named_child_node(child,
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                      fwnode_get_named_gpiod
>> drivers/iio/dac/ad3552r.c:1106:20: error: assignment to 'struct fwnode_handle *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
    1106 |  custom_gain_child = fwnode_get_named_child_node(child,
         |                    ^
>> drivers/iio/dac/ad3552r.c:1114:8: error: implicit declaration of function 'fwnode_property_read_u32' [-Werror=implicit-function-declaration]
    1114 |  err = fwnode_property_read_u32(custom_gain_child, "adi,gain-offset",
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/dac/ad3552r.c:1149:2: error: implicit declaration of function 'fwnode_handle_put' [-Werror=implicit-function-declaration]
    1149 |  fwnode_handle_put(custom_gain_child);
         |  ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_configure_device':
   drivers/iio/dac/ad3552r.c:1181:7: error: implicit declaration of function 'device_property_read_bool' [-Werror=implicit-function-declaration]
    1181 |   if (device_property_read_bool(dev, "adi,vref-out-en"))
         |       ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1190:8: error: implicit declaration of function 'device_property_read_u32' [-Werror=implicit-function-declaration]
    1190 |  err = device_property_read_u32(dev, "adi,sdo-drive-strength", &vals[0]);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1203:16: error: implicit declaration of function 'device_get_child_node_count' [-Werror=implicit-function-declaration]
    1203 |  dac->num_ch = device_get_child_node_count(dev);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1209:2: error: implicit declaration of function 'device_for_each_child_node'; did you mean 'device_for_each_child'? [-Werror=implicit-function-declaration]
    1209 |  device_for_each_child_node(dev, child) {
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
         |  device_for_each_child
   drivers/iio/dac/ad3552r.c:1209:40: error: expected ';' before '{' token
    1209 |  device_for_each_child_node(dev, child) {
         |                                        ^~
         |                                        ;
   drivers/iio/dac/ad3552r.c:1287:1: error: label 'put_child' defined but not used [-Werror=unused-label]
    1287 | put_child:
         | ^~~~~~~~~
   drivers/iio/dac/ad3552r.c:1161:7: error: unused variable 'is_custom' [-Werror=unused-variable]
    1161 |  bool is_custom;
         |       ^~~~~~~~~
   drivers/iio/dac/ad3552r.c:1160:15: error: unused variable 'ch' [-Werror=unused-variable]
    1160 |  u32 vals[2], ch;
         |               ^~
   drivers/iio/dac/ad3552r.c:1159:11: error: unused variable 'cnt' [-Werror=unused-variable]
    1159 |  int err, cnt = 0, voltage, delta = 100000;
         |           ^~~
   drivers/iio/dac/ad3552r.c: In function 'ad3552r_probe':
   drivers/iio/dac/ad3552r.c:1337:14: error: implicit declaration of function 'devm_iio_device_alloc' [-Werror=implicit-function-declaration]
    1337 |  indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*dac));
         |              ^~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1337:12: error: assignment to 'struct iio_dev *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
    1337 |  indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*dac));
         |            ^
   drivers/iio/dac/ad3552r.c:1341:6: error: assignment to 'struct ad3552r_desc *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
    1341 |  dac = iio_priv(indio_dev);
         |      ^
   drivers/iio/dac/ad3552r.c:1357:21: error: 'INDIO_DIRECT_MODE' undeclared (first use in this function)
    1357 |  indio_dev->modes = INDIO_DIRECT_MODE;
         |                     ^~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1361:9: error: 'IIO_BUFFER_DIRECTION_OUT' undeclared (first use in this function)
    1361 |         IIO_BUFFER_DIRECTION_OUT,
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1359:8: error: too many arguments to function 'devm_iio_triggered_buffer_setup_ext'
    1359 |  err = devm_iio_triggered_buffer_setup_ext(&indio_dev->dev, indio_dev, NULL,
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/iio/dac/ad3552r.c:11:
   include/linux/iio/triggered_buffer.h:21:5: note: declared here
      21 | int devm_iio_triggered_buffer_setup_ext(struct device *dev,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1367:9: error: implicit declaration of function 'devm_iio_device_register'; did you mean 'devm_iio_trigger_register'? [-Werror=implicit-function-declaration]
    1367 |  return devm_iio_device_register(&spi->dev, indio_dev);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
         |         devm_iio_trigger_register
   drivers/iio/dac/ad3552r.c: At top level:
   drivers/iio/dac/ad3552r.c:872:30: error: storage size of 'ad3552r_iio_info' isn't known
     872 | static const struct iio_info ad3552r_iio_info = {
         |                              ^~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1092:12: error: 'ad3552r_configure_custom_gain' defined but not used [-Werror=unused-function]
    1092 | static int ad3552r_configure_custom_gain(struct ad3552r_desc *dac,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1071:12: error: 'ad3552r_find_range' defined but not used [-Werror=unused-function]
    1071 | static int ad3552r_find_range(u16 id, u32 *vals)
         |            ^~~~~~~~~~~~~~~~~~
   drivers/iio/dac/ad3552r.c:1024:13: error: 'ad3552r_calc_gain_and_offset' defined but not used [-Werror=unused-function]
    1024 | static void ad3552r_calc_gain_and_offset(struct ad3552r_desc *dac, s32 ch)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +300 drivers/iio/dac/ad3552r.c

   292	
   293	struct ad3552r_desc {
   294		/* Used to look the spi bus for atomic operations where needed */
   295		struct mutex		lock;
   296		struct gpio_desc	*gpio_reset;
   297		struct gpio_desc	*gpio_ldac;
   298		struct spi_device	*spi;
   299		struct ad3552r_ch_data	ch_data[AD3552R_NUM_CH];
 > 300		struct iio_chan_spec	channels[AD3552R_NUM_CH + 1];
   301		unsigned long		enabled_ch;
   302		unsigned int		num_ch;
   303		enum ad3542r_id		chip_id;
   304		/*
   305		 * The maximum spi transfer size consist 1 bytes (reg address)
   306		 * + 2 registers of 3 bytes + 1 reg of 1 byte (SW LDAC)
   307		 */
   308		u8 buf_data[8] ____cacheline_aligned;
   309	};
   310	

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

Download attachment ".config.gz" of type "application/gzip" (66065 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ