All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH] devres: better type safety with devm_*_action()
Date: Wed, 10 Mar 2021 15:52:33 +0800	[thread overview]
Message-ID: <202103101557.Bt5ByihD-lkp@intel.com> (raw)

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
References: <20210309235917.2134565-1-linux@rasmusvillemoes.dk>
TO: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Hi Rasmus,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on driver-core/driver-core-testing]
[also build test WARNING on linux/master linus/master v5.12-rc2 next-20210310]
[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/Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git a38fd8748464831584a19438cbb3082b5a2dab15
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: i386-randconfig-s001-20210308 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-262-g5e674421-dirty
        # https://github.com/0day-ci/linux/commit/663d41317b8fa291fc1c82100b3e2526627ab4d4
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Rasmus-Villemoes/devres-better-type-safety-with-devm_-_action/20210310-080019
        git checkout 663d41317b8fa291fc1c82100b3e2526627ab4d4
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
   drivers/iio/adc/hi8435.c: note: in included file (through include/linux/iio/iio.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/iio/adc/hi8435.c:517:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/adc/hi8435.c:517:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/adc/hi8435.c:517:15: sparse: sparse: static assertion failed: "__same_type(hi8435_triggered_event_cleanup + 0, void (*)(void *)) || __same_type(hi8435_triggered_event_cleanup + 0, void (*)(typeof(idev)))"
--
   drivers/input/joystick/adc-joystick.c: note: in included file (through include/linux/input.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/joystick/adc-joystick.c:238:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/joystick/adc-joystick.c:238:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/joystick/adc-joystick.c:238:17: sparse: sparse: static assertion failed: "__same_type(adc_joystick_cleanup + 0, void (*)(void *)) || __same_type(adc_joystick_cleanup + 0, void (*)(typeof(joy->buffer)))"
--
   drivers/input/joystick/pxrc.c: note: in included file (through include/linux/usb/ch9.h, include/linux/usb.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/joystick/pxrc.c:159:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/joystick/pxrc.c:159:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/joystick/pxrc.c:159:17: sparse: sparse: static assertion failed: "__same_type(pxrc_free_urb + 0, void (*)(void *)) || __same_type(pxrc_free_urb + 0, void (*)(typeof(pxrc)))"
--
   drivers/iio/gyro/adxrs290.c: note: in included file:
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/iio/gyro/adxrs290.c:276:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/gyro/adxrs290.c:276:16: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/gyro/adxrs290.c:276:16: sparse: sparse: static assertion failed: "__same_type(adxrs290_chip_off_action + 0, void (*)(void *)) || __same_type(adxrs290_chip_off_action + 0, void (*)(typeof(indio_dev)))"
--
   drivers/input/mouse/cyapa.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/input/mouse/cyapa.c:843:25: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/mouse/cyapa.c:843:25: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/mouse/cyapa.c:843:25: sparse: sparse: static assertion failed: "__same_type(cyapa_remove_power_wakeup_group + 0, void (*)(void *)) || __same_type(cyapa_remove_power_wakeup_group + 0, void (*)(typeof(cyapa)))"
   drivers/input/mouse/cyapa.c:959:17: sparse: sparse: arithmetics on pointers to functions
   drivers/input/mouse/cyapa.c:959:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/mouse/cyapa.c:959:17: sparse: sparse: static assertion failed: "__same_type(cyapa_remove_power_runtime_group + 0, void (*)(void *)) || __same_type(cyapa_remove_power_runtime_group + 0, void (*)(typeof(cyapa)))"
   drivers/input/mouse/cyapa.c:1293:17: sparse: sparse: arithmetics on pointers to functions
   drivers/input/mouse/cyapa.c:1293:17: sparse: sparse: arithmetics on pointers to functions
>> drivers/input/mouse/cyapa.c:1293:17: sparse: sparse: static assertion failed: "__same_type(cyapa_disable_regulator + 0, void (*)(void *)) || __same_type(cyapa_disable_regulator + 0, void (*)(typeof(cyapa)))"
--
   drivers/iio/imu/adis16400.c: note: in included file:
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/iio/imu/adis16400.c:1215:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/imu/adis16400.c:1215:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/imu/adis16400.c:1215:15: sparse: sparse: static assertion failed: "__same_type(adis16400_stop + 0, void (*)(void *)) || __same_type(adis16400_stop + 0, void (*)(typeof(indio_dev)))"
--
   drivers/iio/light/as73211.c: note: in included file (through include/linux/acpi.h, include/linux/i2c.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/iio/light/as73211.c:738:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/light/as73211.c:738:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/iio/light/as73211.c:738:15: sparse: sparse: static assertion failed: "__same_type(as73211_power_disable + 0, void (*)(void *)) || __same_type(as73211_power_disable + 0, void (*)(typeof(indio_dev)))"
--
   drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c: note: in included file (through include/linux/platform_device.h):
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: arithmetics on pointers to functions
   include/linux/device.h:290:15: sparse: sparse: static assertion failed: "__same_type(action + 0, void (*)(void *)) || __same_type(action + 0, void (*)(typeof(data)))"
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:268:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:268:15: sparse: sparse: arithmetics on pointers to functions
>> drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:268:15: sparse: sparse: static assertion failed: "__same_type(dw_hdmi_cec_del + 0, void (*)(void *)) || __same_type(dw_hdmi_cec_del + 0, void (*)(typeof(cec)))"
   drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:296:9: sparse: sparse: arithmetics on pointers to functions
   drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:296:9: sparse: sparse: arithmetics on pointers to functions
   drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c:296:9: sparse: sparse: static assertion failed: "__same_type(dw_hdmi_cec_del + 0, void (*)(void *)) || __same_type(dw_hdmi_cec_del + 0, void (*)(typeof(cec)))"

vim +517 drivers/iio/adc/hi8435.c

ef19ee60f9cf7135 Andrey Smirnov   2019-08-10  461  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  462  static int hi8435_probe(struct spi_device *spi)
72aa29ce0a59779d Vladimir Barinov 2015-08-28  463  {
72aa29ce0a59779d Vladimir Barinov 2015-08-28  464  	struct iio_dev *idev;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  465  	struct hi8435_priv *priv;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  466  	struct gpio_desc *reset_gpio;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  467  	int ret;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  468  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  469  	idev = devm_iio_device_alloc(&spi->dev, sizeof(*priv));
72aa29ce0a59779d Vladimir Barinov 2015-08-28  470  	if (!idev)
72aa29ce0a59779d Vladimir Barinov 2015-08-28  471  		return -ENOMEM;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  472  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  473  	priv = iio_priv(idev);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  474  	priv->spi = spi;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  475  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  476  	reset_gpio = devm_gpiod_get(&spi->dev, NULL, GPIOD_OUT_LOW);
e18788afebd12a53 Jonathan Cameron 2017-05-28  477  	if (IS_ERR(reset_gpio)) {
e18788afebd12a53 Jonathan Cameron 2017-05-28  478  		/* chip s/w reset if h/w reset failed */
72aa29ce0a59779d Vladimir Barinov 2015-08-28  479  		hi8435_writeb(priv, HI8435_CTRL_REG, HI8435_CTRL_SRST);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  480  		hi8435_writeb(priv, HI8435_CTRL_REG, 0);
e18788afebd12a53 Jonathan Cameron 2017-05-28  481  	} else {
e18788afebd12a53 Jonathan Cameron 2017-05-28  482  		udelay(5);
6822dc9daa261021 Andrey Smirnov   2019-08-10  483  		gpiod_set_value_cansleep(reset_gpio, 1);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  484  	}
72aa29ce0a59779d Vladimir Barinov 2015-08-28  485  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  486  	spi_set_drvdata(spi, idev);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  487  	mutex_init(&priv->lock);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  488  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  489  	idev->name		= spi_get_device_id(spi)->name;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  490  	idev->modes		= INDIO_DIRECT_MODE;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  491  	idev->info		= &hi8435_info;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  492  	idev->channels		= hi8435_channels;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  493  	idev->num_channels	= ARRAY_SIZE(hi8435_channels);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  494  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  495  	/* unmask all events */
72aa29ce0a59779d Vladimir Barinov 2015-08-28  496  	priv->event_scan_mask = ~(0);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  497  	/*
72aa29ce0a59779d Vladimir Barinov 2015-08-28  498  	 * There is a restriction in the chip - the hysteresis can not be odd.
72aa29ce0a59779d Vladimir Barinov 2015-08-28  499  	 * If the hysteresis is set to odd value then chip gets into lock state
72aa29ce0a59779d Vladimir Barinov 2015-08-28  500  	 * and not functional anymore.
72aa29ce0a59779d Vladimir Barinov 2015-08-28  501  	 * After chip reset the thresholds are in undefined state, so we need to
72aa29ce0a59779d Vladimir Barinov 2015-08-28  502  	 * initialize thresholds to some initial values and then prevent
72aa29ce0a59779d Vladimir Barinov 2015-08-28  503  	 * userspace setting odd hysteresis.
72aa29ce0a59779d Vladimir Barinov 2015-08-28  504  	 *
72aa29ce0a59779d Vladimir Barinov 2015-08-28  505  	 * Set threshold low voltage to 2V, threshold high voltage to 4V
72aa29ce0a59779d Vladimir Barinov 2015-08-28  506  	 * for both GND-Open and Supply-Open sensing modes.
72aa29ce0a59779d Vladimir Barinov 2015-08-28  507  	 */
72aa29ce0a59779d Vladimir Barinov 2015-08-28  508  	priv->threshold_lo[0] = priv->threshold_lo[1] = 2;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  509  	priv->threshold_hi[0] = priv->threshold_hi[1] = 4;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  510  	hi8435_writew(priv, HI8435_GOCENHYS_REG, 0x206);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  511  	hi8435_writew(priv, HI8435_SOCENHYS_REG, 0x206);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  512  
72aa29ce0a59779d Vladimir Barinov 2015-08-28  513  	ret = iio_triggered_event_setup(idev, NULL, hi8435_trigger_handler);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  514  	if (ret)
72aa29ce0a59779d Vladimir Barinov 2015-08-28  515  		return ret;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  516  
ef19ee60f9cf7135 Andrey Smirnov   2019-08-10 @517  	ret = devm_add_action_or_reset(&spi->dev,
ef19ee60f9cf7135 Andrey Smirnov   2019-08-10  518  				       hi8435_triggered_event_cleanup,
ef19ee60f9cf7135 Andrey Smirnov   2019-08-10  519  				       idev);
ef19ee60f9cf7135 Andrey Smirnov   2019-08-10  520  	if (ret)
72aa29ce0a59779d Vladimir Barinov 2015-08-28  521  		return ret;
72aa29ce0a59779d Vladimir Barinov 2015-08-28  522  
ef19ee60f9cf7135 Andrey Smirnov   2019-08-10  523  	return devm_iio_device_register(&spi->dev, idev);
72aa29ce0a59779d Vladimir Barinov 2015-08-28  524  }
72aa29ce0a59779d Vladimir Barinov 2015-08-28  525  

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

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

             reply	other threads:[~2021-03-10  7:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  7:52 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-10 15:38 [RFC PATCH] devres: better type safety with devm_*_action() kernel test robot
2021-03-10 14:08 kernel test robot
2021-03-10 11:17 kernel test robot
2021-03-10 10:46 kernel test robot
2021-03-10  9:19 kernel test robot
2021-03-10  8:58 kernel test robot
2021-03-10  7:37 kernel test robot
2021-03-10  7:00 kernel test robot
2021-03-10  3:53 kernel test robot
2021-03-09 23:59 Rasmus Villemoes
2021-03-18 20:30 ` Rasmus Villemoes
2021-03-18 21:58   ` Kees Cook

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=202103101557.Bt5ByihD-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.