From: kernel test robot <lkp@intel.com>
To: Kenneth Chan <kenneth.t.chan@gmail.com>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, laforge@gnumonks.org,
Kenneth Chan <kenneth.t.chan@gmail.com>
Subject: Re: [PATCH] add support for battery charging threshold, mute. correctly save ac/dc brightness to hardware registers
Date: Wed, 19 Aug 2020 04:00:00 +0800 [thread overview]
Message-ID: <202008190341.4mmfp9Uw%lkp@intel.com> (raw)
In-Reply-To: <20200818180223.14282-1-kenneth.t.chan@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3165 bytes --]
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-20200818]
[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-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/platform/x86/panasonic-laptop.c: In function 'eco_mode_store':
>> drivers/platform/x86/panasonic-laptop.c:602:11: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
602 | int err, rc, state;
| ^~
# 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 +/rc +602 drivers/platform/x86/panasonic-laptop.c
596
597 static ssize_t eco_mode_store(struct device *dev, struct device_attribute *attr,
598 const char *buf, size_t count)
599 {
600 struct acpi_device *acpi = to_acpi_device(dev);
601 struct pcc_acpi *pcc = acpi_driver_data(acpi);
> 602 int err, rc, state;
603
604 union acpi_object param[2];
605 struct acpi_object_list input;
606 acpi_status status;
607
608 param[0].type = ACPI_TYPE_INTEGER;
609 param[0].integer.value = 0x15;
610 param[1].type = ACPI_TYPE_INTEGER;
611 input.count = 2;
612 input.pointer = param;
613
614 err = kstrtoint(buf, 0, &state);
615 if (err)
616 return err;
617
618 switch (state) {
619 case 0:
620 param[1].integer.value = ECO_MODE_OFF;
621 pcc->sinf[SINF_ECO_MODE] = 0;
622 pcc->eco_mode = 0;
623 break;
624 case 1:
625 param[1].integer.value = ECO_MODE_ON;
626 pcc->sinf[SINF_ECO_MODE] = 1;
627 pcc->eco_mode = 1;
628 break;
629 default:
630 /* nothing to do */
631 rc = -EIO;
632 break;
633 }
634
635 status = acpi_evaluate_object(NULL, METHOD_ECWR,
636 &input, NULL);
637 if (ACPI_FAILURE(status)) {
638 pr_err("%s evaluation failed\n", METHOD_ECWR);
639 return -EINVAL;
640 }
641
642 return count;
643 }
644
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 75208 bytes --]
next prev parent reply other threads:[~2020-08-18 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-18 18:02 [PATCH] add support for battery charging threshold, mute. correctly save ac/dc brightness to hardware registers Kenneth Chan
2020-08-18 20:00 ` kernel test robot [this message]
2020-08-19 7:50 ` Andy Shevchenko
2020-08-19 22:31 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202008190341.4mmfp9Uw%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=kenneth.t.chan@gmail.com \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).