Re: [PATCH 2/3 v7] thinkpad_acpi: Add support for battery thresholds

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

 



Hi Ognjen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on platform-drivers-x86/for-next]
[also build test ERROR on v4.15-rc4 next-20171222]
[cannot apply to pm/linux-next]
[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/Ognjen-Galic/battery-Add-the-battery-hooking-API/20171223-144855
base:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git for-next
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/list.h:9:0,
                    from include/linux/module.h:9,
                    from drivers/power/supply/ds2780_battery.c:16:
>> include/linux/kernel.h:928:42: error: expected identifier or '(' before '{' token
    #define container_of(ptr, type, member) ({    \
                                             ^
   include/linux/power_supply.h:374:33: note: in expansion of macro 'container_of'
    #define to_power_supply(device) container_of(device, struct power_supply, dev)
                                    ^~~~~~~~~~~~
   drivers/power/supply/ds2780_battery.c:59:36: note: in expansion of macro 'to_power_supply'
    static inline struct power_supply *to_power_supply(struct device *dev)
                                       ^~~~~~~~~~~~~~~
--
   In file included from include/linux/list.h:9:0,
                    from include/linux/module.h:9,
                    from drivers/power/supply/ds2781_battery.c:14:
>> include/linux/kernel.h:928:42: error: expected identifier or '(' before '{' token
    #define container_of(ptr, type, member) ({    \
                                             ^
   include/linux/power_supply.h:374:33: note: in expansion of macro 'container_of'
    #define to_power_supply(device) container_of(device, struct power_supply, dev)
                                    ^~~~~~~~~~~~
   drivers/power/supply/ds2781_battery.c:57:36: note: in expansion of macro 'to_power_supply'
    static inline struct power_supply *to_power_supply(struct device *dev)
                                       ^~~~~~~~~~~~~~~
--
   In file included from include/linux/list.h:9:0,
                    from include/linux/module.h:9,
                    from drivers/power//supply/ds2780_battery.c:16:
>> include/linux/kernel.h:928:42: error: expected identifier or '(' before '{' token
    #define container_of(ptr, type, member) ({    \
                                             ^
   include/linux/power_supply.h:374:33: note: in expansion of macro 'container_of'
    #define to_power_supply(device) container_of(device, struct power_supply, dev)
                                    ^~~~~~~~~~~~
   drivers/power//supply/ds2780_battery.c:59:36: note: in expansion of macro 'to_power_supply'
    static inline struct power_supply *to_power_supply(struct device *dev)
                                       ^~~~~~~~~~~~~~~
--
   In file included from include/linux/list.h:9:0,
                    from include/linux/module.h:9,
                    from drivers/power//supply/ds2781_battery.c:14:
>> include/linux/kernel.h:928:42: error: expected identifier or '(' before '{' token
    #define container_of(ptr, type, member) ({    \
                                             ^
   include/linux/power_supply.h:374:33: note: in expansion of macro 'container_of'
    #define to_power_supply(device) container_of(device, struct power_supply, dev)
                                    ^~~~~~~~~~~~
   drivers/power//supply/ds2781_battery.c:57:36: note: in expansion of macro 'to_power_supply'
    static inline struct power_supply *to_power_supply(struct device *dev)
                                       ^~~~~~~~~~~~~~~

vim +928 include/linux/kernel.h

^1da177e4 Linus Torvalds 2005-04-16  911  
91f68b735 Wu Fengguang   2009-01-07  912  
e8c97af0c Randy Dunlap   2017-10-13  913  /**
e8c97af0c Randy Dunlap   2017-10-13  914   * swap - swap values of @a and @b
e8c97af0c Randy Dunlap   2017-10-13  915   * @a: first value
e8c97af0c Randy Dunlap   2017-10-13  916   * @b: second value
91f68b735 Wu Fengguang   2009-01-07  917   */
ac7b90049 Peter Zijlstra 2009-02-04  918  #define swap(a, b) \
ac7b90049 Peter Zijlstra 2009-02-04  919  	do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
91f68b735 Wu Fengguang   2009-01-07  920  
^1da177e4 Linus Torvalds 2005-04-16  921  /**
^1da177e4 Linus Torvalds 2005-04-16  922   * container_of - cast a member of a structure out to the containing structure
^1da177e4 Linus Torvalds 2005-04-16  923   * @ptr:	the pointer to the member.
^1da177e4 Linus Torvalds 2005-04-16  924   * @type:	the type of the container struct this is embedded in.
^1da177e4 Linus Torvalds 2005-04-16  925   * @member:	the name of the member within the struct.
^1da177e4 Linus Torvalds 2005-04-16  926   *
^1da177e4 Linus Torvalds 2005-04-16  927   */
^1da177e4 Linus Torvalds 2005-04-16 @928  #define container_of(ptr, type, member) ({				\
c7acec713 Ian Abbott     2017-07-12  929  	void *__mptr = (void *)(ptr);					\
c7acec713 Ian Abbott     2017-07-12  930  	BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&	\
c7acec713 Ian Abbott     2017-07-12  931  			 !__same_type(*(ptr), void),			\
c7acec713 Ian Abbott     2017-07-12  932  			 "pointer type mismatch in container_of()");	\
c7acec713 Ian Abbott     2017-07-12  933  	((type *)(__mptr - offsetof(type, member))); })
^1da177e4 Linus Torvalds 2005-04-16  934  

:::::: The code at line 928 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux