Re: [PATCH] iio: core: make iio_device_claim_direct_mode() __must_check

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

 



Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 431c39f6d3edbab14f48dbf37a58ccdc0ac3be1e]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Lechner/iio-core-make-iio_device_claim_direct_mode-__must_check/20241002-233644
base:   431c39f6d3edbab14f48dbf37a58ccdc0ac3be1e
patch link:    https://lore.kernel.org/r/20241002-iio-must-check-claim-direct-v1-1-ab94ce728731%40baylibre.com
patch subject: [PATCH] iio: core: make iio_device_claim_direct_mode() __must_check
config: arm-randconfig-001-20241004 (https://download.01.org/0day-ci/archive/20241004/202410040721.upAHwZJm-lkp@xxxxxxxxx/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project fef3566a25ff0e34fb87339ba5e13eca17cec00f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241004/202410040721.upAHwZJm-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410040721.upAHwZJm-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from drivers/iio/pressure/bmp280-regmap.c:6:
   In file included from drivers/iio/pressure/bmp280.h:5:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/iio/pressure/bmp280-regmap.c:6:
   In file included from drivers/iio/pressure/bmp280.h:7:
>> include/linux/iio/iio.h:669:50: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
     669 | DEFINE_GUARD(iio_claim_direct, struct iio_dev *, iio_device_claim_direct_mode(_T),
         |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
   include/linux/cleanup.h:291:54: note: expanded from macro 'DEFINE_GUARD'
     291 |         DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T); \
         |                                                             ^~~~~
   include/linux/cleanup.h:248:13: note: expanded from macro 'DEFINE_CLASS'
     248 | { _type t = _init; return t; }
         |             ^~~~~
   2 warnings generated.
--
   In file included from drivers/iio/pressure/ms5611_core.c:14:
>> include/linux/iio/iio.h:669:50: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
     669 | DEFINE_GUARD(iio_claim_direct, struct iio_dev *, iio_device_claim_direct_mode(_T),
         |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
   include/linux/cleanup.h:291:54: note: expanded from macro 'DEFINE_GUARD'
     291 |         DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T); \
         |                                                             ^~~~~
   include/linux/cleanup.h:248:13: note: expanded from macro 'DEFINE_CLASS'
     248 | { _type t = _init; return t; }
         |             ^~~~~
   In file included from drivers/iio/pressure/ms5611_core.c:16:
   In file included from include/linux/regulator/consumer.h:35:
   In file included from include/linux/suspend.h:5:
   In file included from include/linux/swap.h:9:
   In file included from include/linux/memcontrol.h:21:
   In file included from include/linux/mm.h:2213:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   2 warnings generated.
--
   In file included from drivers/iio/pressure/mpl115.c:11:
>> include/linux/iio/iio.h:669:50: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
     669 | DEFINE_GUARD(iio_claim_direct, struct iio_dev *, iio_device_claim_direct_mode(_T),
         |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~
   include/linux/cleanup.h:291:54: note: expanded from macro 'DEFINE_GUARD'
     291 |         DEFINE_CLASS(_name, _type, if (_T) { _unlock; }, ({ _lock; _T; }), _type _T); \
         |                                                             ^~~~~
   include/linux/cleanup.h:248:13: note: expanded from macro 'DEFINE_CLASS'
     248 | { _type t = _init; return t; }
         |             ^~~~~
   1 warning generated.


vim +/warn_unused_result +669 include/linux/iio/iio.h

1dae0cb79ceacb Jonathan Cameron 2024-01-28  664  
1dae0cb79ceacb Jonathan Cameron 2024-01-28  665  /*
1dae0cb79ceacb Jonathan Cameron 2024-01-28  666   * This autocleanup logic is normally used via
1dae0cb79ceacb Jonathan Cameron 2024-01-28  667   * iio_device_claim_direct_scoped().
1dae0cb79ceacb Jonathan Cameron 2024-01-28  668   */
1dae0cb79ceacb Jonathan Cameron 2024-01-28 @669  DEFINE_GUARD(iio_claim_direct, struct iio_dev *, iio_device_claim_direct_mode(_T),
1dae0cb79ceacb Jonathan Cameron 2024-01-28  670  	     iio_device_release_direct_mode(_T))
1dae0cb79ceacb Jonathan Cameron 2024-01-28  671  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux