* [bigeasy-staging:arm-locking-v2 3/4] drivers//of/base.c:821:8: warning: 'node' may be used uninitialized in this function
@ 2019-10-06 1:11 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-10-06 1:11 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-06 1:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-06 1:11 [bigeasy-staging:arm-locking-v2 3/4] drivers//of/base.c:821:8: warning: 'node' may be used uninitialized in this function kbuild test robot
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.