[v7] powerpc/powernv: add hdat attribute to sysfs
kbuild test robot
lkp at intel.com
Fri Mar 24 23:37:33 AEDT 2017
Hi Matt,
[auto build test ERROR on powerpc/next]
[also build test ERROR on v4.11-rc3 next-20170324]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Matt-Brown/powerpc-powernv-add-hdat-attribute-to-sysfs/20170324-191306
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=powerpc
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 errors (new ones prefixed by >>):
arch/powerpc/platforms/powernv/opal.c: In function '__machine_initcall_powernv_opal_init':
>> arch/powerpc/platforms/powernv/opal.c:651:12: error: 'attr_name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
attr_name[n] = kstrdup(prop->name, GFP_KERNEL);
^
arch/powerpc/platforms/powernv/opal.c:618:9: note: 'attr_name' was declared here
char **attr_name;
^~~~~~~~~
>> arch/powerpc/platforms/powernv/opal.c:661:12: error: 'exported_attrs' may be used uninitialized in this function [-Werror=maybe-uninitialized]
attr_tmp = &exported_attrs[n];
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/powernv/opal.c:617:24: note: 'exported_attrs' was declared here
struct bin_attribute *exported_attrs;
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/attr_name +651 arch/powerpc/platforms/powernv/opal.c
645 GFP_KERNEL);
646 attr_name = kzalloc(sizeof(char *)*(attr_count-2), GFP_KERNEL);
647 }
648
649 for_each_property_of_node(fw, prop) {
650
> 651 attr_name[n] = kstrdup(prop->name, GFP_KERNEL);
652 syms = of_get_property(fw, attr_name[n], &size);
653
654 if (!strcmp(attr_name[n], "name") ||
655 !strcmp(attr_name[n], "phandle"))
656 continue;
657
658 if (!syms || size != 2 * sizeof(__be64))
659 continue;
660
> 661 attr_tmp = &exported_attrs[n];
662 attr_tmp->attr.name = attr_name[n];
663 attr_tmp->attr.mode = 0400;
664 attr_tmp->read = export_attr_read;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 23094 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20170324/10972cbc/attachment-0001.gz>
More information about the Linuxppc-dev
mailing list