Re: [PATCH] add support for battery charging threshold, mute. correctly save ac/dc brightness to hardware registers

From: kernel test robot
Date: Wed Aug 19 2020 - 18:33:05 EST


Hi Kenneth,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.9-rc1 next-20200819]
[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]

url: https://github.com/0day-ci/linux/commits/Kenneth-Chan/add-support-for-battery-charging-threshold-mute-correctly-save-ac-dc-brightness-to-hardware-registers/20200819-020600
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c
config: x86_64-randconfig-a014-20200819 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b34b1e38381fa4d1b1d9751a6b5233b68e734cfe)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/platform/x86/panasonic-laptop.c:667:15: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if (val >= 0 || val <= 255) {
~~~~~~~~~^~~~~~~~~~~~~
drivers/platform/x86/panasonic-laptop.c:697:15: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if (val >= 0 || val <= 255) {
~~~~~~~~~^~~~~~~~~~~~~
drivers/platform/x86/panasonic-laptop.c:728:15: warning: overlapping comparisons always evaluate to true [-Wtautological-overlap-compare]
if (val >= 0 || val <= 255) {
~~~~~~~~~^~~~~~~~~~~~~
3 warnings generated.

# https://github.com/0day-ci/linux/commit/1f9eb2351cf22424f1ca39f5068c51fe74189aba
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kenneth-Chan/add-support-for-battery-charging-threshold-mute-correctly-save-ac-dc-brightness-to-hardware-registers/20200819-020600
git checkout 1f9eb2351cf22424f1ca39f5068c51fe74189aba
vim +667 drivers/platform/x86/panasonic-laptop.c

656
657 static ssize_t ac_brightness_store(struct device *dev, struct device_attribute *attr,
658 const char *buf, size_t count)
659 {
660 struct acpi_device *acpi = to_acpi_device(dev);
661 struct pcc_acpi *pcc = acpi_driver_data(acpi);
662 int err, val;
663
664 err = kstrtoint(buf, 0, &val);
665 if (err)
666 return err;
> 667 if (val >= 0 || val <= 255) {
668 acpi_pcc_write_sset(pcc, SINF_AC_CUR_BRIGHT, val);
669 pcc->ac_brightness = val;
670 }
671
672 return count;
673 }
674

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip