[sre-power-supply:for-next 11/13] drivers/power/supply/bq25890_charger.c:625:54: warning: implicit conversion from 'enum bq25890_fields' to 'enum bq25890_table_ids'

From: kernel test robot
Date: Sun Sep 11 2022 - 16:40:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
head: f52c4d5f0bb486bc515b5f8a56130aea69fb29db
commit: 4a4748f28b0b2547de745ed929e929a9b45563f1 [11/13] power: supply: bq25890: Add support for setting IINLIM
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220912/202209120416.YZ3pmxA0-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git/commit/?id=4a4748f28b0b2547de745ed929e929a9b45563f1
git remote add sre-power-supply https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
git fetch --no-tags sre-power-supply for-next
git checkout 4a4748f28b0b2547de745ed929e929a9b45563f1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/power/supply/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/power/supply/bq25890_charger.c: In function 'bq25890_power_supply_set_property':
>> drivers/power/supply/bq25890_charger.c:625:54: warning: implicit conversion from 'enum bq25890_fields' to 'enum bq25890_table_ids' [-Wenum-conversion]
625 | lval = bq25890_find_idx(val->intval, F_IINLIM);
| ^~~~~~~~


vim +625 drivers/power/supply/bq25890_charger.c

615
616 static int bq25890_power_supply_set_property(struct power_supply *psy,
617 enum power_supply_property psp,
618 const union power_supply_propval *val)
619 {
620 struct bq25890_device *bq = power_supply_get_drvdata(psy);
621 u8 lval;
622
623 switch (psp) {
624 case POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT:
> 625 lval = bq25890_find_idx(val->intval, F_IINLIM);
626 return bq25890_field_write(bq, F_IINLIM, lval);
627 default:
628 return -EINVAL;
629 }
630 }
631

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