Re: [PATCH 1/3 v7] battery: Add the battery hooking API

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

 



Hi Ognjen,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on platform-drivers-x86/for-next]
[also build test WARNING 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-allmodconfig (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 warnings (new ones prefixed by >>):

   drivers/acpi/battery.c: In function 'acpi_battery_exit':
>> drivers/acpi/battery.c:1532:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (battery_driver_registered)
     ^~
   drivers/acpi/battery.c:1534:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      battery_hook_exit();
      ^~~~~~~~~~~~~~~~~

vim +/if +1532 drivers/acpi/battery.c

^1da177e Linus Torvalds 2005-04-16  1528  
4be44fcd Len Brown      2005-08-05  1529  static void __exit acpi_battery_exit(void)
^1da177e Linus Torvalds 2005-04-16  1530  {
5dfa0c73 Chris Wilson   2016-05-19  1531  	async_synchronize_cookie(async_cookie + 1);
bc39fbcf Hans de Goede  2017-04-19 @1532  	if (battery_driver_registered)
^1da177e Linus Torvalds 2005-04-16  1533  		acpi_bus_unregister_driver(&acpi_battery_driver);
19380b8e Ognjen Galic   2017-12-20  1534  		battery_hook_exit();
3a670cc7 Lan Tianyu     2014-05-04  1535  #ifdef CONFIG_ACPI_PROCFS_POWER
bc39fbcf Hans de Goede  2017-04-19  1536  	if (acpi_battery_dir)
3a670cc7 Lan Tianyu     2014-05-04  1537  		acpi_unlock_battery_dir(acpi_battery_dir);
3a670cc7 Lan Tianyu     2014-05-04  1538  #endif
^1da177e Linus Torvalds 2005-04-16  1539  }
^1da177e Linus Torvalds 2005-04-16  1540  

:::::: The code at line 1532 was first introduced by commit
:::::: bc39fbcf9c782970263bdc5b428e4a755db16efb ACPI / battery: Fix acpi_battery_exit on acpi_battery_init_async errors

:::::: TO: Hans de Goede <hdegoede@xxxxxxxxxx>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux