lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND v2 1/1] power/supply/sbs-battery: Fix confusing battery status when idle or empty
Hi Richard,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.3-rc1 next-20190726]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Richard-Tresidder/power-supply-sbs-battery-Fix-confusing-battery-status-when-idle-or-empty/20190727-031454
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
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
GCC_VERSION=7.4.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

drivers/power//supply/sbs-battery.c: In function 'sbs_status_correct':
>> drivers/power//supply/sbs-battery.c:296:65: error: expected ')' before '{' token
if ((*intval == POWER_SUPPLY_STATUS_DISCHARGING && (ret == 0)) {
^
>> drivers/power//supply/sbs-battery.c:305:1: error: expected expression before '}' token
}
^
>> drivers/power//supply/sbs-battery.c:305:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

vim +296 drivers/power//supply/sbs-battery.c

285
286 static int sbs_status_correct(struct i2c_client *client, int *intval)
287 {
288 int ret;
289
290 ret = sbs_read_word_data(client, sbs_data[REG_CURRENT].addr);
291 if (ret < 0)
292 return ret;
293
294 ret = (s16)ret;
295
> 296 if ((*intval == POWER_SUPPLY_STATUS_DISCHARGING && (ret == 0)) {
297 /* Charging indicator not set in battery */
298 *intval = POWER_SUPPLY_STATUS_IDLE;
299 } else if ((*intval == POWER_SUPPLY_STATUS_FULL) && (ret < 0)) {
300 /* Full Flag set but we are discharging */
301 *intval = POWER_SUPPLY_STATUS_DISCHARGING;
302 }
303
304 return 0;
> 305 }
306

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2019-07-26 22:32    [W:0.048 / U:13.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site