From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux ACPI <linux-acpi@vger.kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
LKML <linux-kernel@vger.kernel.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH] ACPI: LPSS: Use ACPI_COMPANION() directly
Date: Sun, 10 Oct 2021 02:35:07 +0800 [thread overview]
Message-ID: <202110100253.EvYllrqA-lkp@intel.com> (raw)
In-Reply-To: <4687529.31r3eYUQgx@kreacher>
[-- Attachment #1: Type: text/plain, Size: 4614 bytes --]
Hi "Rafael,
I love your patch! Perhaps something to improve:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on v5.15-rc4 next-20211008]
[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/Rafael-J-Wysocki/ACPI-LPSS-Use-ACPI_COMPANION-directly/20211009-222505
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-a013-20211009 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 30caca39f401ae17927439c0a0bd6d1b1916dd6a)
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
# https://github.com/0day-ci/linux/commit/6fd0aa7da4af33b790cf8e5a943fe2795a8f215a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Rafael-J-Wysocki/ACPI-LPSS-Use-ACPI_COMPANION-directly/20211009-222505
git checkout 6fd0aa7da4af33b790cf8e5a943fe2795a8f215a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
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/acpi/acpi_lpss.c:729:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (WARN_ON(!pdata || !pdata->mmio_base)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:120:28: note: expanded from macro 'WARN_ON'
#define WARN_ON(condition) ({ \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/acpi_lpss.c:737:9: note: uninitialized use occurs here
return ret;
^~~
drivers/acpi/acpi_lpss.c:729:2: note: remove the 'if' if its condition is always true
if (WARN_ON(!pdata || !pdata->mmio_base)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/acpi/acpi_lpss.c:718:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +729 drivers/acpi/acpi_lpss.c
1a8f83515c1646 Rafael J. Wysocki 2014-02-11 712
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 713 static int lpss_reg_read(struct device *dev, unsigned int reg, u32 *val)
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 714 {
6fd0aa7da4af33 Rafael J. Wysocki 2021-10-09 715 struct acpi_device *adev = ACPI_COMPANION(dev);
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 716 struct lpss_private_data *pdata;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 717 unsigned long flags;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 718 int ret;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 719
6fd0aa7da4af33 Rafael J. Wysocki 2021-10-09 720 if (WARN_ON(!adev))
6fd0aa7da4af33 Rafael J. Wysocki 2021-10-09 721 return -ENODEV;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 722
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 723 spin_lock_irqsave(&dev->power.lock, flags);
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 724 if (pm_runtime_suspended(dev)) {
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 725 ret = -EAGAIN;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 726 goto out;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 727 }
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 728 pdata = acpi_driver_data(adev);
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 @729 if (WARN_ON(!pdata || !pdata->mmio_base)) {
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 730 ret = -ENODEV;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 731 goto out;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 732 }
1a8f83515c1646 Rafael J. Wysocki 2014-02-11 733 *val = __lpss_reg_read(pdata, reg);
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 734
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 735 out:
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 736 spin_unlock_irqrestore(&dev->power.lock, flags);
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 737 return ret;
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 738 }
2e0f8822d1a6d8 Rafael J. Wysocki 2013-03-06 739
---
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: 31465 bytes --]
prev parent reply other threads:[~2021-10-09 18:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-09 14:23 Rafael J. Wysocki
2021-10-09 18:35 ` kernel test robot [this message]
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=202110100253.EvYllrqA-lkp@intel.com \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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
all inboxes | Powered by JetHome®