Re: [PATCH v4 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-regulator/for-next]
[also build test ERROR on linus/master v6.5-rc2 next-20230720]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/alina_yu-richtek-com/regulator-dt-bindings-rtq2208-Add-Richtek-RTQ2208-SubPMIC/20230719-172722
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
patch link:    https://lore.kernel.org/r/1689758686-14409-3-git-send-email-alina_yu%40richtek.com
patch subject: [PATCH v4 2/2] regulator: rtq2208: Add Richtek RTQ2208 SubPMIC driver
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20230721/202307210139.6iUpmzwe-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/202307210139.6iUpmzwe-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307210139.6iUpmzwe-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/regulator/rtq2208-regulator.c: In function 'rtq2208_set_ramp_delay':
>> drivers/regulator/rtq2208-regulator.c:154:15: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     154 |         val = FIELD_PREP(RTQ2208_BUCK_RSPUP_MASK, sel) | FIELD_PREP(RTQ2208_BUCK_RSPDN_MASK, sel);
         |               ^~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_PREP +154 drivers/regulator/rtq2208-regulator.c

   124	
   125	static int rtq2208_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
   126	{
   127		const struct regulator_desc *rdesc = rdev->desc;
   128		unsigned int sel = 0, val;
   129	
   130		ramp_delay = max(ramp_delay, RTQ2208_RAMP_VALUE_MIN_uV);
   131		ramp_delay = min(ramp_delay, RTQ2208_RAMP_VALUE_MAX_uV);
   132	
   133		ramp_delay /= RTQ2208_RAMP_VALUE_MIN_uV;
   134	
   135		/*
   136		 * fls(ramp_delay) - 1: doing LSB shift, let it starts from 0
   137		 *
   138		 * RTQ2208_BUCK_RAMP_SEL_MASK - sel: doing descending order shifting.
   139		 * Because the relation of seleltion and value is like that
   140		 *
   141		 * seletion: value
   142		 * 000: 64mv
   143		 * 001: 32mv
   144		 * ...
   145		 * 111: 0.5mv
   146		 *
   147		 * For example, if I would like to select 64mv, the fls(ramp_delay) - 1 will be 0b111,
   148		 * and I need to use 0b111 - sel to do the shifting
   149		 */
   150	
   151		sel = fls(ramp_delay) - 1;
   152		sel = RTQ2208_BUCK_RAMP_SEL_MASK - sel;
   153	
 > 154		val = FIELD_PREP(RTQ2208_BUCK_RSPUP_MASK, sel) | FIELD_PREP(RTQ2208_BUCK_RSPDN_MASK, sel);
   155	
   156		return regmap_update_bits(rdev->regmap, rdesc->ramp_reg,
   157					  RTQ2208_BUCK_RSPUP_MASK | RTQ2208_BUCK_RSPDN_MASK, val);
   158	}
   159	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux