All of lore.kernel.org
 help / color / mirror / Atom feed
* [stable:linux-4.9.y 66/1284] drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types)
@ 2020-12-11 14:26 kernel test robot
  2020-12-12 14:21 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: kernel test robot @ 2020-12-11 14:26 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
head:   5d55c2adbefeb2d49d16891ed8ca8d03789fd31b
commit: 980eaca9a409208439c84f7860202d61e31d225f [66/1284] iio:magnetometer:ak8974: Fix alignment and data leak issues
config: nios2-randconfig-s031-20201209 (attached as .config)
compiler: nios2-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-179-ga00755aa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=980eaca9a409208439c84f7860202d61e31d225f
        git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
        git fetch --no-tags stable linux-4.9.y
        git checkout 980eaca9a409208439c84f7860202d61e31d225f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2 

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/magnetometer/ak8974.c:408:16: sparse: sparse: cast to restricted __le16
   drivers/iio/magnetometer/ak8974.c:485:29: sparse: sparse: cast to restricted __le16
>> drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected signed short [usertype] *result @@     got restricted __le16 * @@
   drivers/iio/magnetometer/ak8974.c:511:40: sparse:     expected signed short [usertype] *result
   drivers/iio/magnetometer/ak8974.c:511:40: sparse:     got restricted __le16 *

vim +511 drivers/iio/magnetometer/ak8974.c

   497	
   498	static void ak8974_fill_buffer(struct iio_dev *indio_dev)
   499	{
   500		struct ak8974 *ak8974 = iio_priv(indio_dev);
   501		int ret;
   502	
   503		pm_runtime_get_sync(&ak8974->i2c->dev);
   504		mutex_lock(&ak8974->lock);
   505	
   506		ret = ak8974_trigmeas(ak8974);
   507		if (ret) {
   508			dev_err(&ak8974->i2c->dev, "error triggering measure\n");
   509			goto out_unlock;
   510		}
 > 511		ret = ak8974_getresult(ak8974, ak8974->scan.channels);
   512		if (ret) {
   513			dev_err(&ak8974->i2c->dev, "error getting measures\n");
   514			goto out_unlock;
   515		}
   516	
   517		iio_push_to_buffers_with_timestamp(indio_dev, &ak8974->scan,
   518						   iio_get_time_ns(indio_dev));
   519	
   520	 out_unlock:
   521		mutex_unlock(&ak8974->lock);
   522		pm_runtime_mark_last_busy(&ak8974->i2c->dev);
   523		pm_runtime_put_autosuspend(&ak8974->i2c->dev);
   524	}
   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: 25286 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-12-15  9:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 14:26 [stable:linux-4.9.y 66/1284] drivers/iio/magnetometer/ak8974.c:511:40: sparse: sparse: incorrect type in argument 2 (different base types) kernel test robot
2020-12-12 14:21 ` Linus Walleij
2020-12-14  9:07   ` Jonathan Cameron
2020-12-14  9:17     ` Greg Kroah-Hartman
2020-12-15  9:39       ` Rong Chen

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.