[xlnx:master 221/263] include/linux/regmap.h:844:27: warning: 'regmap' may be used uninitialized in this function
From: kernel test robot <hidden>
Date: 2021-01-21 12:44:15
Also in:
oe-kbuild-all
Hi Raviteja, FYI, the error/warning still remains. tree: https://github.com/Xilinx/linux-xlnx master head: 7c8625b503843648c9d106c1d34fca86f6e1e47b commit: b47e0193da3feb90d4f2f823422d84fbbc6545c7 [221/263] regulator: da9121: Use gpio descriptors instead of numbers config: nios2-allyesconfig (attached as .config) compiler: nios2-linux-gcc (GCC) 9.3.0 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://github.com/Xilinx/linux-xlnx/commit/b47e0193da3feb90d4f2f823422d84fbbc6545c7 git remote add xlnx https://github.com/Xilinx/linux-xlnx git fetch --no-tags xlnx master git checkout b47e0193da3feb90d4f2f823422d84fbbc6545c7 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> Note: it may well be a FALSE warning. FWIW you are at least aware of it now. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings All warnings (new ones prefixed by >>): drivers/regulator/da9121-regulator.c: In function 'da9121_handle_notifier': drivers/regulator/da9121-regulator.c:748:14: error: passing argument 1 of 'mutex_lock' from incompatible pointer type [-Werror=incompatible-pointer-types] 748 | mutex_lock(&rdev->mutex); | ^~~~~~~~~~~~ | | | struct ww_mutex * In file included from include/linux/kernfs.h:12, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from include/linux/i2c.h:13, from drivers/regulator/da9121-regulator.c:20: include/linux/mutex.h:165:38: note: expected 'struct mutex *' but argument is of type 'struct ww_mutex *' 165 | extern void mutex_lock(struct mutex *lock); | ~~~~~~~~~~~~~~^~~~ drivers/regulator/da9121-regulator.c:750:16: error: passing argument 1 of 'mutex_unlock' from incompatible pointer type [-Werror=incompatible-pointer-types] 750 | mutex_unlock(&rdev->mutex); | ^~~~~~~~~~~~ | | | struct ww_mutex * In file included from include/linux/kernfs.h:12, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from include/linux/i2c.h:13, from drivers/regulator/da9121-regulator.c:20: include/linux/mutex.h:184:40: note: expected 'struct mutex *' but argument is of type 'struct ww_mutex *' 184 | extern void mutex_unlock(struct mutex *lock); | ~~~~~~~~~~~~~~^~~~ In file included from drivers/regulator/da9121-regulator.c:26: drivers/regulator/da9121-regulator.c: In function 'da9121_i2c_probe':
quoted
include/linux/regmap.h:844:27: warning: 'regmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
844 | __regmap_lockdep_wrapper(__devm_regmap_init_i2c, #config, \
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/da9121-regulator.c:1250:24: note: 'regmap' was declared here
1250 | struct regmap_config *regmap;
| ^~~~~~
cc1: some warnings being treated as errors
vim +/regmap +844 include/linux/regmap.h
c0eb46766d395da8 Mark Brown 2012-01-30 801
7c22ce6e218403fc Vinod Koul 2018-01-08 802 /**
7c22ce6e218403fc Vinod Koul 2018-01-08 803 * regmap_init_sdw() - Initialise register map
7c22ce6e218403fc Vinod Koul 2018-01-08 804 *
7c22ce6e218403fc Vinod Koul 2018-01-08 805 * @sdw: Device that will be interacted with
7c22ce6e218403fc Vinod Koul 2018-01-08 806 * @config: Configuration for register map
7c22ce6e218403fc Vinod Koul 2018-01-08 807 *
7c22ce6e218403fc Vinod Koul 2018-01-08 808 * The return value will be an ERR_PTR() on error or a valid pointer to
7c22ce6e218403fc Vinod Koul 2018-01-08 809 * a struct regmap.
7c22ce6e218403fc Vinod Koul 2018-01-08 810 */
7c22ce6e218403fc Vinod Koul 2018-01-08 811 #define regmap_init_sdw(sdw, config) \
7c22ce6e218403fc Vinod Koul 2018-01-08 812 __regmap_lockdep_wrapper(__regmap_init_sdw, #config, \
7c22ce6e218403fc Vinod Koul 2018-01-08 813 sdw, config)
7c22ce6e218403fc Vinod Koul 2018-01-08 814
7c22ce6e218403fc Vinod Koul 2018-01-08 815
1ed8111443ae8caa Nicolas Boichat 2015-08-11 816 /**
2cf8e2dfdf883634 Charles Keepax 2017-01-12 817 * devm_regmap_init() - Initialise managed register map
1ed8111443ae8caa Nicolas Boichat 2015-08-11 818 *
1ed8111443ae8caa Nicolas Boichat 2015-08-11 819 * @dev: Device that will be interacted with
1ed8111443ae8caa Nicolas Boichat 2015-08-11 820 * @bus: Bus-specific callbacks to use with device
1ed8111443ae8caa Nicolas Boichat 2015-08-11 821 * @bus_context: Data passed to bus-specific callbacks
1ed8111443ae8caa Nicolas Boichat 2015-08-11 822 * @config: Configuration for register map
1ed8111443ae8caa Nicolas Boichat 2015-08-11 823 *
1ed8111443ae8caa Nicolas Boichat 2015-08-11 824 * The return value will be an ERR_PTR() on error or a valid pointer
1ed8111443ae8caa Nicolas Boichat 2015-08-11 825 * to a struct regmap. This function should generally not be called
1ed8111443ae8caa Nicolas Boichat 2015-08-11 826 * directly, it should be called by bus-specific init functions. The
1ed8111443ae8caa Nicolas Boichat 2015-08-11 827 * map will be automatically freed by the device management code.
1ed8111443ae8caa Nicolas Boichat 2015-08-11 828 */
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 829 #define devm_regmap_init(dev, bus, bus_context, config) \
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 830 __regmap_lockdep_wrapper(__devm_regmap_init, #config, \
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 831 dev, bus, bus_context, config)
1ed8111443ae8caa Nicolas Boichat 2015-08-11 832
1ed8111443ae8caa Nicolas Boichat 2015-08-11 833 /**
2cf8e2dfdf883634 Charles Keepax 2017-01-12 834 * devm_regmap_init_i2c() - Initialise managed register map
1ed8111443ae8caa Nicolas Boichat 2015-08-11 835 *
1ed8111443ae8caa Nicolas Boichat 2015-08-11 836 * @i2c: Device that will be interacted with
1ed8111443ae8caa Nicolas Boichat 2015-08-11 837 * @config: Configuration for register map
1ed8111443ae8caa Nicolas Boichat 2015-08-11 838 *
1ed8111443ae8caa Nicolas Boichat 2015-08-11 839 * The return value will be an ERR_PTR() on error or a valid pointer
1ed8111443ae8caa Nicolas Boichat 2015-08-11 840 * to a struct regmap. The regmap will be automatically freed by the
1ed8111443ae8caa Nicolas Boichat 2015-08-11 841 * device management code.
1ed8111443ae8caa Nicolas Boichat 2015-08-11 842 */
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 843 #define devm_regmap_init_i2c(i2c, config) \
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 @844 __regmap_lockdep_wrapper(__devm_regmap_init_i2c, #config, \
3cfe7a74d42b7e36 Nicolas Boichat 2015-07-08 845 i2c, config)
1ed8111443ae8caa Nicolas Boichat 2015-08-11 846
:::::: The code at line 844 was first introduced by commit
:::::: 3cfe7a74d42b7e3644f8b2b26aa20146d4f90f0f regmap: Use different lockdep class for each regmap init call
:::::: TO: Nicolas Boichat [off-list ref]
:::::: CC: Mark Brown [off-list ref]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 51572 bytes
- (unnamed) [text/plain] 176 bytes · preview