From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [linux-next:master 4010/5792] drivers/acpi/scan.c:615:35: warning: Uninitialized variable: acpi_device_bus_id->bus_id [uninitvar]
Date: Tue, 28 Jun 2022 01:25:49 +0800 [thread overview]
Message-ID: <202206280117.WjAtAcb5-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2789 bytes --]
::::::
:::::: Manual check reason: "low confidence static check warning: drivers/acpi/scan.c:615:35: warning: Uninitialized variable: acpi_device_bus_id->bus_id [uninitvar]"
::::::
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "Rafael J. Wysocki" <rjw@rjwysocki.net>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: aab35c3d5112df6e329a1a5a5a1881e5c4ca3821
commit: a976a2ac7708c63257d42707c8423047136797a0 [4010/5792] ACPI: scan: Walk ACPI device's children using driver core
:::::: branch date: 11 hours ago
:::::: commit date: 6 days ago
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout a976a2ac7708c63257d42707c8423047136797a0
cppcheck --quiet --enable=style,performance,portability --template=gcc FILE
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/acpi/scan.c:615:35: warning: Uninitialized variable: acpi_device_bus_id->bus_id [uninitvar]
if (!strcmp(acpi_device_bus_id->bus_id, dev_id))
^
vim +615 drivers/acpi/scan.c
78ea4639a7647f Rafael J. Wysocki 2014-02-04 608
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 609 static struct acpi_device_bus_id *acpi_device_bus_id_match(const char *dev_id)
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 610 {
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 611 struct acpi_device_bus_id *acpi_device_bus_id;
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 612
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 613 /* Find suitable bus_id and instance number in acpi_bus_id_list. */
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 614 list_for_each_entry(acpi_device_bus_id, &acpi_bus_id_list, node) {
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 @615 if (!strcmp(acpi_device_bus_id->bus_id, dev_id))
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 616 return acpi_device_bus_id;
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 617 }
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 618 return NULL;
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 619 }
c1013ff7a5472d Rafael J. Wysocki 2021-01-14 620
:::::: The code at line 615 was first introduced by commit
:::::: c1013ff7a5472db637c56bb6237f8343398c03a7 ACPI: scan: Rearrange memory allocation in acpi_device_add()
:::::: TO: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-06-27 17:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202206280117.WjAtAcb5-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.