[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211180657.uEbgHAGn-lkp@intel.com>
Date: Fri, 18 Nov 2022 06:31:03 +0800
From: kernel test robot <lkp@...el.com>
To: ye.xingchen@....com.cn, sre@...nel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH linux-next] power: supply: core: Use
device_match_of_node()
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20221116]
url: https://github.com/intel-lab-lkp/linux/commits/ye-xingchen-zte-com-cn/power-supply-core-Use-device_match_of_node/20221117-153158
patch link: https://lore.kernel.org/r/202211171530030836446%40zte.com.cn
patch subject: [PATCH linux-next] power: supply: core: Use device_match_of_node()
config: hexagon-buildonly-randconfig-r003-20221117
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project bbe6bd724a6335e497c7edaed191d37a828d0390)
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/intel-lab-lkp/linux/commit/894b25157cccad0781bd21bf3990c9f1b51bb6ac
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review ye-xingchen-zte-com-cn/power-supply-core-Use-device_match_of_node/20221117-153158
git checkout 894b25157cccad0781bd21bf3990c9f1b51bb6ac
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/power/supply/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
>> drivers/power/supply/power_supply_core.c:206:27: error: incompatible pointer types passing 'struct power_supply *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
if (device_match_of_node(epsy, np))
^~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/device/bus.h:145:41: note: passing argument to parameter 'dev' here
int device_match_of_node(struct device *dev, const void *np);
^
>> drivers/power/supply/power_supply_core.c:206:27: error: incompatible pointer types passing 'struct power_supply *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
if (device_match_of_node(epsy, np))
^~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/device/bus.h:145:41: note: passing argument to parameter 'dev' here
int device_match_of_node(struct device *dev, const void *np);
^
>> drivers/power/supply/power_supply_core.c:206:27: error: incompatible pointer types passing 'struct power_supply *' to parameter of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
if (device_match_of_node(epsy, np))
^~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
include/linux/device/bus.h:145:41: note: passing argument to parameter 'dev' here
int device_match_of_node(struct device *dev, const void *np);
^
3 errors generated.
vim +206 drivers/power/supply/power_supply_core.c
198
199 static int __power_supply_find_supply_from_node(struct device *dev,
200 void *data)
201 {
202 struct device_node *np = data;
203 struct power_supply *epsy = dev_get_drvdata(dev);
204
205 /* returning non-zero breaks out of class_for_each_device loop */
> 206 if (device_match_of_node(epsy, np))
207 return 1;
208
209 return 0;
210 }
211
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (153030 bytes)
Powered by blists - more mailing lists