[arm:cex7 125/143] include/uapi/linux/swab.h:18:38: warning: 'px_is' may be used uninitialized in this function
From: kbuild test robot <hidden>
Date: 2020-03-16 23:10:44
Also in:
oe-kbuild-all
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git cex7
head: 3f487cad79774a93337d73615e2cd87586b0f7db
commit: 25167ffbba96633800ebe64ae7ee3eb17f2a021f [125/143] ahci: qoriq: workaround for errata A-379364 on lx2160a
config: h8300-randconfig-a001-20200317 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.2.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 25167ffbba96633800ebe64ae7ee3eb17f2a021f
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=h8300
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <redacted>
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 >>):
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/h8300/include/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/h8300/include/asm/bitops.h:171,
from include/linux/bitops.h:26,
from include/linux/kernel.h:12,
from drivers/ata/ahci_qoriq.c:9:
drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset':quoted
include/uapi/linux/swab.h:18:38: warning: 'px_is' may be used uninitialized in this function [-Wmaybe-uninitialized]
18 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
| ^~
drivers/ata/ahci_qoriq.c:229:14: note: 'px_is' was declared here
229 | u32 px_cmd, px_is, px_val;
| ^~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/h8300/include/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/h8300/include/asm/bitops.h:171,
from include/linux/bitops.h:26,
from include/linux/kernel.h:12,
from drivers/ata/ahci_qoriq.c:9:quoted
include/uapi/linux/swab.h:18:38: warning: 'px_cmd' may be used uninitialized in this function [-Wmaybe-uninitialized]
18 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
| ^~
drivers/ata/ahci_qoriq.c:229:6: note: 'px_cmd' was declared here
229 | u32 px_cmd, px_is, px_val;
| ^~~~~~
--
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/h8300/include/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/h8300/include/asm/bitops.h:171,
from include/linux/bitops.h:26,
from include/linux/kernel.h:12,
from drivers//ata/ahci_qoriq.c:9:
drivers//ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset':quoted
include/uapi/linux/swab.h:18:38: warning: 'px_is' may be used uninitialized in this function [-Wmaybe-uninitialized]
18 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
| ^~
drivers//ata/ahci_qoriq.c:229:14: note: 'px_is' was declared here
229 | u32 px_cmd, px_is, px_val;
| ^~~~~
In file included from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/h8300/include/asm/byteorder.h:5,
from include/asm-generic/bitops/le.h:6,
from arch/h8300/include/asm/bitops.h:171,
from include/linux/bitops.h:26,
from include/linux/kernel.h:12,
from drivers//ata/ahci_qoriq.c:9:quoted
include/uapi/linux/swab.h:18:38: warning: 'px_cmd' may be used uninitialized in this function [-Wmaybe-uninitialized]
18 | (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
| ^~
drivers//ata/ahci_qoriq.c:229:6: note: 'px_cmd' was declared here
229 | u32 px_cmd, px_is, px_val;
| ^~~~~~
vim +/px_is +18 include/uapi/linux/swab.h
607ca46e97a1b6 David Howells 2012-10-13 8
607ca46e97a1b6 David Howells 2012-10-13 9 /*
607ca46e97a1b6 David Howells 2012-10-13 10 * casts are necessary for constants, because we never know how for sure
607ca46e97a1b6 David Howells 2012-10-13 11 * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
607ca46e97a1b6 David Howells 2012-10-13 12 */
607ca46e97a1b6 David Howells 2012-10-13 13 #define ___constant_swab16(x) ((__u16)( \
607ca46e97a1b6 David Howells 2012-10-13 14 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
607ca46e97a1b6 David Howells 2012-10-13 15 (((__u16)(x) & (__u16)0xff00U) >> 8)))
607ca46e97a1b6 David Howells 2012-10-13 16
607ca46e97a1b6 David Howells 2012-10-13 17 #define ___constant_swab32(x) ((__u32)( \
607ca46e97a1b6 David Howells 2012-10-13 @18 (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
607ca46e97a1b6 David Howells 2012-10-13 19 (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
607ca46e97a1b6 David Howells 2012-10-13 20 (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
607ca46e97a1b6 David Howells 2012-10-13 21 (((__u32)(x) & (__u32)0xff000000UL) >> 24)))
607ca46e97a1b6 David Howells 2012-10-13 22
:::::: The code at line 18 was first introduced by commit
:::::: 607ca46e97a1b6594b29647d98a32d545c24bdff UAPI: (Scripted) Disintegrate include/linux
:::::: TO: David Howells [off-list ref]
:::::: CC: David Howells [off-list ref]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 21937 bytes
- (unnamed) [text/plain] 176 bytes · preview