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-20200825]
[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: x86_64-randconfig-a016-20200825 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
77e5a195f818b9ace91f7b12ab948b21d7918238)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All errors (new ones prefixed by >>):

>> drivers/power/supply/qcom_smbb.c:746:15: error: cannot assign to variable 
>> 'val' with const-qualified type 'const union power_supply_propval *'
                   val->intval = min(val->intval, bat_imax)
                   ~~~~~~~~~~~ ^
   drivers/power/supply/qcom_smbb.c:724:37: note: variable 'val' declared const 
here
                   const union power_supply_propval *val)
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   1 error generated.

# 
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 +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-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

Reply via email to