From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [bigeasy-staging:arm-locking-v2 3/4] drivers//of/base.c:821:8: warning: 'node' may be used uninitialized in this function
Date: Sun, 06 Oct 2019 09:11:38 +0800 [thread overview]
Message-ID: <201910060936.hjyZK47h%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4274 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/staging.git arm-locking-v2
head: c6339276cd4a34957bd9ba40e0a415c8755b54aa
commit: ee1a9ea5a47977cc72768b6da279635b9d9b858a [3/4] ARM: Inline locking functions for !PREEMPTION
config: arm-omap2plus_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout ee1a9ea5a47977cc72768b6da279635b9d9b858a
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings
All warnings (new ones prefixed by >>):
drivers//of/base.c: In function 'of_get_next_cpu_node':
>> drivers//of/base.c:821:8: warning: 'node' may be used uninitialized in this function [-Wmaybe-uninitialized]
next = node->child;
~~~~~^~~~~~~~~~~~~
vim +/node +821 drivers//of/base.c
3296193d1421c2 Timur Tabi 2012-08-14 799
f1f207e43b8a49 Rob Herring 2018-08-22 800 /**
f1f207e43b8a49 Rob Herring 2018-08-22 801 * of_get_next_cpu_node - Iterate on cpu nodes
f1f207e43b8a49 Rob Herring 2018-08-22 802 * @prev: previous child of the /cpus node, or NULL to get first
f1f207e43b8a49 Rob Herring 2018-08-22 803 *
f1f207e43b8a49 Rob Herring 2018-08-22 804 * Returns a cpu node pointer with refcount incremented, use of_node_put()
f1f207e43b8a49 Rob Herring 2018-08-22 805 * on it when done. Returns NULL when prev is the last child. Decrements
f1f207e43b8a49 Rob Herring 2018-08-22 806 * the refcount of prev.
f1f207e43b8a49 Rob Herring 2018-08-22 807 */
f1f207e43b8a49 Rob Herring 2018-08-22 808 struct device_node *of_get_next_cpu_node(struct device_node *prev)
f1f207e43b8a49 Rob Herring 2018-08-22 809 {
f1f207e43b8a49 Rob Herring 2018-08-22 810 struct device_node *next = NULL;
f1f207e43b8a49 Rob Herring 2018-08-22 811 unsigned long flags;
f1f207e43b8a49 Rob Herring 2018-08-22 812 struct device_node *node;
f1f207e43b8a49 Rob Herring 2018-08-22 813
f1f207e43b8a49 Rob Herring 2018-08-22 814 if (!prev)
f1f207e43b8a49 Rob Herring 2018-08-22 815 node = of_find_node_by_path("/cpus");
f1f207e43b8a49 Rob Herring 2018-08-22 816
f1f207e43b8a49 Rob Herring 2018-08-22 817 raw_spin_lock_irqsave(&devtree_lock, flags);
f1f207e43b8a49 Rob Herring 2018-08-22 818 if (prev)
f1f207e43b8a49 Rob Herring 2018-08-22 819 next = prev->sibling;
f1f207e43b8a49 Rob Herring 2018-08-22 820 else if (node) {
f1f207e43b8a49 Rob Herring 2018-08-22 @821 next = node->child;
f1f207e43b8a49 Rob Herring 2018-08-22 822 of_node_put(node);
f1f207e43b8a49 Rob Herring 2018-08-22 823 }
f1f207e43b8a49 Rob Herring 2018-08-22 824 for (; next; next = next->sibling) {
f1f207e43b8a49 Rob Herring 2018-08-22 825 if (!(of_node_name_eq(next, "cpu") ||
e8b1dee21420f8 Rob Herring 2018-08-29 826 __of_node_is_type(next, "cpu")))
f1f207e43b8a49 Rob Herring 2018-08-22 827 continue;
f1f207e43b8a49 Rob Herring 2018-08-22 828 if (of_node_get(next))
f1f207e43b8a49 Rob Herring 2018-08-22 829 break;
f1f207e43b8a49 Rob Herring 2018-08-22 830 }
f1f207e43b8a49 Rob Herring 2018-08-22 831 of_node_put(prev);
f1f207e43b8a49 Rob Herring 2018-08-22 832 raw_spin_unlock_irqrestore(&devtree_lock, flags);
f1f207e43b8a49 Rob Herring 2018-08-22 833 return next;
f1f207e43b8a49 Rob Herring 2018-08-22 834 }
f1f207e43b8a49 Rob Herring 2018-08-22 835 EXPORT_SYMBOL(of_get_next_cpu_node);
f1f207e43b8a49 Rob Herring 2018-08-22 836
:::::: The code at line 821 was first introduced by commit
:::::: f1f207e43b8a49ac2ee3c36a64de1f84651c6079 of: Add cpu node iterator for_each_of_cpu_node()
:::::: TO: Rob Herring <robh@kernel.org>
:::::: CC: Rob Herring <robh@kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36906 bytes --]
reply other threads:[~2019-10-06 1:11 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=201910060936.hjyZK47h%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@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.