lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202008251641.9LZ2yIEE%lkp@intel.com>
Date:   Tue, 25 Aug 2020 16:51:21 +0800
From:   kernel test robot <lkp@...el.com>
To:     Qiwu Huang <yanziily@...il.com>, sre@...nel.org
Cc:     kbuild-all@...ts.01.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        Qiwu Huang <huangqiwu@...omi.com>
Subject: Re: [PATCH v9 1/4] power: supply: core: add quick charge type
 property

Hi Qiwu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on power-supply/for-next]
[also build test ERROR on linux/master linus/master v5.9-rc2 next-20200824]
[cannot apply to battery/master]
[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/0day-ci/linux/commits/Qiwu-Huang/add-some-power-supply-properties-about-wireless-wired-charging/20200825-144140
base:   https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
config: mips-allyesconfig (attached as .config)
compiler: mips-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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

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

All errors (new ones prefixed by >>):

   drivers/power/supply/qcom_smbb.c: In function 'smbb_battery_set_property':
>> drivers/power/supply/qcom_smbb.c:746:15: error: assignment of member 'intval' in read-only object
     746 |   val->intval = min(val->intval, bat_imax)
         |               ^
>> drivers/power/supply/qcom_smbb.c:747:3: error: expected ';' before 'rc'
     747 |   rc = smbb_charger_attr_write(chg, ATTR_BAT_IMAX, val->intval);
         |   ^~

# https://github.com/0day-ci/linux/commit/2a1fea164283b387b06e51d0dc66555b46e3aabe
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Qiwu-Huang/add-some-power-supply-properties-about-wireless-wired-charging/20200825-144140
git checkout 2a1fea164283b387b06e51d0dc66555b46e3aabe
vim +/intval +746 drivers/power/supply/qcom_smbb.c

   721	
   722	static int smbb_battery_set_property(struct power_supply *psy,
   723			enum power_supply_property psp,
   724			const union power_supply_propval *val)
   725	{
   726		struct smbb_charger *chg = power_supply_get_drvdata(psy);
   727		int charger_type, bat_imax;
   728		int rc;
   729	
   730		switch (psp) {
   731		case POWER_SUPPLY_PROP_CURRENT_MAX:
   732			charger_type = get_quick_charge_type(chg);
   733			if (charger_type == QUICK_CHARGE_NORMAL)
   734				bat_imax = IMAX_NORMAL;
   735			else if (charger_type == QUICK_CHARGE_FAST)
   736				bat_imax = IMAX_FAST;
   737			else if (charger_type == QUICK_CHARGE_FLASH)
   738				bat_imax = IMAX_FLASH;
   739			else if (charger_type == QUICK_CHARGE_TURBE)
   740				bat_imax = IMAX_TURBE;
   741			else if (charger_type == QUICK_CHARGE_SUPER)
   742				bat_imax = IMAX_SUPER;
   743			else
   744				bat_imax = IMAX_NORMAL;
   745	
 > 746			val->intval = min(val->intval, bat_imax)
 > 747			rc = smbb_charger_attr_write(chg, ATTR_BAT_IMAX, val->intval);
   748			break;
   749		case POWER_SUPPLY_PROP_VOLTAGE_MAX:
   750			rc = smbb_charger_attr_write(chg, ATTR_BAT_VMAX, val->intval);
   751			break;
   752		default:
   753			rc = -EINVAL;
   754			break;
   755		}
   756	
   757		return rc;
   758	}
   759	

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

Download attachment ".config.gz" of type "application/gzip" (67051 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ