Re: [PATCH v11 06/10] power: bq27xxx_battery: Define access methods to write chip registers

kbuild test robot
2017-03-21T20:55:17Z

[-- Attachment #1: Type: text/plain, Size: 2902 bytes --]

Hi Liam,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.11-rc3 next-20170321]
[cannot apply to battery/master]
[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/Liam-Breck/devicetree-battery-support-and-client-bq27xxx_battery/20170322-041314
config: i386-randconfig-x002-201712 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

Note: the linux-review/Liam-Breck/devicetree-battery-support-and-client-bq27xxx_battery/20170322-041314 HEAD 0e1428c6f71feb34dbef1ed69f5612af92cd1dbb builds fine.
It only hurts bisectibility.

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

>> drivers/power/supply/bq27xxx_battery.c:827:18: warning: 'struct bq27xxx_dm_buf' declared inside parameter list will not be visible outside of this definition or declaration
struct bq27xxx_dm_buf *buf, bool read)
^~~~~~~~~~~~~~
drivers/power/supply/bq27xxx_battery.c: In function 'bq27xxx_xfer':
>> drivers/power/supply/bq27xxx_battery.c:833:22: error: 'BQ27XXX_DM_DATA' undeclared (first use in this function)
if (!di || di->regs[BQ27XXX_DM_DATA] == INVALID_REG_ADDR)
^~~~~~~~~~~~~~~
drivers/power/supply/bq27xxx_battery.c:833:22: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/power/supply/bq27xxx_battery.c:836:47: error: dereferencing pointer to incomplete type 'struct bq27xxx_dm_buf'
ret = xfer(di, di->regs[BQ27XXX_DM_DATA], buf->a, BQ27XXX_DM_SZ);
^~
>> drivers/power/supply/bq27xxx_battery.c:836:52: error: 'BQ27XXX_DM_SZ' undeclared (first use in this function)
ret = xfer(di, di->regs[BQ27XXX_DM_DATA], buf->a, BQ27XXX_DM_SZ);
^~~~~~~~~~~~~

vim +/BQ27XXX_DM_DATA +833 drivers/power/supply/bq27xxx_battery.c

821 di->regs[reg_index], reg_index);
822
823 return ret;
824 }
825
826 static inline int bq27xxx_xfer(struct bq27xxx_device_info *di,
> 827 struct bq27xxx_dm_buf *buf, bool read)
828 {
829 int ret;
830 int (*xfer)(struct bq27xxx_device_info*, u8, u8*, int) =
831 read ? di->bus.read_bulk : di->bus.write_bulk;
832
> 833 if (!di || di->regs[BQ27XXX_DM_DATA] == INVALID_REG_ADDR)
834 return -EINVAL;
835
> 836 ret = xfer(di, di->regs[BQ27XXX_DM_DATA], buf->a, BQ27XXX_DM_SZ);
837 if (ret < 0)
838 dev_dbg(di->dev, "failed to %s_bulk register 0x%02x (index %d)\n",
839 read ? "read" : "write",

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 21215 bytes --]