[dinguyen:arm64_defconfig_v5.13_3 95/95] include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_177' declared with attribute error: FIELD_GET: type of reg too small for mask
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git arm64_defconfig_v5.13_3
head: 2ea9ff6fb9aa7644eb20f97f6c52e72e1b205533
commit: 2ea9ff6fb9aa7644eb20f97f6c52e72e1b205533 [95/95] ARM: socfpga: drop ARCH_SOCFPGA
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git/commit...
git remote add dinguyen https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git
git fetch --no-tags dinguyen arm64_defconfig_v5.13_3
git checkout 2ea9ff6fb9aa7644eb20f97f6c52e72e1b205533
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
drivers/firmware/stratix10-rsu.c: In function 'rsu_status_callback':
>> include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_177' declared with attribute error: FIELD_GET: type of reg too small for mask
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
52 | BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK'
108 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/firmware/stratix10-rsu.c:96:26: note: in expansion of macro 'FIELD_GET'
96 | priv->status.version = FIELD_GET(RSU_VERSION_MASK,
| ^~~~~~~~~
include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_192' declared with attribute error: FIELD_GET: type of reg too small for mask
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/bitfield.h:52:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
52 | BUILD_BUG_ON_MSG((_mask) > (typeof(_reg))~0ull, \
| ^~~~~~~~~~~~~~~~
include/linux/bitfield.h:108:3: note: in expansion of macro '__BF_FIELD_CHECK'
108 | __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
| ^~~~~~~~~~~~~~~~
drivers/firmware/stratix10-rsu.c:104:4: note: in expansion of macro 'FIELD_GET'
104 | FIELD_GET(RSU_ERROR_DETAIL_MASK, res->a3);
| ^~~~~~~~~
vim +/__compiletime_assert_177 +320 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 306
eb5c2d4b45e3d2 Will Deacon 2020-07-21 307 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 308 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 309
eb5c2d4b45e3d2 Will Deacon 2020-07-21 310 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 311 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @320 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321
:::::: The code at line 320 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[arnd-playground:randconfig-v5.12 390/597] arch/s390/pci/pci_bus.c:219:3: warning: variable 'bridge' is uninitialized when used here
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git randconfig-v5.12
head: fd21c2581b744639b5207c11651ab40abf13701a
commit: aeb172ab4efb38a4817cf99c9c977d89130c3937 [390/597] pci: s390: remove redundant zbus->bus member
config: s390-randconfig-r001-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project fcc1ce00931751ac02498986feb37744e9ace8de)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commi...
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground randconfig-v5.12
git checkout aeb172ab4efb38a4817cf99c9c977d89130c3937
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/s390/pci/pci_bus.c:14:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:8:
In file included from include/linux/spinlock.h:59:
In file included from include/linux/lockdep.h:14:
In file included from include/linux/smp.h:84:
arch/s390/include/asm/smp.h:42:1: warning: function 'smp_stop_cpu' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
{
^
In file included from arch/s390/pci/pci_bus.c:20:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
^
include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16'
#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
^
In file included from arch/s390/pci/pci_bus.c:20:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:115:54: note: expanded from macro '__swab32'
#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
^
In file included from arch/s390/pci/pci_bus.c:20:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> arch/s390/pci/pci_bus.c:219:3: warning: variable 'bridge' is uninitialized when used here [-Wuninitialized]
bridge->ops = ops;
^~~~~~
arch/s390/pci/pci_bus.c:198:32: note: initialize the variable 'bridge' to silence this warning
struct pci_host_bridge *bridge;
^
= NULL
14 warnings generated.
vim +/bridge +219 arch/s390/pci/pci_bus.c
44510d6fa0c00a Pierre Morel 2020-04-22 195
44510d6fa0c00a Pierre Morel 2020-04-22 196 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops)
44510d6fa0c00a Pierre Morel 2020-04-22 197 {
a33ad04d2320ed Arnd Bergmann 2020-12-18 198 struct pci_host_bridge *bridge;
44510d6fa0c00a Pierre Morel 2020-04-22 199 struct zpci_bus *zbus = NULL;
44510d6fa0c00a Pierre Morel 2020-04-22 200 int rc = -EBADF;
44510d6fa0c00a Pierre Morel 2020-04-22 201
05bc1be6db4b26 Pierre Morel 2020-03-23 202 if (zpci_nb_devices == ZPCI_NR_DEVICES) {
05bc1be6db4b26 Pierre Morel 2020-03-23 203 pr_warn("Adding PCI function %08x failed because the configured limit of %d is reached\n",
05bc1be6db4b26 Pierre Morel 2020-03-23 204 zdev->fid, ZPCI_NR_DEVICES);
05bc1be6db4b26 Pierre Morel 2020-03-23 205 return -ENOSPC;
05bc1be6db4b26 Pierre Morel 2020-03-23 206 }
05bc1be6db4b26 Pierre Morel 2020-03-23 207 zpci_nb_devices++;
05bc1be6db4b26 Pierre Morel 2020-03-23 208
44510d6fa0c00a Pierre Morel 2020-04-22 209 if (zdev->devfn >= ZPCI_FUNCTIONS_PER_BUS)
05bc1be6db4b26 Pierre Morel 2020-03-23 210 return -EINVAL;
05bc1be6db4b26 Pierre Morel 2020-03-23 211
44510d6fa0c00a Pierre Morel 2020-04-22 212 if (!s390_pci_no_rid && zdev->rid_available)
44510d6fa0c00a Pierre Morel 2020-04-22 213 zbus = zpci_bus_get(zdev->pchid);
44510d6fa0c00a Pierre Morel 2020-04-22 214
44510d6fa0c00a Pierre Morel 2020-04-22 215 if (!zbus) {
05bc1be6db4b26 Pierre Morel 2020-03-23 216 zbus = zpci_bus_alloc(zdev->pchid);
05bc1be6db4b26 Pierre Morel 2020-03-23 217 if (!zbus)
05bc1be6db4b26 Pierre Morel 2020-03-23 218 return -ENOMEM;
a33ad04d2320ed Arnd Bergmann 2020-12-18 @219 bridge->ops = ops;
44510d6fa0c00a Pierre Morel 2020-04-22 220 }
05bc1be6db4b26 Pierre Morel 2020-03-23 221
05bc1be6db4b26 Pierre Morel 2020-03-23 222 zdev->zbus = zbus;
a33ad04d2320ed Arnd Bergmann 2020-12-18 223
44510d6fa0c00a Pierre Morel 2020-04-22 224 if (zbus->function[zdev->devfn]) {
44510d6fa0c00a Pierre Morel 2020-04-22 225 pr_err("devfn %04x is already assigned\n", zdev->devfn);
44510d6fa0c00a Pierre Morel 2020-04-22 226 goto error; /* rc already set */
44510d6fa0c00a Pierre Morel 2020-04-22 227 }
44510d6fa0c00a Pierre Morel 2020-04-22 228 zbus->function[zdev->devfn] = zdev;
05bc1be6db4b26 Pierre Morel 2020-03-23 229
a33ad04d2320ed Arnd Bergmann 2020-12-18 230 zpci_setup_bus_resources(zdev, &zbus->bridge->windows);
05bc1be6db4b26 Pierre Morel 2020-03-23 231
aeb172ab4efb38 Arnd Bergmann 2021-01-25 232 if (zbus->bridge->bus) {
44510d6fa0c00a Pierre Morel 2020-04-22 233 if (!zbus->multifunction) {
44510d6fa0c00a Pierre Morel 2020-04-22 234 WARN_ONCE(1, "zbus is not multifunction\n");
44510d6fa0c00a Pierre Morel 2020-04-22 235 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 236 }
44510d6fa0c00a Pierre Morel 2020-04-22 237 if (!zdev->rid_available) {
44510d6fa0c00a Pierre Morel 2020-04-22 238 WARN_ONCE(1, "rid_available not set for multifunction\n");
44510d6fa0c00a Pierre Morel 2020-04-22 239 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 240 }
44510d6fa0c00a Pierre Morel 2020-04-22 241 rc = zpci_bus_add_device(zbus, zdev);
44510d6fa0c00a Pierre Morel 2020-04-22 242 if (rc)
44510d6fa0c00a Pierre Morel 2020-04-22 243 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 244 } else if (zdev->devfn == 0) {
44510d6fa0c00a Pierre Morel 2020-04-22 245 if (zbus->multifunction && !zdev->rid_available) {
44510d6fa0c00a Pierre Morel 2020-04-22 246 WARN_ONCE(1, "rid_available not set on function 0 for multifunction\n");
44510d6fa0c00a Pierre Morel 2020-04-22 247 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 248 }
aeb172ab4efb38 Arnd Bergmann 2021-01-25 249 rc = zpci_bus_scan(zbus, (u16)zdev->uid);
44510d6fa0c00a Pierre Morel 2020-04-22 250 if (rc)
44510d6fa0c00a Pierre Morel 2020-04-22 251 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 252 zpci_bus_add_devices(zbus);
44510d6fa0c00a Pierre Morel 2020-04-22 253 rc = zpci_init_slot(zdev);
44510d6fa0c00a Pierre Morel 2020-04-22 254 if (rc)
44510d6fa0c00a Pierre Morel 2020-04-22 255 goto error_bus;
44510d6fa0c00a Pierre Morel 2020-04-22 256 zdev->has_hp_slot = 1;
44510d6fa0c00a Pierre Morel 2020-04-22 257 zbus->multifunction = zdev->rid_available;
44510d6fa0c00a Pierre Morel 2020-04-22 258 zbus->max_bus_speed = zdev->max_bus_speed;
44510d6fa0c00a Pierre Morel 2020-04-22 259 } else {
44510d6fa0c00a Pierre Morel 2020-04-22 260 zbus->multifunction = 1;
44510d6fa0c00a Pierre Morel 2020-04-22 261 }
44510d6fa0c00a Pierre Morel 2020-04-22 262
05bc1be6db4b26 Pierre Morel 2020-03-23 263 return 0;
05bc1be6db4b26 Pierre Morel 2020-03-23 264
44510d6fa0c00a Pierre Morel 2020-04-22 265 error_bus:
44510d6fa0c00a Pierre Morel 2020-04-22 266 zpci_nb_devices--;
44510d6fa0c00a Pierre Morel 2020-04-22 267 zbus->function[zdev->devfn] = NULL;
44510d6fa0c00a Pierre Morel 2020-04-22 268 error:
05bc1be6db4b26 Pierre Morel 2020-03-23 269 pr_err("Adding PCI function %08x failed\n", zdev->fid);
05bc1be6db4b26 Pierre Morel 2020-03-23 270 zpci_bus_put(zbus);
05bc1be6db4b26 Pierre Morel 2020-03-23 271 return rc;
05bc1be6db4b26 Pierre Morel 2020-03-23 272 }
05bc1be6db4b26 Pierre Morel 2020-03-23 273
:::::: The code at line 219 was first introduced by commit
:::::: a33ad04d2320edeaca80d61524768a9b7b7af8e4 s390: simplify PCI bus scan
:::::: TO: Arnd Bergmann <arnd(a)arndb.de>
:::::: CC: Arnd Bergmann <arnd(a)arndb.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/mips/kernel/setup.c:47:39: error: conflicting types for '__appended_dtb'
by kernel test robot
Hi Thomas,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20 MIPS: of: Introduce helper function to get DTB
date: 6 weeks ago
config: mips-randconfig-r033-20210318 (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b83ba0b9df56f8404ccc6ebcc7050fb8294f0f20
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/mips/kernel/setup.c:47:39: error: conflicting types for '__appended_dtb'
47 | const char __section(".appended_dtb") __appended_dtb[0x100000];
| ^~~~~~~~~~~~~~
In file included from arch/mips/kernel/setup.c:34:
arch/mips/include/asm/bootinfo.h:118:13: note: previous declaration of '__appended_dtb' was here
118 | extern char __appended_dtb[];
| ^~~~~~~~~~~~~~
vim +/__appended_dtb +47 arch/mips/kernel/setup.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 45
87db537da4cd1b Aaro Koskinen 2015-09-11 46 #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
33def8498fdde1 Joe Perches 2020-10-21 @47 const char __section(".appended_dtb") __appended_dtb[0x100000];
87db537da4cd1b Aaro Koskinen 2015-09-11 48 #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */
87db537da4cd1b Aaro Koskinen 2015-09-11 49
:::::: The code at line 47 was first introduced by commit
:::::: 33def8498fdde180023444b08e12b72a9efed41d treewide: Convert macro and uses of __section(foo) to __section("foo")
:::::: TO: Joe Perches <joe(a)perches.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 2/2] net: phy: dp83867: add support for changing LED modes
by kernel test robot
Hi Michael,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on net/master ipvs/master net-next/master v5.12-rc3 next-20210319]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Michael-Tretter/net-phy-dp83867-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/740c2de62bc36c66a54a8c152a65ae2eb...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Michael-Tretter/net-phy-dp83867-Configure-LED-modes-via-device-tree/20210320-000027
git checkout 740c2de62bc36c66a54a8c152a65ae2ebf805515
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/phy/dp83867.c: In function 'dp83867_of_led_mode_read':
>> drivers/net/phy/dp83867.c:550:14: warning: passing argument 4 of 'of_property_read_u32_index' makes pointer from integer without a cast [-Wint-conversion]
550 | index, tmp);
| ^~~
| |
| u32 {aka unsigned int}
In file included from drivers/net/phy/dp83867.c:11:
include/linux/of.h:311:28: note: expected 'u32 *' {aka 'unsigned int *'} but argument is of type 'u32' {aka 'unsigned int'}
311 | u32 index, u32 *out_value);
| ~~~~~^~~~~~~~~
>> drivers/net/phy/dp83867.c:549:8: warning: 'tmp' is used uninitialized in this function [-Wuninitialized]
549 | err = of_property_read_u32_index(of_node, "ti,dp83867-led-modes",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
550 | index, tmp);
| ~~~~~~~~~~~
vim +/of_property_read_u32_index +550 drivers/net/phy/dp83867.c
538
539 #if IS_ENABLED(CONFIG_OF_MDIO)
540 static int dp83867_of_led_mode_read(struct device_node *of_node,
541 const char *led_name, u32 *mode)
542 {
543 u32 tmp;
544 int index;
545 int err;
546
547 index = of_property_match_string(of_node, "ti,dp83867-led-mode-names",
548 led_name);
> 549 err = of_property_read_u32_index(of_node, "ti,dp83867-led-modes",
> 550 index, tmp);
551 if (err)
552 return err;
553 if (tmp == 0xc || tmp >= 0xf)
554 return -EINVAL;
555
556 *mode = tmp;
557
558 return 0;
559 }
560
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] SUNRPC: Output oversized frag reclen as ASCII if printable
by kernel test robot
Hi Chris,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on nfs/linux-next]
[also build test WARNING on net/master ipvs/master net-next/master nfsd/nfsd-next v5.12-rc3]
[cannot apply to next-20210319]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Chris-Down/SUNRPC-Output-oversiz...
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-s002-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-dirty
# https://github.com/0day-ci/linux/commit/05c000d59d3659fd34ca2ac15ebce6383...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Down/SUNRPC-Output-oversized-frag-reclen-as-ASCII-if-printable/20210319-225807
git checkout 05c000d59d3659fd34ca2ac15ebce6383362fb5a
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/sunrpc/svcsock.c:883:22: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] len_be @@ got restricted __be32 [usertype] @@
net/sunrpc/svcsock.c:883:22: sparse: expected unsigned int [usertype] len_be
net/sunrpc/svcsock.c:883:22: sparse: got restricted __be32 [usertype]
vim +883 net/sunrpc/svcsock.c
866
867 /* The reclen is taken directly from the first four bytes of the message with
868 * the highest bit stripped, which makes it ripe for protocol mixups. For
869 * example, if someone tries to send a HTTP GET request to us, we'll interpret
870 * it as a 1195725856-sized fragment (ie. (u32)'GET '), and print a ratelimited
871 * KERN_NOTICE with that number verbatim.
872 *
873 * To allow users to more easily understand and debug these cases, this
874 * function decodes the purported length as ASCII, and returns it if all
875 * characters were printable. Otherwise, we return NULL.
876 *
877 * WARNING: Since we reuse the u32 directly, the return value is not null
878 * terminated, and must be printed using %.*s with
879 * sizeof(svc_sock_reclen(svsk)).
880 */
881 static char *svc_sock_reclen_ascii(struct svc_sock *svsk)
882 {
> 883 u32 len_be = cpu_to_be32(svc_sock_reclen(svsk));
884 char *len_be_ascii = (char *)&len_be;
885 size_t i;
886
887 for (i = 0; i < sizeof(len_be); i++) {
888 if (!isprint(len_be_ascii[i]))
889 return NULL;
890 }
891
892 return len_be_ascii;
893 }
894
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used
by kernel test robot
Hi Jordan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: 650b55b707fdfa764e9f2b81314d3eb4216fb962 powerpc: Add prefixed instructions to instruction data type
date: 10 months ago
config: powerpc-allnoconfig (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 650b55b707fdfa764e9f2b81314d3eb4216fb962
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/lib/sstep.c: In function 'analyse_instr':
>> arch/powerpc/lib/sstep.c:1172:21: error: variable 'suffix' set but not used [-Werror=unused-but-set-variable]
1172 | unsigned int word, suffix;
| ^~~~~~
arch/powerpc/lib/sstep.c:1168:31: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
1168 | unsigned int opcode, ra, rb, rc, rd, spr, u;
| ^~
cc1: all warnings being treated as errors
vim +/suffix +1172 arch/powerpc/lib/sstep.c
1153
1154 /*
1155 * Decode an instruction, and return information about it in *op
1156 * without changing *regs.
1157 * Integer arithmetic and logical instructions, branches, and barrier
1158 * instructions can be emulated just using the information in *op.
1159 *
1160 * Return value is 1 if the instruction can be emulated just by
1161 * updating *regs with the information in *op, -1 if we need the
1162 * GPRs but *regs doesn't contain the full register set, or 0
1163 * otherwise.
1164 */
1165 int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
1166 struct ppc_inst instr)
1167 {
1168 unsigned int opcode, ra, rb, rc, rd, spr, u;
1169 unsigned long int imm;
1170 unsigned long int val, val2;
1171 unsigned int mb, me, sh;
> 1172 unsigned int word, suffix;
1173 long ival;
1174
1175 word = ppc_inst_val(instr);
1176 suffix = ppc_inst_suffix(instr);
1177
1178 op->type = COMPUTE;
1179
1180 opcode = ppc_inst_primary_opcode(instr);
1181 switch (opcode) {
1182 case 16: /* bc */
1183 op->type = BRANCH;
1184 imm = (signed short)(word & 0xfffc);
1185 if ((word & 2) == 0)
1186 imm += regs->nip;
1187 op->val = truncate_if_32bit(regs->msr, imm);
1188 if (word & 1)
1189 op->type |= SETLK;
1190 if (branch_taken(word, regs, op))
1191 op->type |= BRTAKEN;
1192 return 1;
1193 #ifdef CONFIG_PPC64
1194 case 17: /* sc */
1195 if ((word & 0xfe2) == 2)
1196 op->type = SYSCALL;
1197 else
1198 op->type = UNKNOWN;
1199 return 0;
1200 #endif
1201 case 18: /* b */
1202 op->type = BRANCH | BRTAKEN;
1203 imm = word & 0x03fffffc;
1204 if (imm & 0x02000000)
1205 imm -= 0x04000000;
1206 if ((word & 2) == 0)
1207 imm += regs->nip;
1208 op->val = truncate_if_32bit(regs->msr, imm);
1209 if (word & 1)
1210 op->type |= SETLK;
1211 return 1;
1212 case 19:
1213 switch ((word >> 1) & 0x3ff) {
1214 case 0: /* mcrf */
1215 op->type = COMPUTE + SETCC;
1216 rd = 7 - ((word >> 23) & 0x7);
1217 ra = 7 - ((word >> 18) & 0x7);
1218 rd *= 4;
1219 ra *= 4;
1220 val = (regs->ccr >> ra) & 0xf;
1221 op->ccval = (regs->ccr & ~(0xfUL << rd)) | (val << rd);
1222 return 1;
1223
1224 case 16: /* bclr */
1225 case 528: /* bcctr */
1226 op->type = BRANCH;
1227 imm = (word & 0x400)? regs->ctr: regs->link;
1228 op->val = truncate_if_32bit(regs->msr, imm);
1229 if (word & 1)
1230 op->type |= SETLK;
1231 if (branch_taken(word, regs, op))
1232 op->type |= BRTAKEN;
1233 return 1;
1234
1235 case 18: /* rfid, scary */
1236 if (regs->msr & MSR_PR)
1237 goto priv;
1238 op->type = RFI;
1239 return 0;
1240
1241 case 150: /* isync */
1242 op->type = BARRIER | BARRIER_ISYNC;
1243 return 1;
1244
1245 case 33: /* crnor */
1246 case 129: /* crandc */
1247 case 193: /* crxor */
1248 case 225: /* crnand */
1249 case 257: /* crand */
1250 case 289: /* creqv */
1251 case 417: /* crorc */
1252 case 449: /* cror */
1253 op->type = COMPUTE + SETCC;
1254 ra = (word >> 16) & 0x1f;
1255 rb = (word >> 11) & 0x1f;
1256 rd = (word >> 21) & 0x1f;
1257 ra = (regs->ccr >> (31 - ra)) & 1;
1258 rb = (regs->ccr >> (31 - rb)) & 1;
1259 val = (word >> (6 + ra * 2 + rb)) & 1;
1260 op->ccval = (regs->ccr & ~(1UL << (31 - rd))) |
1261 (val << (31 - rd));
1262 return 1;
1263 }
1264 break;
1265 case 31:
1266 switch ((word >> 1) & 0x3ff) {
1267 case 598: /* sync */
1268 op->type = BARRIER + BARRIER_SYNC;
1269 #ifdef __powerpc64__
1270 switch ((word >> 21) & 3) {
1271 case 1: /* lwsync */
1272 op->type = BARRIER + BARRIER_LWSYNC;
1273 break;
1274 case 2: /* ptesync */
1275 op->type = BARRIER + BARRIER_PTESYNC;
1276 break;
1277 }
1278 #endif
1279 return 1;
1280
1281 case 854: /* eieio */
1282 op->type = BARRIER + BARRIER_EIEIO;
1283 return 1;
1284 }
1285 break;
1286 }
1287
1288 /* Following cases refer to regs->gpr[], so we need all regs */
1289 if (!FULL_REGS(regs))
1290 return -1;
1291
1292 rd = (word >> 21) & 0x1f;
1293 ra = (word >> 16) & 0x1f;
1294 rb = (word >> 11) & 0x1f;
1295 rc = (word >> 6) & 0x1f;
1296
1297 switch (opcode) {
1298 #ifdef __powerpc64__
1299 case 2: /* tdi */
1300 if (rd & trap_compare(regs->gpr[ra], (short) word))
1301 goto trap;
1302 return 1;
1303 #endif
1304 case 3: /* twi */
1305 if (rd & trap_compare((int)regs->gpr[ra], (short) word))
1306 goto trap;
1307 return 1;
1308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months