drivers/video/fbdev/sis/init.c:882:9: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: riscv-randconfig-s032-20200817 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-180-g49f7e13a-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv
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 >>)
>> drivers/video/fbdev/sis/init.c:882:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/video/fbdev/sis/init.c:882:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/video/fbdev/sis/init.c:882:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:882:9: sparse: got void *
drivers/video/fbdev/sis/init.c:883:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:883:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:883:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:883:9: sparse: got void *
drivers/video/fbdev/sis/init.c:889:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:889:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:889:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:889:9: sparse: got void *
drivers/video/fbdev/sis/init.c:895:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:895:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:895:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:895:9: sparse: got void *
drivers/video/fbdev/sis/init.c:901:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:901:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:901:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:901:9: sparse: got void *
drivers/video/fbdev/sis/init.c:907:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:907:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:907:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:907:9: sparse: got void *
drivers/video/fbdev/sis/init.c:908:16: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/video/fbdev/sis/init.c:908:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/video/fbdev/sis/init.c:908:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:908:16: sparse: got void *
drivers/video/fbdev/sis/init.c:914:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:914:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:914:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:914:16: sparse: got void *
drivers/video/fbdev/sis/init.c:920:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:920:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:920:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:920:16: sparse: got void *
drivers/video/fbdev/sis/init.c:926:16: sparse: sparse: cast removes address space '__iomem' of expression
drivers/video/fbdev/sis/init.c:926:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got void * @@
drivers/video/fbdev/sis/init.c:926:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/video/fbdev/sis/init.c:926:16: sparse: got void *
--
>> drivers/gpu/drm/qxl/qxl_cmd.c:153:17: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/qxl/qxl_cmd.c:153:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/gpu/drm/qxl/qxl_cmd.c:153:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_cmd.c:153:17: sparse: got void *
drivers/gpu/drm/qxl/qxl_cmd.c:307:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/qxl/qxl_cmd.c:307:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/qxl/qxl_cmd.c:307:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_cmd.c:307:9: sparse: got void *
drivers/gpu/drm/qxl/qxl_cmd.c:363:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/qxl/qxl_cmd.c:363:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/qxl/qxl_cmd.c:363:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_cmd.c:363:9: sparse: got void *
drivers/gpu/drm/qxl/qxl_cmd.c:368:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/qxl/qxl_cmd.c:368:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/qxl/qxl_cmd.c:368:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_cmd.c:368:9: sparse: got void *
drivers/gpu/drm/qxl/qxl_cmd.c:418:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/gpu/drm/qxl/qxl_cmd.c:418:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
drivers/gpu/drm/qxl/qxl_cmd.c:418:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_cmd.c:418:9: sparse: got void *
--
>> drivers/gpu/drm/qxl/qxl_irq.c:70:9: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/qxl/qxl_irq.c:70:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void * @@
>> drivers/gpu/drm/qxl/qxl_irq.c:70:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/gpu/drm/qxl/qxl_irq.c:70:9: sparse: got void *
# 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 670d0a4b10704667765f7d18f7592993d02783aa
vim +/__iomem +882 drivers/video/fbdev/sis/init.c
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 878
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 879 void
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 880 SiS_SetReg(SISIOADDRESS port, u8 index, u8 data)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 881 {
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 @882 outb(index, port);
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 883 outb(data, port + 1);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 884 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 885
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 886 void
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 887 SiS_SetRegByte(SISIOADDRESS port, u8 data)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 888 {
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 889 outb(data, port);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 890 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 891
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 892 void
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 893 SiS_SetRegShort(SISIOADDRESS port, u16 data)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 894 {
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 895 outw(data, port);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 896 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 897
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 898 void
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 899 SiS_SetRegLong(SISIOADDRESS port, u32 data)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 900 {
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 901 outl(data, port);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 902 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 903
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 904 u8
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 905 SiS_GetReg(SISIOADDRESS port, u8 index)
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 906 {
f48b9644ef330a drivers/video/sis/init.c Aaro Koskinen 2010-12-20 907 outb(index, port);
2ad28472695a94 drivers/video/sis/init.c Aaro Koskinen 2010-11-19 @908 return inb(port + 1);
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 909 }
^1da177e4c3f41 drivers/video/sis/init.c Linus Torvalds 2005-04-16 910
:::::: The code at line 882 was first introduced by commit
:::::: f48b9644ef330a13c6bb16ca85c2efdbe7e25558 sisfb: change register I/O functions to use fixed size types
:::::: TO: Aaro Koskinen <aaro.koskinen(a)iki.fi>
:::::: CC: Paul Mundt <lethal(a)linux-sh.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true
by kernel test robot
Hi Nathan,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: afe956c577b2d5a3d9834e4424587c1ebcf90c4c kbuild: Enable -Wtautological-compare
date: 4 months ago
config: mips-randconfig-r001-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout afe956c577b2d5a3d9834e4424587c1ebcf90c4c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>):
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_OPS(atomic, int)
^
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:45:9: note: expanded from macro 'ATOMIC_OPS'
return xchg(&v->counter, n); \
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_OPS(atomic64, s64)
^
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:45:9: note: expanded from macro 'ATOMIC_OPS'
return xchg(&v->counter, n); \
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:258:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic, int, subu, ll, sc)
^
arch/mips/include/asm/atomic.h:252:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
In file included from include/linux/debug_locks.h:6:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:262:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic64, s64, dsubu, lld, scd)
^
arch/mips/include/asm/atomic.h:252:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from kernel/bounds.c:14:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
>> include/linux/debug_locks.h:17:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&debug_locks, 0);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
9 warnings generated.
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_OPS(atomic, int)
^
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
>> arch/mips/include/asm/atomic.h:49:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:45:9: note: expanded from macro 'ATOMIC_OPS'
return xchg(&v->counter, n); \
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_OPS(atomic64, s64)
^
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:40:9: note: expanded from macro 'ATOMIC_OPS'
return cmpxchg(&v->counter, o, n); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:53:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/atomic.h:45:9: note: expanded from macro 'ATOMIC_OPS'
return xchg(&v->counter, n); \
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:258:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic, int, subu, ll, sc)
^
arch/mips/include/asm/atomic.h:252:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:51:
In file included from include/linux/preempt.h:78:
In file included from ./arch/mips/include/generated/asm/preempt.h:1:
In file included from include/asm-generic/preempt.h:5:
In file included from include/linux/thread_info.h:38:
In file included from arch/mips/include/asm/thread_info.h:16:
In file included from arch/mips/include/asm/processor.h:14:
In file included from include/linux/atomic.h:7:
arch/mips/include/asm/atomic.h:262:1: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
ATOMIC_SIP_OP(atomic64, s64, dsubu, lld, scd)
^
arch/mips/include/asm/atomic.h:252:7: note: expanded from macro 'ATOMIC_SIP_OP'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:83:
In file included from include/linux/spinlock_types.h:18:
In file included from include/linux/lockdep.h:44:
>> include/linux/debug_locks.h:17:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&debug_locks, 0);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:10:
In file included from include/linux/time.h:74:
In file included from include/linux/time32.h:13:
In file included from include/linux/timex.h:65:
In file included from arch/mips/include/asm/timex.h:19:
In file included from arch/mips/include/asm/cpu-type.h:12:
In file included from include/linux/smp.h:15:
>> include/linux/llist.h:222:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return xchg(&head->first, NULL);
^
arch/mips/include/asm/cmpxchg.h:102:7: note: expanded from macro 'xchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:176:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(cpu);
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:210:25: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpumask_of_node(cpu_to_node(cpu));
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:15:
In file included from include/linux/mm.h:95:
>> arch/mips/include/asm/pgtable.h:210:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
cmpxchg64(&buddy->pte, 0, _PAGE_GLOBAL);
^
arch/mips/include/asm/cmpxchg.h:220:2: note: expanded from macro 'cmpxchg64'
cmpxchg((ptr), (o), (n)); \
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:15:
In file included from include/linux/mm.h:95:
>> arch/mips/include/asm/pgtable.h:210:3: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/cmpxchg.h:220:2: note: expanded from macro 'cmpxchg64'
cmpxchg((ptr), (o), (n)); \
^
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:24:
>> include/linux/kvm_host.h:332:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
return cmpxchg(&vcpu->mode, IN_GUEST_MODE, EXITING_GUEST_MODE);
^
arch/mips/include/asm/cmpxchg.h:194:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
In file included from arch/mips/kernel/asm-offsets.c:24:
>> include/linux/kvm_host.h:332:9: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare]
arch/mips/include/asm/cmpxchg.h:204:7: note: expanded from macro 'cmpxchg'
if (!__SYNC_loongson3_war) \
^
arch/mips/include/asm/sync.h:147:34: note: expanded from macro '__SYNC_loongson3_war'
# define __SYNC_loongson3_war (1 << 31)
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:93:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:110:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:242:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:255:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:322:6: warning: no previous prototype for function 'output_pbe_defines' [-Wmissing-prototypes]
void output_pbe_defines(void)
^
arch/mips/kernel/asm-offsets.c:322:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pbe_defines(void)
^
static
22 warnings and 3 errors generated.
make[2]: *** [scripts/Makefile.build:101: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:180: sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# 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 afe956c577b2d5a3d9834e4424587c1ebcf90c4c
vim +49 arch/mips/include/asm/atomic.h
^1da177e4c3f41 include/asm-mips/atomic.h Linus Torvalds 2005-04-16 47
1da7bce8591d58 arch/mips/include/asm/atomic.h Paul Burton 2019-10-01 48 #define ATOMIC_INIT(i) { (i) }
1da7bce8591d58 arch/mips/include/asm/atomic.h Paul Burton 2019-10-01 @49 ATOMIC_OPS(atomic, int)
^1da177e4c3f41 include/asm-mips/atomic.h Linus Torvalds 2005-04-16 50
:::::: The code at line 49 was first introduced by commit
:::::: 1da7bce8591d58bf2a442b0324659af7390401c2 MIPS: atomic: Deduplicate 32b & 64b read, set, xchg, cmpxchg
:::::: TO: Paul Burton <paul.burton(a)mips.com>
:::::: CC: Paul Burton <paul.burton(a)mips.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map'
by kernel test robot
Hi Jiaxun,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: 71e2f4dd5a65bd8dbca0b77661e75eea471168f8 MIPS: Fork loongson2ef from loongson64
date: 10 months ago
config: mips-randconfig-r001-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
git checkout 71e2f4dd5a65bd8dbca0b77661e75eea471168f8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 >>):
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
error: unknown target CPU 'r4600'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
clang-12: warning: argument unused during compilation: '-mno-branch-likely' [-Wunused-command-line-argument]
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
>> include/linux/topology.h:119:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(raw_smp_processor_id());
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:193:9: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpu_to_node(cpu);
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
In file included from arch/mips/kernel/asm-offsets.c:12:
In file included from include/linux/compat.h:15:
In file included from include/linux/socket.h:8:
In file included from include/linux/uio.h:10:
In file included from include/crypto/hash.h:11:
In file included from include/linux/crypto.h:19:
In file included from include/linux/slab.h:15:
In file included from include/linux/gfp.h:9:
include/linux/topology.h:227:25: error: implicit declaration of function 'cpu_logical_map' [-Werror,-Wimplicit-function-declaration]
return cpumask_of_node(cpu_to_node(cpu));
^
arch/mips/include/asm/mach-loongson64/topology.h:7:27: note: expanded from macro 'cpu_to_node'
#define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
^
arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for function 'output_ptreg_defines' [-Wmissing-prototypes]
void output_ptreg_defines(void)
^
arch/mips/kernel/asm-offsets.c:26:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_ptreg_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for function 'output_task_defines' [-Wmissing-prototypes]
void output_task_defines(void)
^
arch/mips/kernel/asm-offsets.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_task_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for function 'output_thread_info_defines' [-Wmissing-prototypes]
void output_thread_info_defines(void)
^
arch/mips/kernel/asm-offsets.c:93:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_info_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:110:6: warning: no previous prototype for function 'output_thread_defines' [-Wmissing-prototypes]
void output_thread_defines(void)
^
arch/mips/kernel/asm-offsets.c:110:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_thread_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:181:6: warning: no previous prototype for function 'output_mm_defines' [-Wmissing-prototypes]
void output_mm_defines(void)
^
arch/mips/kernel/asm-offsets.c:181:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_mm_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:242:6: warning: no previous prototype for function 'output_sc_defines' [-Wmissing-prototypes]
void output_sc_defines(void)
^
arch/mips/kernel/asm-offsets.c:242:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_sc_defines(void)
^
static
arch/mips/kernel/asm-offsets.c:255:6: warning: no previous prototype for function 'output_signal_defined' [-Wmissing-prototypes]
void output_signal_defined(void)
^
arch/mips/kernel/asm-offsets.c:255:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_signal_defined(void)
^
static
arch/mips/kernel/asm-offsets.c:322:6: warning: no previous prototype for function 'output_pbe_defines' [-Wmissing-prototypes]
void output_pbe_defines(void)
^
arch/mips/kernel/asm-offsets.c:322:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void output_pbe_defines(void)
^
static
8 warnings and 3 errors generated.
make[2]: *** [scripts/Makefile.build:99: arch/mips/kernel/asm-offsets.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:414: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:179: sub-make] Error 2
make: Target 'prepare' not remade because of errors.
# 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 71e2f4dd5a65bd8dbca0b77661e75eea471168f8
vim +/cpu_logical_map +119 include/linux/topology.h
7281201922a006 Lee Schermerhorn 2010-05-26 114
7281201922a006 Lee Schermerhorn 2010-05-26 115 /* Returns the number of the current Node. */
7281201922a006 Lee Schermerhorn 2010-05-26 116 #ifndef numa_node_id
7281201922a006 Lee Schermerhorn 2010-05-26 117 static inline int numa_node_id(void)
7281201922a006 Lee Schermerhorn 2010-05-26 118 {
7281201922a006 Lee Schermerhorn 2010-05-26 @119 return cpu_to_node(raw_smp_processor_id());
7281201922a006 Lee Schermerhorn 2010-05-26 120 }
7281201922a006 Lee Schermerhorn 2010-05-26 121 #endif
7281201922a006 Lee Schermerhorn 2010-05-26 122
:::::: The code at line 119 was first introduced by commit
:::::: 7281201922a0063fa60804ce39c277fc98142a47 numa: add generic percpu var numa_node_id() implementation
:::::: TO: Lee Schermerhorn <lee.schermerhorn(a)hp.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
2 years, 1 month
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: mips-randconfig-s032-20200817 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-180-g49f7e13a-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
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 >>)
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:135:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:140:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *[assigned] inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: expected void [noderef] __iomem *[assigned] inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:23: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:31: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:603:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *doorbell_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: expected void [noderef] __iomem *doorbell_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:605:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: expected void [noderef] __iomem *inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:647:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_sent_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: expected void [noderef] __iomem *pkts_sent_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:649:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_credit_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: expected void [noderef] __iomem *pkts_credit_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: got unsigned char [usertype] *
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:737:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:741:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:745:40: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: got void *mbox_int_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: got void *mbox_int_reg
--
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *[assigned] inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: expected void [noderef] __iomem *[assigned] inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:226:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *doorbell_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: expected void [noderef] __iomem *doorbell_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:228:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: expected void [noderef] __iomem *inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:258:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_sent_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: expected void [noderef] __iomem *pkts_sent_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:260:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_credit_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: expected void [noderef] __iomem *pkts_credit_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:298:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:301:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:304:14: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: got void *mbox_int_reg
--
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: got void *mbox_write_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: got void *mbox_read_reg
# 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 670d0a4b10704667765f7d18f7592993d02783aa
vim +543 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 474
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 475 static void cn23xx_pf_setup_global_output_regs(struct octeon_device *oct)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 476 {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 477 u32 reg_val;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 478 u32 q_no, ern, srn;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 479 u64 time_threshold;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 480
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 481 struct octeon_cn23xx_pf *cn23xx = (struct octeon_cn23xx_pf *)oct->chip;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 482
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 483 srn = oct->sriov_info.pf_srn;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 484 ern = srn + oct->sriov_info.num_pf_rings;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 485
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 486 if (CFG_GET_IS_SLI_BP_ON(cn23xx->conf)) {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 487 octeon_write_csr64(oct, CN23XX_SLI_OQ_WMARK, 32);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 488 } else {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 489 /** Set Output queue watermark to 0 to disable backpressure */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 490 octeon_write_csr64(oct, CN23XX_SLI_OQ_WMARK, 0);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 491 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 492
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 493 for (q_no = srn; q_no < ern; q_no++) {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 494 reg_val = octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 495
ac13d6d8eaded1 Rick Farrington 2018-07-13 496 /* clear IPTR */
ac13d6d8eaded1 Rick Farrington 2018-07-13 497 reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
ac13d6d8eaded1 Rick Farrington 2018-07-13 498
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 499 /* set DPTR */
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 500 reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 501
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 502 /* reset BMODE */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 503 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_BMODE);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 504
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 505 /* No Relaxed Ordering, No Snoop, 64-bit Byte swap
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 506 * for Output Queue ScatterList
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 507 * reset ROR_P, NSR_P
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 508 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 509 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ROR_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 510 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_NSR_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 511
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 512 #ifdef __LITTLE_ENDIAN_BITFIELD
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 513 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ES_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 514 #else
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 515 reg_val |= (CN23XX_PKT_OUTPUT_CTL_ES_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 516 #endif
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 517 /* No Relaxed Ordering, No Snoop, 64-bit Byte swap
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 518 * for Output Queue Data
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 519 * reset ROR, NSR
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 520 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 521 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ROR);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 522 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_NSR);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 523 /* set the ES bit */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 524 reg_val |= (CN23XX_PKT_OUTPUT_CTL_ES);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 525
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 526 /* write all the selected settings */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 527 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no), reg_val);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 528
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 529 /* Enabling these interrupt in oct->fn_list.enable_interrupt()
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 530 * routine which called after IOQ init.
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 531 * Set up interrupt packet and time thresholds
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 532 * for all the OQs
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 533 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 534 time_threshold = cn23xx_pf_get_oq_ticks(
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 535 oct, (u32)CFG_GET_OQ_INTR_TIME(cn23xx->conf));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 536
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 537 octeon_write_csr64(oct, CN23XX_SLI_OQ_PKT_INT_LEVELS(q_no),
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 538 (CFG_GET_OQ_INTR_PKT(cn23xx->conf) |
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 539 (time_threshold << 32)));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 540 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 541
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 542 /** Setting the water mark level for pko back pressure **/
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 @543 writeq(0x40, (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_WMARK);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 544
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 545 /** Disabling setting OQs in reset when ring has no dorebells
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 546 * enabling this will cause of head of line blocking
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 547 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 548 /* Do it only for pass1.1. and pass1.2 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 549 if ((oct->rev_id == OCTEON_CN23XX_REV_1_0) ||
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 550 (oct->rev_id == OCTEON_CN23XX_REV_1_1))
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 @551 writeq(readq((u8 *)oct->mmio[0].hw_addr +
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 552 CN23XX_SLI_GBL_CONTROL) | 0x2,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 553 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_GBL_CONTROL);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 554
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 555 /** Enable channel-level backpressure */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 556 if (oct->pf_num)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 557 writeq(0xffffffffffffffffULL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 558 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OUT_BP_EN2_W1S);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 559 else
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 560 writeq(0xffffffffffffffffULL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 561 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OUT_BP_EN_W1S);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 562 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 563
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 564 static int cn23xx_setup_pf_device_regs(struct octeon_device *oct)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 565 {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 566 cn23xx_enable_error_reporting(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 567
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 568 /* program the MAC(0..3)_RINFO before setting up input/output regs */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 569 cn23xx_setup_global_mac_regs(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 570
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 571 if (cn23xx_pf_setup_global_input_regs(oct))
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 572 return -1;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 573
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 574 cn23xx_pf_setup_global_output_regs(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 575
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 576 /* Default error timeout value should be 0x200000 to avoid host hang
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 577 * when reads invalid register
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 578 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 579 octeon_write_csr64(oct, CN23XX_SLI_WINDOW_CTL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 580 CN23XX_SLI_WINDOW_CTL_DEFAULT);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 581
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 582 /* set SLI_PKT_IN_JABBER to handle large VXLAN packets */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 583 octeon_write_csr64(oct, CN23XX_SLI_PKT_IN_JABBER, CN23XX_INPUT_JABBER);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 584 return 0;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 585 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 586
72c0091293c008 Raghu Vatsavayi 2016-08-31 587 static void cn23xx_setup_iq_regs(struct octeon_device *oct, u32 iq_no)
72c0091293c008 Raghu Vatsavayi 2016-08-31 588 {
72c0091293c008 Raghu Vatsavayi 2016-08-31 589 struct octeon_instr_queue *iq = oct->instr_queue[iq_no];
72c0091293c008 Raghu Vatsavayi 2016-08-31 590 u64 pkt_in_done;
72c0091293c008 Raghu Vatsavayi 2016-08-31 591
72c0091293c008 Raghu Vatsavayi 2016-08-31 592 iq_no += oct->sriov_info.pf_srn;
72c0091293c008 Raghu Vatsavayi 2016-08-31 593
72c0091293c008 Raghu Vatsavayi 2016-08-31 594 /* Write the start of the input queue's ring and its size */
72c0091293c008 Raghu Vatsavayi 2016-08-31 595 octeon_write_csr64(oct, CN23XX_SLI_IQ_BASE_ADDR64(iq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 596 iq->base_addr_dma);
72c0091293c008 Raghu Vatsavayi 2016-08-31 597 octeon_write_csr(oct, CN23XX_SLI_IQ_SIZE(iq_no), iq->max_count);
72c0091293c008 Raghu Vatsavayi 2016-08-31 598
72c0091293c008 Raghu Vatsavayi 2016-08-31 599 /* Remember the doorbell & instruction count register addr
72c0091293c008 Raghu Vatsavayi 2016-08-31 600 * for this queue
72c0091293c008 Raghu Vatsavayi 2016-08-31 601 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 602 iq->doorbell_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 603 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_IQ_DOORBELL(iq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 604 iq->inst_cnt_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 605 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_IQ_INSTR_COUNT64(iq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 606 dev_dbg(&oct->pci_dev->dev, "InstQ[%d]:dbell reg @ 0x%p instcnt_reg @ 0x%p\n",
72c0091293c008 Raghu Vatsavayi 2016-08-31 607 iq_no, iq->doorbell_reg, iq->inst_cnt_reg);
72c0091293c008 Raghu Vatsavayi 2016-08-31 608
72c0091293c008 Raghu Vatsavayi 2016-08-31 609 /* Store the current instruction counter (used in flush_iq
72c0091293c008 Raghu Vatsavayi 2016-08-31 610 * calculation)
72c0091293c008 Raghu Vatsavayi 2016-08-31 611 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 612 pkt_in_done = readq(iq->inst_cnt_reg);
72c0091293c008 Raghu Vatsavayi 2016-08-31 613
5b07aee11227fa Raghu Vatsavayi 2016-08-31 614 if (oct->msix_on) {
5b07aee11227fa Raghu Vatsavayi 2016-08-31 615 /* Set CINT_ENB to enable IQ interrupt */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 616 writeq((pkt_in_done | CN23XX_INTR_CINT_ENB),
5b07aee11227fa Raghu Vatsavayi 2016-08-31 617 iq->inst_cnt_reg);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 618 } else {
72c0091293c008 Raghu Vatsavayi 2016-08-31 619 /* Clear the count by writing back what we read, but don't
72c0091293c008 Raghu Vatsavayi 2016-08-31 620 * enable interrupts
72c0091293c008 Raghu Vatsavayi 2016-08-31 621 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 622 writeq(pkt_in_done, iq->inst_cnt_reg);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 623 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 624
72c0091293c008 Raghu Vatsavayi 2016-08-31 625 iq->reset_instr_cnt = 0;
72c0091293c008 Raghu Vatsavayi 2016-08-31 626 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 627
72c0091293c008 Raghu Vatsavayi 2016-08-31 628 static void cn23xx_setup_oq_regs(struct octeon_device *oct, u32 oq_no)
72c0091293c008 Raghu Vatsavayi 2016-08-31 629 {
72c0091293c008 Raghu Vatsavayi 2016-08-31 630 u32 reg_val;
72c0091293c008 Raghu Vatsavayi 2016-08-31 631 struct octeon_droq *droq = oct->droq[oq_no];
5b07aee11227fa Raghu Vatsavayi 2016-08-31 632 struct octeon_cn23xx_pf *cn23xx = (struct octeon_cn23xx_pf *)oct->chip;
5b07aee11227fa Raghu Vatsavayi 2016-08-31 633 u64 time_threshold;
5b07aee11227fa Raghu Vatsavayi 2016-08-31 634 u64 cnt_threshold;
72c0091293c008 Raghu Vatsavayi 2016-08-31 635
72c0091293c008 Raghu Vatsavayi 2016-08-31 636 oq_no += oct->sriov_info.pf_srn;
72c0091293c008 Raghu Vatsavayi 2016-08-31 637
72c0091293c008 Raghu Vatsavayi 2016-08-31 638 octeon_write_csr64(oct, CN23XX_SLI_OQ_BASE_ADDR64(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 639 droq->desc_ring_dma);
72c0091293c008 Raghu Vatsavayi 2016-08-31 640 octeon_write_csr(oct, CN23XX_SLI_OQ_SIZE(oq_no), droq->max_count);
72c0091293c008 Raghu Vatsavayi 2016-08-31 641
72c0091293c008 Raghu Vatsavayi 2016-08-31 642 octeon_write_csr(oct, CN23XX_SLI_OQ_BUFF_INFO_SIZE(oq_no),
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 643 droq->buffer_size);
72c0091293c008 Raghu Vatsavayi 2016-08-31 644
72c0091293c008 Raghu Vatsavayi 2016-08-31 645 /* Get the mapped address of the pkt_sent and pkts_credit regs */
72c0091293c008 Raghu Vatsavayi 2016-08-31 646 droq->pkts_sent_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 647 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_PKTS_SENT(oq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 648 droq->pkts_credit_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 649 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_PKTS_CREDIT(oq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 650
5b07aee11227fa Raghu Vatsavayi 2016-08-31 651 if (!oct->msix_on) {
72c0091293c008 Raghu Vatsavayi 2016-08-31 652 /* Enable this output queue to generate Packet Timer Interrupt
72c0091293c008 Raghu Vatsavayi 2016-08-31 653 */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 654 reg_val =
5b07aee11227fa Raghu Vatsavayi 2016-08-31 655 octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no));
72c0091293c008 Raghu Vatsavayi 2016-08-31 656 reg_val |= CN23XX_PKT_OUTPUT_CTL_TENB;
72c0091293c008 Raghu Vatsavayi 2016-08-31 657 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 658 reg_val);
72c0091293c008 Raghu Vatsavayi 2016-08-31 659
72c0091293c008 Raghu Vatsavayi 2016-08-31 660 /* Enable this output queue to generate Packet Count Interrupt
72c0091293c008 Raghu Vatsavayi 2016-08-31 661 */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 662 reg_val =
5b07aee11227fa Raghu Vatsavayi 2016-08-31 663 octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no));
72c0091293c008 Raghu Vatsavayi 2016-08-31 664 reg_val |= CN23XX_PKT_OUTPUT_CTL_CENB;
72c0091293c008 Raghu Vatsavayi 2016-08-31 665 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 666 reg_val);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 667 } else {
5b07aee11227fa Raghu Vatsavayi 2016-08-31 668 time_threshold = cn23xx_pf_get_oq_ticks(
5b07aee11227fa Raghu Vatsavayi 2016-08-31 669 oct, (u32)CFG_GET_OQ_INTR_TIME(cn23xx->conf));
5b07aee11227fa Raghu Vatsavayi 2016-08-31 670 cnt_threshold = (u32)CFG_GET_OQ_INTR_PKT(cn23xx->conf);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 671
5b07aee11227fa Raghu Vatsavayi 2016-08-31 672 octeon_write_csr64(
5b07aee11227fa Raghu Vatsavayi 2016-08-31 673 oct, CN23XX_SLI_OQ_PKT_INT_LEVELS(oq_no),
5b07aee11227fa Raghu Vatsavayi 2016-08-31 674 ((time_threshold << 32 | cnt_threshold)));
5b07aee11227fa Raghu Vatsavayi 2016-08-31 675 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 676 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 677
5d65556beb3668 Raghu Vatsavayi 2016-11-14 678 static void cn23xx_pf_mbox_thread(struct work_struct *work)
5d65556beb3668 Raghu Vatsavayi 2016-11-14 679 {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 680 struct cavium_wk *wk = (struct cavium_wk *)work;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 681 struct octeon_mbox *mbox = (struct octeon_mbox *)wk->ctxptr;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 682 struct octeon_device *oct = mbox->oct_dev;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 683 u64 mbox_int_val, val64;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 684 u32 q_no, i;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 685
5d65556beb3668 Raghu Vatsavayi 2016-11-14 686 if (oct->rev_id < OCTEON_CN23XX_REV_1_1) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 687 /*read and clear by writing 1*/
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @688 mbox_int_val = readq(mbox->mbox_int_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @689 writeq(mbox_int_val, mbox->mbox_int_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 690
5d65556beb3668 Raghu Vatsavayi 2016-11-14 691 for (i = 0; i < oct->sriov_info.num_vfs_alloced; i++) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 692 q_no = i * oct->sriov_info.rings_per_vf;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 693
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @694 val64 = readq(oct->mbox[q_no]->mbox_write_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 695
5d65556beb3668 Raghu Vatsavayi 2016-11-14 696 if (val64 && (val64 != OCTEON_PFVFACK)) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 697 if (octeon_mbox_read(oct->mbox[q_no]))
5d65556beb3668 Raghu Vatsavayi 2016-11-14 698 octeon_mbox_process_message(
5d65556beb3668 Raghu Vatsavayi 2016-11-14 699 oct->mbox[q_no]);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 700 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 701 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 702
5d65556beb3668 Raghu Vatsavayi 2016-11-14 703 schedule_delayed_work(&wk->work, msecs_to_jiffies(10));
5d65556beb3668 Raghu Vatsavayi 2016-11-14 704 } else {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 705 octeon_mbox_process_message(mbox);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 706 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 707 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 708
:::::: The code at line 543 was first introduced by commit
:::::: 3451b97cce2d7827bd76378ae6e9aeb7e8fc463d liquidio: CN23XX register setup
:::::: TO: Raghu Vatsavayi <rvatsavayi(a)caviumnetworks.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/iommu/amd/init.c:3073:19: warning: no previous prototype for 'get_amd_iommu'
by kernel test robot
Hi Joerg,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: ad8694bac410e5d72ad610dfb146f58bf2fe0365 iommu/amd: Move AMD IOMMU driver into subdirectory
date: 10 weeks ago
config: x86_64-randconfig-r034-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout ad8694bac410e5d72ad610dfb146f58bf2fe0365
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/iommu/amd/init.c:3073:19: warning: no previous prototype for 'get_amd_iommu' [-Wmissing-prototypes]
3073 | struct amd_iommu *get_amd_iommu(unsigned int idx)
| ^~~~~~~~~~~~~
>> drivers/iommu/amd/init.c:3092:4: warning: no previous prototype for 'amd_iommu_pc_get_max_banks' [-Wmissing-prototypes]
3092 | u8 amd_iommu_pc_get_max_banks(unsigned int idx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/amd/init.c:3103:6: warning: no previous prototype for 'amd_iommu_pc_supported' [-Wmissing-prototypes]
3103 | bool amd_iommu_pc_supported(void)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/amd/init.c:3109:4: warning: no previous prototype for 'amd_iommu_pc_get_max_counters' [-Wmissing-prototypes]
3109 | u8 amd_iommu_pc_get_max_counters(unsigned int idx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/amd/init.c:3158:5: warning: no previous prototype for 'amd_iommu_pc_get_reg' [-Wmissing-prototypes]
3158 | int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/iommu/amd/init.c:3167:5: warning: no previous prototype for 'amd_iommu_pc_set_reg' [-Wmissing-prototypes]
3167 | int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
| ^~~~~~~~~~~~~~~~~~~~
# 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 ad8694bac410e5d72ad610dfb146f58bf2fe0365
vim +/get_amd_iommu +3073 drivers/iommu/amd/init.c
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3072
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3073 struct amd_iommu *get_amd_iommu(unsigned int idx)
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3074 {
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3075 unsigned int i = 0;
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3076 struct amd_iommu *iommu;
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3077
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3078 for_each_iommu(iommu)
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3079 if (i++ == idx)
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3080 return iommu;
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3081 return NULL;
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3082 }
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3083 EXPORT_SYMBOL(get_amd_iommu);
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3084
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3085 /****************************************************************************
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3086 *
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3087 * IOMMU EFR Performance Counter support functionality. This code allows
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3088 * access to the IOMMU PC functionality.
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3089 *
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3090 ****************************************************************************/
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3091
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3092 u8 amd_iommu_pc_get_max_banks(unsigned int idx)
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3093 {
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3094 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3095
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3096 if (iommu)
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3097 return iommu->max_banks;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3098
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3099 return 0;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3100 }
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3101 EXPORT_SYMBOL(amd_iommu_pc_get_max_banks);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3102
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 @3103 bool amd_iommu_pc_supported(void)
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3104 {
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3105 return amd_iommu_pc_present;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3106 }
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3107 EXPORT_SYMBOL(amd_iommu_pc_supported);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3108
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3109 u8 amd_iommu_pc_get_max_counters(unsigned int idx)
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3110 {
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3111 struct amd_iommu *iommu = get_amd_iommu(idx);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3112
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3113 if (iommu)
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3114 return iommu->max_counters;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3115
f5863a00e73c432 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3116 return 0;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3117 }
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3118 EXPORT_SYMBOL(amd_iommu_pc_get_max_counters);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3119
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3120 static int iommu_pc_get_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr,
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3121 u8 fxn, u64 *value, bool is_write)
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3122 {
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3123 u32 offset;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3124 u32 max_offset_lim;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3125
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3126 /* Make sure the IOMMU PC resource is available */
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3127 if (!amd_iommu_pc_present)
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3128 return -ENODEV;
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3129
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3130 /* Check for valid iommu and pc register indexing */
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3131 if (WARN_ON(!iommu || (fxn > 0x28) || (fxn & 7)))
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3132 return -ENODEV;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3133
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3134 offset = (u32)(((0x40 | bank) << 12) | (cntr << 8) | fxn);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3135
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3136 /* Limit the offset to the hw defined mmio region aperture */
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3137 max_offset_lim = (u32)(((0x40 | iommu->max_banks) << 12) |
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3138 (iommu->max_counters << 8) | 0x28);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3139 if ((offset < MMIO_CNTR_REG_OFFSET) ||
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3140 (offset > max_offset_lim))
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3141 return -EINVAL;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3142
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3143 if (is_write) {
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3144 u64 val = *value & GENMASK_ULL(47, 0);
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3145
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3146 writel((u32)val, iommu->mmio_base + offset);
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3147 writel((val >> 32), iommu->mmio_base + offset + 4);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3148 } else {
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3149 *value = readl(iommu->mmio_base + offset + 4);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3150 *value <<= 32;
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3151 *value |= readl(iommu->mmio_base + offset);
0a6d80c70b9150d drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3152 *value &= GENMASK_ULL(47, 0);
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3153 }
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3154
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3155 return 0;
30861ddc9cca479 drivers/iommu/amd_iommu_init.c Steven L Kinney 2013-06-05 3156 }
38e45d02ea9f194 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3157
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3158 int amd_iommu_pc_get_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
38e45d02ea9f194 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3159 {
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3160 if (!iommu)
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3161 return -EINVAL;
38e45d02ea9f194 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2016-02-23 3162
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3163 return iommu_pc_get_set_reg(iommu, bank, cntr, fxn, value, false);
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3164 }
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3165 EXPORT_SYMBOL(amd_iommu_pc_get_reg);
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 3166
1650dfd1a9bcde8 drivers/iommu/amd_iommu_init.c Suravee Suthikulpanit 2017-02-24 @3167 int amd_iommu_pc_set_reg(struct amd_iommu *iommu, u8 bank, u8 cntr, u8 fxn, u64 *value)
:::::: The code at line 3073 was first introduced by commit
:::::: f5863a00e73c432b91e4efe1d68778b4ace6a892 x86/events/amd/iommu.c: Modify functions to query max banks and counters
:::::: TO: Suravee Suthikulpanit <Suravee.Suthikulpanit(a)amd.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: sparse: incorrect type in argument 2 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: sparc-randconfig-s031-20200817 (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-180-g49f7e13a-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sparc
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 >>)
drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: got restricted __be32 [usertype]
>> drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
>> drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:362:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:406:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:406:24: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:406:24: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:406:24: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:409:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:752:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:869:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:627:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:692:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:594:18: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:594:18: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:594:18: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:594:18: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:600:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:600:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:600:16: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:600:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1029:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1030:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1066:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1066:15: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1066:15: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1066:15: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1074:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1075:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1077:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1083:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1091:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:328:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:329:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:329:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:329:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:329:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:329:9: sparse: expected void volatile [noderef] __iomem *addr
--
drivers/net/ethernet/aeroflex/greth.c:1173:15: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1173:15: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1174:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1174:25: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1174:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1174:25: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1189:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1211:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1211:32: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1211:32: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1211:32: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1222:25: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1367:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct greth_regs *regs @@ got void [noderef] __iomem * @@
drivers/net/ethernet/aeroflex/greth.c:1367:21: sparse: expected struct greth_regs *regs
drivers/net/ethernet/aeroflex/greth.c:1367:21: sparse: got void [noderef] __iomem *
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1388:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1392:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1392:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1392:16: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1392:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1402:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1402:27: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1402:27: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1402:27: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1405:15: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1405:15: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1405:15: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1405:15: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1416:17: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1478:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1479:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int * @@
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:1483:9: sparse: got unsigned int *
drivers/net/ethernet/aeroflex/greth.c:1521:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct greth_regs *regs @@
drivers/net/ethernet/aeroflex/greth.c:1521:46: sparse: expected void [noderef] __iomem *base
drivers/net/ethernet/aeroflex/greth.c:1521:46: sparse: got struct greth_regs *regs
drivers/net/ethernet/aeroflex/greth.c:1544:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __iomem *base @@ got struct greth_regs *regs @@
drivers/net/ethernet/aeroflex/greth.c:1544:47: sparse: expected void [noderef] __iomem *base
drivers/net/ethernet/aeroflex/greth.c:1544:47: sparse: got struct greth_regs *regs
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: expected void const volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:162:16: sparse: sparse: cast to restricted __be32
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: got restricted __be32 [usertype]
>> drivers/net/ethernet/aeroflex/greth.c:157:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned int [usertype] *bd @@
drivers/net/ethernet/aeroflex/greth.c:157:40: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/aeroflex/greth.c:157:40: sparse: got unsigned int [usertype] *bd
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __be32 [usertype] @@
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: expected unsigned int [usertype] value
drivers/net/ethernet/aeroflex/greth.c:157:22: sparse: got restricted __be32 [usertype]
drivers/net/ethernet/aeroflex/greth.c:157:40: sparse: sparse: too many warnings
# 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 670d0a4b10704667765f7d18f7592993d02783aa
vim +362 drivers/net/ethernet/aeroflex/greth.c
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 337
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 338 static int greth_open(struct net_device *dev)
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 339 {
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 340 struct greth_private *greth = netdev_priv(dev);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 341 int err;
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 342
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 343 err = greth_init_rings(greth);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 344 if (err) {
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 345 if (netif_msg_ifup(greth))
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 346 dev_err(&dev->dev, "Could not allocate memory for DMA rings\n");
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 347 return err;
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 348 }
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 349
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 350 err = request_irq(greth->irq, greth_interrupt, 0, "eth", (void *) dev);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 351 if (err) {
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 352 if (netif_msg_ifup(greth))
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 353 dev_err(&dev->dev, "Could not allocate interrupt %d\n", dev->irq);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 354 greth_clean_rings(greth);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 355 return err;
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 356 }
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 357
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 358 if (netif_msg_ifup(greth))
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 359 dev_dbg(&dev->dev, " starting queue\n");
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 360 netif_start_queue(dev);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 361
bbe9e637330abe5 drivers/net/greth.c Daniel Hellstrom 2011-01-14 @362 GRETH_REGSAVE(greth->regs->status, 0xFF);
bbe9e637330abe5 drivers/net/greth.c Daniel Hellstrom 2011-01-14 363
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 364 napi_enable(&greth->napi);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 365
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 366 greth_enable_irqs(greth);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 367 greth_enable_tx(greth);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 368 greth_enable_rx(greth);
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 369 return 0;
d4c41139df6e74c drivers/net/greth.c Kristoffer Glembo 2010-02-15 370
:::::: The code at line 362 was first introduced by commit
:::::: bbe9e637330abe55442aebe799425e224086959f GRETH: fix opening/closing
:::::: TO: Daniel Hellstrom <daniel(a)gaisler.com>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH 1/3] staging: androind: Replace BUG_ONs with WARN_ONs
by kernel test robot
Hi Tomer,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v5.8 next-20200814]
[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/Tomer-Samara/Replac-BAG-BAG_ON-w...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 86cfccb66937dd6cbf26ed619958b9e587e6a115
config: x86_64-randconfig-a011-20200817 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ab9fc8bae805c785066779e76e7846aabad5609e)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> drivers/staging/android/ion/ion_page_pool.c:50:15: error: expected ';' after return statement
return NULL:
^
;
1 error generated.
# https://github.com/0day-ci/linux/commit/71d27df2e46fe435ada18ac3dae964d6b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tomer-Samara/Replac-BAG-BAG_ON-with-WARN-WARN_ON/20200817-012333
git checkout 71d27df2e46fe435ada18ac3dae964d6b9a74664
vim +50 drivers/staging/android/ion/ion_page_pool.c
43
44 static struct page *ion_page_pool_remove(struct ion_page_pool *pool, bool high)
45 {
46 struct page *page;
47
48 if (high) {
49 if (WARN_ON(!pool->high_count))
> 50 return NULL:
51 page = list_first_entry(&pool->high_items, struct page, lru);
52 pool->high_count--;
53 } else {
54 if (WARN_ON(!pool->low_count))
55 return NULL;
56 page = list_first_entry(&pool->low_items, struct page, lru);
57 pool->low_count--;
58 }
59
60 list_del(&page->lru);
61 mod_node_page_state(page_pgdat(page), NR_KERNEL_MISC_RECLAIMABLE,
62 -(1 << pool->order));
63 return page;
64 }
65
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
arch/alpha/include/asm/irqflags.h:47:9: sparse: sparse: context imbalance in '_conn_request_state' - unexpected unlock
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: 80591e61a0f7e88deaada69844e4a31280c4a38f kbuild: tell sparse about the $ARCH
date: 9 months ago
config: alpha-randconfig-s032-20200817 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-180-g49f7e13a-dirty
git checkout 80591e61a0f7e88deaada69844e4a31280c4a38f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
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 >>)
drivers/block/drbd/drbd_state.c:1903:30: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_state.c:1903:30: sparse: struct disk_conf [noderef] <asn:4> *
drivers/block/drbd/drbd_state.c:1903:30: sparse: struct disk_conf *
drivers/block/drbd/drbd_state.c:834:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_state.c:834:22: sparse: struct disk_conf [noderef] <asn:4> *
drivers/block/drbd/drbd_state.c:834:22: sparse: struct disk_conf *
drivers/block/drbd/drbd_state.c:838:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_state.c:838:14: sparse: struct net_conf [noderef] <asn:4> *
drivers/block/drbd/drbd_state.c:838:14: sparse: struct net_conf *
drivers/block/drbd/drbd_state.c:1064:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_state.c:1064:22: sparse: struct disk_conf [noderef] <asn:4> *
drivers/block/drbd/drbd_state.c:1064:22: sparse: struct disk_conf *
drivers/block/drbd/drbd_state.c:1341:36: sparse: sparse: cast to non-scalar
drivers/block/drbd/drbd_state.c:1342:36: sparse: sparse: cast to non-scalar
drivers/block/drbd/drbd_state.c:2069:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/block/drbd/drbd_state.c:2069:17: sparse: struct net_conf [noderef] <asn:4> *
drivers/block/drbd/drbd_state.c:2069:17: sparse: struct net_conf *
drivers/block/drbd/drbd_state.c:838:14: sparse: sparse: context imbalance in 'is_valid_state' - different lock contexts for basic block
drivers/block/drbd/drbd_state.c:1070:9: sparse: sparse: context imbalance in 'sanitize_state' - different lock contexts for basic block
drivers/block/drbd/drbd_state.c:1949:25: sparse: sparse: context imbalance in 'after_state_ch' - unexpected unlock
drivers/block/drbd/drbd_state.c: note: in included file (through include/linux/irqflags.h, include/linux/spinlock.h, include/linux/mmzone.h, ...):
>> arch/alpha/include/asm/irqflags.h:47:9: sparse: sparse: context imbalance in '_conn_request_state' - unexpected unlock
# 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 80591e61a0f7e88deaada69844e4a31280c4a38f
vim +/_conn_request_state +47 arch/alpha/include/asm/irqflags.h
df9ee29270c11db David Howells 2010-10-07 44
df9ee29270c11db David Howells 2010-10-07 45 static inline void arch_local_irq_enable(void)
df9ee29270c11db David Howells 2010-10-07 46 {
df9ee29270c11db David Howells 2010-10-07 @47 barrier();
df9ee29270c11db David Howells 2010-10-07 48 setipl(IPL_MIN);
df9ee29270c11db David Howells 2010-10-07 49 }
df9ee29270c11db David Howells 2010-10-07 50
:::::: The code at line 47 was first introduced by commit
:::::: df9ee29270c11dba7d0fe0b83ce47a4d8e8d2101 Fix IRQ flag handling naming
:::::: TO: David Howells <dhowells(a)redhat.com>
:::::: CC: David Howells <dhowells(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[sashal-linux-stable:queue-5.4 21/214] drivers/clk/clk-scmi.c:134:9: warning: Identical condition 'ret', second condition is always false
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 84bd178b93c5dd8e856f8cd3266e7c1641eab81c
commit: 336512c9d93ebc3562119ede6450b6309b8af1e6 [21/214] clk: scmi: Fix min and max rate when registering clocks with discrete rates
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/clk/clk-scmi.c:134:9: warning: Identical condition 'ret', second condition is always false [identicalConditionAfterEarlyExit]
return ret;
^
drivers/clk/clk-scmi.c:117:6: note: first condition
if (ret)
^
drivers/clk/clk-scmi.c:134:9: note: second condition
return ret;
^
--
>> drivers/gpu/drm/arm/malidp_planes.c:411:18: warning: Redundant condition: afbc. '!afbc || (afbc && sparse)' is equivalent to '!afbc || sparse' [redundantCondition]
return (!afbc) || (afbc && sparse);
^
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 336512c9d93ebc3562119ede6450b6309b8af1e6
vim +/ret +134 drivers/clk/clk-scmi.c
6d6a1d82eaef705 Sudeep Holla 2017-06-13 102
6d6a1d82eaef705 Sudeep Holla 2017-06-13 103 static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk)
6d6a1d82eaef705 Sudeep Holla 2017-06-13 104 {
6d6a1d82eaef705 Sudeep Holla 2017-06-13 105 int ret;
336512c9d93ebc3 Sudeep Holla 2020-07-09 106 unsigned long min_rate, max_rate;
336512c9d93ebc3 Sudeep Holla 2020-07-09 107
6d6a1d82eaef705 Sudeep Holla 2017-06-13 108 struct clk_init_data init = {
6d6a1d82eaef705 Sudeep Holla 2017-06-13 109 .flags = CLK_GET_RATE_NOCACHE,
6d6a1d82eaef705 Sudeep Holla 2017-06-13 110 .num_parents = 0,
6d6a1d82eaef705 Sudeep Holla 2017-06-13 111 .ops = &scmi_clk_ops,
6d6a1d82eaef705 Sudeep Holla 2017-06-13 112 .name = sclk->info->name,
6d6a1d82eaef705 Sudeep Holla 2017-06-13 113 };
6d6a1d82eaef705 Sudeep Holla 2017-06-13 114
6d6a1d82eaef705 Sudeep Holla 2017-06-13 115 sclk->hw.init = &init;
6d6a1d82eaef705 Sudeep Holla 2017-06-13 116 ret = devm_clk_hw_register(dev, &sclk->hw);
336512c9d93ebc3 Sudeep Holla 2020-07-09 117 if (ret)
336512c9d93ebc3 Sudeep Holla 2020-07-09 118 return ret;
336512c9d93ebc3 Sudeep Holla 2020-07-09 119
336512c9d93ebc3 Sudeep Holla 2020-07-09 120 if (sclk->info->rate_discrete) {
336512c9d93ebc3 Sudeep Holla 2020-07-09 121 int num_rates = sclk->info->list.num_rates;
336512c9d93ebc3 Sudeep Holla 2020-07-09 122
336512c9d93ebc3 Sudeep Holla 2020-07-09 123 if (num_rates <= 0)
336512c9d93ebc3 Sudeep Holla 2020-07-09 124 return -EINVAL;
336512c9d93ebc3 Sudeep Holla 2020-07-09 125
336512c9d93ebc3 Sudeep Holla 2020-07-09 126 min_rate = sclk->info->list.rates[0];
336512c9d93ebc3 Sudeep Holla 2020-07-09 127 max_rate = sclk->info->list.rates[num_rates - 1];
336512c9d93ebc3 Sudeep Holla 2020-07-09 128 } else {
336512c9d93ebc3 Sudeep Holla 2020-07-09 129 min_rate = sclk->info->range.min_rate;
336512c9d93ebc3 Sudeep Holla 2020-07-09 130 max_rate = sclk->info->range.max_rate;
336512c9d93ebc3 Sudeep Holla 2020-07-09 131 }
336512c9d93ebc3 Sudeep Holla 2020-07-09 132
336512c9d93ebc3 Sudeep Holla 2020-07-09 133 clk_hw_set_rate_range(&sclk->hw, min_rate, max_rate);
6d6a1d82eaef705 Sudeep Holla 2017-06-13 @134 return ret;
6d6a1d82eaef705 Sudeep Holla 2017-06-13 135 }
6d6a1d82eaef705 Sudeep Holla 2017-06-13 136
:::::: The code at line 134 was first introduced by commit
:::::: 6d6a1d82eaef705f150c441350559bf5daccb533 clk: add support for clocks provided by SCMI
:::::: TO: Sudeep Holla <sudeep.holla(a)arm.com>
:::::: CC: Sudeep Holla <sudeep.holla(a)arm.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month