[linux-next:master 7091/7526] drivers/iio/accel/adxl367.c:887:2: warning: variable 'handled' is uninitialized when used here

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   196d330d7fb1e7cc0d85641c89ce4602cb36f12e
commit: cbab791c5e2a58c123d84bd9202c054e5449bc96 [7091/7526] iio: accel: add ADXL367 driver
config: hexagon-randconfig-r022-20220223 (https://download.01.org/0day-ci/archive/20220223/202202232151.V9qvCes4-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cbab791c5e2a58c123d84bd9202c054e5449bc96
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout cbab791c5e2a58c123d84bd9202c054e5449bc96
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/iio/accel/

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

All warnings (new ones prefixed by >>):

>> drivers/iio/accel/adxl367.c:887:2: warning: variable 'handled' is uninitialized when used here [-Wuninitialized]
           handled |= adxl367_push_event(indio_dev, status);
           ^~~~~~~
   drivers/iio/accel/adxl367.c:879:14: note: initialize the variable 'handled' to silence this warning
           bool handled;
                       ^
                        = 0
   1 warning generated.


vim +/handled +887 drivers/iio/accel/adxl367.c

   873	
   874	static irqreturn_t adxl367_irq_handler(int irq, void *private)
   875	{
   876		struct iio_dev *indio_dev = private;
   877		struct adxl367_state *st = iio_priv(indio_dev);
   878		u16 fifo_entries;
   879		bool handled;
   880		u8 status;
   881		int ret;
   882	
   883		ret = adxl367_get_status(st, &status, &fifo_entries);
   884		if (ret)
   885			return IRQ_NONE;
   886	
 > 887		handled |= adxl367_push_event(indio_dev, status);
   888		handled |= adxl367_push_fifo_data(indio_dev, status, fifo_entries);
   889	
   890		return handled ? IRQ_HANDLED : IRQ_NONE;
   891	}
   892	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux