public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH] power/supply/olpc_battery: Hold the reference returned by of_find_compatible_node
       [not found] <20220621072408.4080461-1-windhl@126.com>
@ 2022-06-21 13:53 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-21 13:53 UTC (permalink / raw)
  To: Liang He, sre, linux-pm; +Cc: llvm, kbuild-all

Hi Liang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on sre-power-supply/for-next]
[also build test ERROR on linus/master v5.19-rc3 next-20220621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Liang-He/power-supply-olpc_battery-Hold-the-reference-returned-by-of_find_compatible_node/20220621-152751
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
config: hexagon-randconfig-r041-20220621 (https://download.01.org/0day-ci/archive/20220621/202206212155.CveAC2KI-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project af6d2a0b6825e71965f3e2701a63c239fa0ad70f)
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/911b0892099263f0acd11bd5ae75509f9ac677db
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Liang-He/power-supply-olpc_battery-Hold-the-reference-returned-by-of_find_compatible_node/20220621-152751
        git checkout 911b0892099263f0acd11bd5ae75509f9ac677db
        # 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@intel.com>

All errors (new ones prefixed by >>):

>> drivers/power/supply/olpc_battery.c:653:60: error: expected ';' after expression
           np = of_find_compatible_node(NULL, NULL, "olpc,xo1.75-ec")
                                                                     ^
                                                                     ;
   1 error generated.


vim +653 drivers/power/supply/olpc_battery.c

   632	
   633	static int olpc_battery_probe(struct platform_device *pdev)
   634	{
   635		struct power_supply_config bat_psy_cfg = {};
   636		struct power_supply_config ac_psy_cfg = {};
   637		struct olpc_battery_data *data;
   638		struct device_node *np;
   639		uint8_t status;
   640		uint8_t ecver;
   641		int ret;
   642	
   643		data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
   644		if (!data)
   645			return -ENOMEM;
   646		platform_set_drvdata(pdev, data);
   647	
   648		/* See if the EC is already there and get the EC revision */
   649		ret = olpc_ec_cmd(EC_FIRMWARE_REV, NULL, 0, &ecver, 1);
   650		if (ret)
   651			return ret;
   652	
 > 653		np = of_find_compatible_node(NULL, NULL, "olpc,xo1.75-ec")
   654		if (np) {
   655			of_node_put(np);
   656			/* XO 1.75 */
   657			data->new_proto = true;
   658			data->little_endian = true;
   659		} else if (ecver > 0x44) {
   660			/* XO 1 or 1.5 with a new EC firmware. */
   661			data->new_proto = true;
   662		} else if (ecver < 0x44) {
   663			/*
   664			 * We've seen a number of EC protocol changes; this driver
   665			 * requires the latest EC protocol, supported by 0x44 and above.
   666			 */
   667			printk(KERN_NOTICE "OLPC EC version 0x%02x too old for "
   668				"battery driver.\n", ecver);
   669			return -ENXIO;
   670		}
   671	
   672		ret = olpc_ec_cmd(EC_BAT_STATUS, NULL, 0, &status, 1);
   673		if (ret)
   674			return ret;
   675	
   676		/* Ignore the status. It doesn't actually matter */
   677	
   678		ac_psy_cfg.of_node = pdev->dev.of_node;
   679		ac_psy_cfg.drv_data = data;
   680	
   681		data->olpc_ac = devm_power_supply_register(&pdev->dev, &olpc_ac_desc,
   682									&ac_psy_cfg);
   683		if (IS_ERR(data->olpc_ac))
   684			return PTR_ERR(data->olpc_ac);
   685	
   686		if (of_device_is_compatible(pdev->dev.of_node, "olpc,xo1.5-battery")) {
   687			/* XO-1.5 */
   688			olpc_bat_desc.properties = olpc_xo15_bat_props;
   689			olpc_bat_desc.num_properties = ARRAY_SIZE(olpc_xo15_bat_props);
   690		} else {
   691			/* XO-1 */
   692			olpc_bat_desc.properties = olpc_xo1_bat_props;
   693			olpc_bat_desc.num_properties = ARRAY_SIZE(olpc_xo1_bat_props);
   694		}
   695	
   696		bat_psy_cfg.of_node = pdev->dev.of_node;
   697		bat_psy_cfg.drv_data = data;
   698		bat_psy_cfg.attr_grp = olpc_bat_sysfs_groups;
   699	
   700		data->olpc_bat = devm_power_supply_register(&pdev->dev, &olpc_bat_desc,
   701									&bat_psy_cfg);
   702		if (IS_ERR(data->olpc_bat))
   703			return PTR_ERR(data->olpc_bat);
   704	
   705		if (olpc_ec_wakeup_available()) {
   706			device_set_wakeup_capable(&data->olpc_ac->dev, true);
   707			device_set_wakeup_capable(&data->olpc_bat->dev, true);
   708		}
   709	
   710		return 0;
   711	}
   712	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-21 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20220621072408.4080461-1-windhl@126.com>
2022-06-21 13:53 ` [PATCH] power/supply/olpc_battery: Hold the reference returned by of_find_compatible_node kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox