[joonsoo-kim:cleanup-migration-target-allocation-v5.00-next-20200703 1/18] drivers/net/ethernet/pensando/ionic/ionic_main.c:433:2: warning: 'strncpy' output truncated copying 31 bytes from a string of length 44
by kernel test robot
tree: https://github.com/JoonsooKim/linux.git cleanup-migration-target-allocation-v5.00-next-20200703
head: 8ffe3ea7c99f6f61a0cd895c99b2ff64ef392a19
commit: 764cf3f1a528aa8ab63dd97c1ca407e833b533ed [1/18] Revert "mm/page_alloc: remove a wrapper for alloc_migration_target()"
config: ia64-randconfig-r022-20200713 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 764cf3f1a528aa8ab63dd97c1ca407e833b533ed
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/pensando/ionic/ionic_main.c: In function 'ionic_identify':
>> drivers/net/ethernet/pensando/ionic/ionic_main.c:433:2: warning: 'strncpy' output truncated copying 31 bytes from a string of length 44 [-Wstringop-truncation]
433 | strncpy(ident->drv.driver_ver_str, UTS_RELEASE,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
434 | sizeof(ident->drv.driver_ver_str) - 1);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +433 drivers/net/ethernet/pensando/ionic/ionic_main.c
fbfb8031533c92 Shannon Nelson 2019-09-03 422
fbfb8031533c92 Shannon Nelson 2019-09-03 423 int ionic_identify(struct ionic *ionic)
fbfb8031533c92 Shannon Nelson 2019-09-03 424 {
fbfb8031533c92 Shannon Nelson 2019-09-03 425 struct ionic_identity *ident = &ionic->ident;
fbfb8031533c92 Shannon Nelson 2019-09-03 426 struct ionic_dev *idev = &ionic->idev;
fbfb8031533c92 Shannon Nelson 2019-09-03 427 size_t sz;
fbfb8031533c92 Shannon Nelson 2019-09-03 428 int err;
fbfb8031533c92 Shannon Nelson 2019-09-03 429
fbfb8031533c92 Shannon Nelson 2019-09-03 430 memset(ident, 0, sizeof(*ident));
fbfb8031533c92 Shannon Nelson 2019-09-03 431
fbfb8031533c92 Shannon Nelson 2019-09-03 432 ident->drv.os_type = cpu_to_le32(IONIC_OS_TYPE_LINUX);
1fcbebf115d9ce Shannon Nelson 2020-03-06 @433 strncpy(ident->drv.driver_ver_str, UTS_RELEASE,
fbfb8031533c92 Shannon Nelson 2019-09-03 434 sizeof(ident->drv.driver_ver_str) - 1);
fbfb8031533c92 Shannon Nelson 2019-09-03 435
fbfb8031533c92 Shannon Nelson 2019-09-03 436 mutex_lock(&ionic->dev_cmd_lock);
fbfb8031533c92 Shannon Nelson 2019-09-03 437
fbfb8031533c92 Shannon Nelson 2019-09-03 438 sz = min(sizeof(ident->drv), sizeof(idev->dev_cmd_regs->data));
fbfb8031533c92 Shannon Nelson 2019-09-03 439 memcpy_toio(&idev->dev_cmd_regs->data, &ident->drv, sz);
fbfb8031533c92 Shannon Nelson 2019-09-03 440
fbfb8031533c92 Shannon Nelson 2019-09-03 441 ionic_dev_cmd_identify(idev, IONIC_IDENTITY_VERSION_1);
fbfb8031533c92 Shannon Nelson 2019-09-03 442 err = ionic_dev_cmd_wait(ionic, DEVCMD_TIMEOUT);
fbfb8031533c92 Shannon Nelson 2019-09-03 443 if (!err) {
fbfb8031533c92 Shannon Nelson 2019-09-03 444 sz = min(sizeof(ident->dev), sizeof(idev->dev_cmd_regs->data));
fbfb8031533c92 Shannon Nelson 2019-09-03 445 memcpy_fromio(&ident->dev, &idev->dev_cmd_regs->data, sz);
fbfb8031533c92 Shannon Nelson 2019-09-03 446 }
fbfb8031533c92 Shannon Nelson 2019-09-03 447
fbfb8031533c92 Shannon Nelson 2019-09-03 448 mutex_unlock(&ionic->dev_cmd_lock);
fbfb8031533c92 Shannon Nelson 2019-09-03 449
fbfb8031533c92 Shannon Nelson 2019-09-03 450 if (err)
fbfb8031533c92 Shannon Nelson 2019-09-03 451 goto err_out_unmap;
fbfb8031533c92 Shannon Nelson 2019-09-03 452
fbfb8031533c92 Shannon Nelson 2019-09-03 453 ionic_debugfs_add_ident(ionic);
fbfb8031533c92 Shannon Nelson 2019-09-03 454
fbfb8031533c92 Shannon Nelson 2019-09-03 455 return 0;
fbfb8031533c92 Shannon Nelson 2019-09-03 456
fbfb8031533c92 Shannon Nelson 2019-09-03 457 err_out_unmap:
fbfb8031533c92 Shannon Nelson 2019-09-03 458 return err;
fbfb8031533c92 Shannon Nelson 2019-09-03 459 }
fbfb8031533c92 Shannon Nelson 2019-09-03 460
:::::: The code at line 433 was first introduced by commit
:::::: 1fcbebf115d9ce077c2ba5ecfb521cc1eedcb467 ionic: drop ethtool driver version
:::::: TO: Shannon Nelson <snelson(a)pensando.io>
:::::: 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, 2 months
[rcu:rcu/test 64/65] include/linux/kernel.h:1002:17: warning: cast to pointer from integer of different size
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/test
head: e4d26431bafa60b212117ec5750833d39ce1b2aa
commit: f89bf7a94ffa9446a341fefc18153e8f9bebffbb [64/65] kvm: mmu: page_track: Fix RCU list API usage
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout f89bf7a94ffa9446a341fefc18153e8f9bebffbb
# 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 >>):
In file included from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kvm_host.h:12,
from arch/x86/kvm/mmu/page_track.c:14:
arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_write':
include/linux/rculist.h:727:30: error: expected expression before ',' token
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/preempt.h:11,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/compiler.h:293:2: error: expected statement before ')' token
293 | })
| ^
include/linux/list.h:955:12: note: in definition of macro 'hlist_entry_safe'
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
include/linux/rcupdate.h:366:25: note: in expansion of macro 'READ_ONCE'
366 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rculist.h:728:30: note: in expansion of macro 'rcu_dereference_raw'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:367:35: error: '________p1' undeclared (first use in this function)
367 | ((typeof(*p) __force __kernel *)(________p1)); \
| ^~~~~~~~~~
include/linux/list.h:955:12: note: in definition of macro 'hlist_entry_safe'
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
include/linux/rculist.h:728:30: note: in expansion of macro 'rcu_dereference_raw'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:367:35: note: each undeclared identifier is reported only once for each function it appears in
367 | ((typeof(*p) __force __kernel *)(________p1)); \
| ^~~~~~~~~~
include/linux/list.h:955:12: note: in definition of macro 'hlist_entry_safe'
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
include/linux/rculist.h:728:30: note: in expansion of macro 'rcu_dereference_raw'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:955:27: warning: initialization of 'int' from 'struct hlist_node *' makes integer from pointer without a cast [-Wint-conversion]
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
>> include/linux/kernel.h:1002:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1002 | void *__mptr = (void *)(ptr); \
| ^
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/kernel.h:1003:32: error: invalid type argument of unary '*' (have 'int')
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1004:18: error: invalid type argument of unary '*' (have 'int')
1004 | !__same_type(*(ptr), void), \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1004:6: note: in expansion of macro '__same_type'
1004 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kvm_host.h:12,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:232:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
232 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c: In function 'kvm_page_track_flush_slot':
include/linux/rculist.h:727:30: error: expected expression before ',' token
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/preempt.h:11,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/compiler.h:293:2: error: expected statement before ')' token
293 | })
| ^
include/linux/list.h:955:12: note: in definition of macro 'hlist_entry_safe'
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
include/linux/rcupdate.h:366:25: note: in expansion of macro 'READ_ONCE'
366 | typeof(p) ________p1 = READ_ONCE(p); \
| ^~~~~~~~~
include/linux/rculist.h:728:30: note: in expansion of macro 'rcu_dereference_raw'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/rcupdate.h:367:35: error: '________p1' undeclared (first use in this function)
367 | ((typeof(*p) __force __kernel *)(________p1)); \
| ^~~~~~~~~~
include/linux/list.h:955:12: note: in definition of macro 'hlist_entry_safe'
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^~~
include/linux/rculist.h:728:30: note: in expansion of macro 'rcu_dereference_raw'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:955:27: warning: initialization of 'int' from 'struct hlist_node *' makes integer from pointer without a cast [-Wint-conversion]
955 | ({ typeof(ptr) ____ptr = (ptr); \
| ^
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
>> include/linux/kernel.h:1002:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1002 | void *__mptr = (void *)(ptr); \
| ^
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/bug.h:5,
from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/percpu.h:5,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/kernel.h:1003:32: error: invalid type argument of unary '*' (have 'int')
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1004:18: error: invalid type argument of unary '*' (have 'int')
1004 | !__same_type(*(ptr), void), \
| ^~~~~~
include/linux/compiler.h:372:9: note: in definition of macro '__compiletime_assert'
372 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro '_compiletime_assert'
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1004:6: note: in expansion of macro '__same_type'
1004 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:945:40: note: in expansion of macro 'container_of'
945 | #define hlist_entry(ptr, type, member) container_of(ptr,type,member)
| ^~~~~~~~~~~~
include/linux/list.h:956:15: note: in expansion of macro 'hlist_entry'
956 | ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
| ^~~~~~~~~~~
include/linux/rculist.h:728:13: note: in expansion of macro 'hlist_entry_safe'
728 | pos = hlist_entry_safe(rcu_dereference_raw(hlist_first_rcu(head)),\
| ^~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kvm_host.h:12,
from arch/x86/kvm/mmu/page_track.c:14:
include/linux/rculist.h:727:30: warning: left-hand operand of comma expression has no effect [-Wunused-value]
727 | for (__list_check_srcu(cond), \
| ^
arch/x86/kvm/mmu/page_track.c:258:2: note: in expansion of macro 'hlist_for_each_entry_srcu'
258 | hlist_for_each_entry_srcu(n, &head->track_notifier_list, node,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +1002 include/linux/kernel.h
cf14f27f82af78 Alexei Starovoitov 2018-03-28 993
^1da177e4c3f41 Linus Torvalds 2005-04-16 994 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 995 * container_of - cast a member of a structure out to the containing structure
^1da177e4c3f41 Linus Torvalds 2005-04-16 996 * @ptr: the pointer to the member.
^1da177e4c3f41 Linus Torvalds 2005-04-16 997 * @type: the type of the container struct this is embedded in.
^1da177e4c3f41 Linus Torvalds 2005-04-16 998 * @member: the name of the member within the struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16 999 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 1000 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1001 #define container_of(ptr, type, member) ({ \
c7acec713d14c6 Ian Abbott 2017-07-12 @1002 void *__mptr = (void *)(ptr); \
c7acec713d14c6 Ian Abbott 2017-07-12 1003 BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
c7acec713d14c6 Ian Abbott 2017-07-12 1004 !__same_type(*(ptr), void), \
c7acec713d14c6 Ian Abbott 2017-07-12 1005 "pointer type mismatch in container_of()"); \
c7acec713d14c6 Ian Abbott 2017-07-12 1006 ((type *)(__mptr - offsetof(type, member))); })
^1da177e4c3f41 Linus Torvalds 2005-04-16 1007
:::::: The code at line 1002 was first introduced by commit
:::::: c7acec713d14c6ce8a20154f9dfda258d6bcad3b kernel.h: handle pointers to arrays better in container_of()
:::::: TO: Ian Abbott <abbotti(a)mev.co.uk>
:::::: 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, 2 months
[jirislaby:devel 20/44] include/asm-generic/bug.h:6:10: fatal error: linux/instrumentation.h: No such file or directory
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: c483940d9c2c153ce8196c840d37e64362969300
commit: 9c171d50b2469ab7839b463defc2d50247dc3276 [20/44] include condition in the BUG_ON/WARN_ON output
config: x86_64-randconfig-r034-20200713 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 9c171d50b2469ab7839b463defc2d50247dc3276
# 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 errors (new ones prefixed by >>):
In file included from arch/x86/include/asm/bug.h:92,
from include/linux/bug.h:5,
from include/linux/jump_label.h:250,
from arch/x86/include/asm/string_64.h:6,
from arch/x86/include/asm/string.h:5,
from include/linux/string.h:20,
from include/linux/uuid.h:12,
from include/linux/mod_devicetable.h:13,
from scripts/mod/devicetable-offsets.c:3:
>> include/asm-generic/bug.h:6:10: fatal error: linux/instrumentation.h: No such file or directory
6 | #include <linux/instrumentation.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:114: scripts/mod/devicetable-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1182: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +6 include/asm-generic/bug.h
4
5 #include <linux/compiler.h>
> 6 #include <linux/instrumentation.h>
7 #include <linux/stringify.h>
8
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[vhost:config-endian 38/39] drivers/platform/mellanox/mlxbf-tmfifo.c:1241:22: error: expected ')' before ';' token
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git config-endian
head: df43c8f58f42ec36e91740f91ea7360f63213004
commit: e1e22056bc3641f340ed27012cfd1b8b05f83a0a [38/39] fixup! virtio_net: correct tags for config space fields
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e1e22056bc3641f340ed27012cfd1b8b05f83a0a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/platform/mellanox/mlxbf-tmfifo.c: In function 'mlxbf_tmfifo_probe':
drivers/platform/mellanox/mlxbf-tmfifo.c:1237:70: warning: value computed is not used [-Wunused-value]
1237 | #define MLXBF_TMFIFO_LITTLE_ENDIAN (virtio_legacy_is_little_endian() || \
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
1238 | (MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/mellanox/mlxbf-tmfifo.c:1240:37: note: in expansion of macro 'MLXBF_TMFIFO_LITTLE_ENDIAN'
1240 | net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1241:22: error: expected ')' before ';' token
1241 | ETH_DATA_LEN);
| ^
| )
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1240:19: error: too few arguments to function '__cpu_to_virtio16'
1240 | net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
| ^~~~~~~~~~~~~~~~~
In file included from include/linux/virtio_config.h:8,
from drivers/platform/mellanox/mlxbf-tmfifo.c:18:
include/linux/virtio_byteorder.h:24:26: note: declared here
24 | static inline __virtio16 __cpu_to_virtio16(bool little_endian, u16 val)
| ^~~~~~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1290:1: error: expected declaration or statement at end of input
1290 | MODULE_AUTHOR("Mellanox Technologies");
| ^~~~~~~~~~~~~
>> drivers/platform/mellanox/mlxbf-tmfifo.c:1232:3: error: label 'fail' used but not defined
1232 | goto fail;
| ^~~~
At top level:
drivers/platform/mellanox/mlxbf-tmfifo.c:1183:12: warning: 'mlxbf_tmfifo_probe' defined but not used [-Wunused-function]
1183 | static int mlxbf_tmfifo_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~
drivers/platform/mellanox/mlxbf-tmfifo.c:1170:13: warning: 'mlxbf_tmfifo_cleanup' defined but not used [-Wunused-function]
1170 | static void mlxbf_tmfifo_cleanup(struct mlxbf_tmfifo *fifo)
| ^~~~~~~~~~~~~~~~~~~~
drivers/platform/mellanox/mlxbf-tmfifo.c:1128:13: warning: 'mlxbf_tmfifo_get_cfg_mac' defined but not used [-Wunused-function]
1128 | static void mlxbf_tmfifo_get_cfg_mac(u8 *mac)
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +1241 drivers/platform/mellanox/mlxbf-tmfifo.c
1181
1182 /* Probe the TMFIFO. */
1183 static int mlxbf_tmfifo_probe(struct platform_device *pdev)
1184 {
1185 struct virtio_net_config net_config;
1186 struct device *dev = &pdev->dev;
1187 struct mlxbf_tmfifo *fifo;
1188 int i, rc;
1189
1190 fifo = devm_kzalloc(dev, sizeof(*fifo), GFP_KERNEL);
1191 if (!fifo)
1192 return -ENOMEM;
1193
1194 spin_lock_init(&fifo->spin_lock[0]);
1195 spin_lock_init(&fifo->spin_lock[1]);
1196 INIT_WORK(&fifo->work, mlxbf_tmfifo_work_handler);
1197 mutex_init(&fifo->lock);
1198
1199 /* Get the resource of the Rx FIFO. */
1200 fifo->rx_base = devm_platform_ioremap_resource(pdev, 0);
1201 if (IS_ERR(fifo->rx_base))
1202 return PTR_ERR(fifo->rx_base);
1203
1204 /* Get the resource of the Tx FIFO. */
1205 fifo->tx_base = devm_platform_ioremap_resource(pdev, 1);
1206 if (IS_ERR(fifo->tx_base))
1207 return PTR_ERR(fifo->tx_base);
1208
1209 platform_set_drvdata(pdev, fifo);
1210
1211 timer_setup(&fifo->timer, mlxbf_tmfifo_timer, 0);
1212
1213 for (i = 0; i < MLXBF_TM_MAX_IRQ; i++) {
1214 fifo->irq_info[i].index = i;
1215 fifo->irq_info[i].fifo = fifo;
1216 fifo->irq_info[i].irq = platform_get_irq(pdev, i);
1217 rc = devm_request_irq(dev, fifo->irq_info[i].irq,
1218 mlxbf_tmfifo_irq_handler, 0,
1219 "tmfifo", &fifo->irq_info[i]);
1220 if (rc) {
1221 dev_err(dev, "devm_request_irq failed\n");
1222 fifo->irq_info[i].irq = 0;
1223 return rc;
1224 }
1225 }
1226
1227 mlxbf_tmfifo_set_threshold(fifo);
1228
1229 /* Create the console vdev. */
1230 rc = mlxbf_tmfifo_create_vdev(dev, fifo, VIRTIO_ID_CONSOLE, 0, NULL, 0);
1231 if (rc)
> 1232 goto fail;
1233
1234 /* Create the network vdev. */
1235 memset(&net_config, 0, sizeof(net_config));
1236
1237 #define MLXBF_TMFIFO_LITTLE_ENDIAN (virtio_legacy_is_little_endian() || \
1238 (MLXBF_TMFIFO_NET_FEATURES & (1ULL << VIRTIO_F_VERSION_1))
1239
> 1240 net_config.mtu = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
> 1241 ETH_DATA_LEN);
1242 net_config.status = __cpu_to_virtio16(MLXBF_TMFIFO_LITTLE_ENDIAN,
1243 VIRTIO_NET_S_LINK_UP);
1244 mlxbf_tmfifo_get_cfg_mac(net_config.mac);
1245 rc = mlxbf_tmfifo_create_vdev(dev, fifo, VIRTIO_ID_NET,
1246 MLXBF_TMFIFO_NET_FEATURES, &net_config,
1247 sizeof(net_config));
1248 if (rc)
1249 goto fail;
1250
1251 mod_timer(&fifo->timer, jiffies + MLXBF_TMFIFO_TIMER_INTERVAL);
1252
1253 fifo->is_ready = true;
1254 return 0;
1255
1256 fail:
1257 mlxbf_tmfifo_cleanup(fifo);
1258 return rc;
1259 }
1260
1261 /* Device remove function. */
1262 static int mlxbf_tmfifo_remove(struct platform_device *pdev)
1263 {
1264 struct mlxbf_tmfifo *fifo = platform_get_drvdata(pdev);
1265
1266 mlxbf_tmfifo_cleanup(fifo);
1267
1268 return 0;
1269 }
1270
1271 static const struct acpi_device_id mlxbf_tmfifo_acpi_match[] = {
1272 { "MLNXBF01", 0 },
1273 {}
1274 };
1275 MODULE_DEVICE_TABLE(acpi, mlxbf_tmfifo_acpi_match);
1276
1277 static struct platform_driver mlxbf_tmfifo_driver = {
1278 .probe = mlxbf_tmfifo_probe,
1279 .remove = mlxbf_tmfifo_remove,
1280 .driver = {
1281 .name = "bf-tmfifo",
1282 .acpi_match_table = mlxbf_tmfifo_acpi_match,
1283 },
1284 };
1285
1286 module_platform_driver(mlxbf_tmfifo_driver);
1287
1288 MODULE_DESCRIPTION("Mellanox BlueField SoC TmFifo Driver");
1289 MODULE_LICENSE("GPL v2");
> 1290 MODULE_AUTHOR("Mellanox Technologies");
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[pavel-linux-leds:for-next 17/17] WARNING: modpost: vmlinux.o(.text+0x2492): Section mismatch in reference from the function ret_from_kernel_thread() to the variable .init.text:.L904
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
head: cf1a1a6a7d81d73bcb5568b23572d6fd593add87
commit: cf1a1a6a7d81d73bcb5568b23572d6fd593add87 [17/17] leds: gpio: Use struct_size() in devm_kzalloc()
config: riscv-randconfig-r012-20200712 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout cf1a1a6a7d81d73bcb5568b23572d6fd593add87
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
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 >>):
>> WARNING: modpost: vmlinux.o(.text+0x2492): Section mismatch in reference from the function ret_from_kernel_thread() to the variable .init.text:.L904
The function ret_from_kernel_thread() references
the variable __init .L904.
This is often because ret_from_kernel_thread lacks a __init
annotation or the annotation of .L904 is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x7c238): Section mismatch in reference from the function profile_tick() to the variable .init.text:.L0
The function profile_tick() references
the variable __init .L0 .
This is often because profile_tick lacks a __init
annotation or the annotation of .L0 is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0xd475de): Section mismatch in reference from the function radeon_audio_init() to the variable .init.text:.LBE12095
The function radeon_audio_init() references
the variable __init .LBE12095.
This is often because radeon_audio_init lacks a __init
annotation or the annotation of .LBE12095 is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x1622c56): Section mismatch in reference from the function netdev_adjacent_change_commit() to the variable .init.text:.L0
The function netdev_adjacent_change_commit() references
the variable __init .L0 .
This is often because netdev_adjacent_change_commit lacks a __init
annotation or the annotation of .L0 is wrong.
--
>> WARNING: modpost: vmlinux.o(.text+0x1622cdc): Section mismatch in reference from the function netdev_adjacent_change_abort() to the variable .init.text:.L0
The function netdev_adjacent_change_abort() references
the variable __init .L0 .
This is often because netdev_adjacent_change_abort lacks a __init
annotation or the annotation of .L0 is wrong.
--
>> WARNING: modpost: vmlinux.o(__ex_table+0x1020): Section mismatch in reference from the (unknown reference) (unknown) to the variable .debug_str:.LASF394
FATAL: modpost: The relocation at __ex_table+0x1020 references
section ".debug_str" which is not executable, IOW
it is not possible for the kernel to fault
at that address. Something is seriously wrong
and should be fixed.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
drivers/firmware/broadcom/bcm47xx_sprom.c:563:6: warning: no previous prototype for 'bcm47xx_fill_sprom'
by kernel test robot
Hi Florian,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 11ba468877bb23f28956a35e896356252d63c983
commit: 5699ad0aaf1091824f22492a708478912c38c7d2 firmware: bcm47xx_nvram: Allow COMPILE_TEST
date: 11 months ago
config: i386-randconfig-r022-20200713 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 5699ad0aaf1091824f22492a708478912c38c7d2
# save the attached .config to linux build tree
make W=1 ARCH=i386
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/firmware/broadcom/bcm47xx_sprom.c:563:6: warning: no previous prototype for 'bcm47xx_fill_sprom' [-Wmissing-prototypes]
563 | void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix,
| ^~~~~~~~~~~~~~~~~~
>> drivers/firmware/broadcom/bcm47xx_sprom.c:705:5: warning: no previous prototype for 'bcm47xx_sprom_register_fallbacks' [-Wmissing-prototypes]
705 | int bcm47xx_sprom_register_fallbacks(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/bcm47xx_fill_sprom +563 drivers/firmware/broadcom/bcm47xx_sprom.c
5d24ceab4eaf0d arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 562
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 @563 void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix,
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 564 bool fallback)
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 565 {
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 566 bcm47xx_fill_sprom_ethernet(sprom, prefix, fallback);
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 567 bcm47xx_fill_board_data(sprom, prefix, fallback);
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 568
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 569 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0, fallback);
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 570
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 571 /* Entries requiring custom functions */
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 572 nvram_read_alpha2(prefix, "ccode", sprom->alpha2, fallback);
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 573 if (sprom->revision >= 3)
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 574 nvram_read_leddc(prefix, "leddc", &sprom->leddc_on_time,
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 575 &sprom->leddc_off_time, fallback);
590605c6bc31d5 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-06-21 576
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 577 switch (sprom->revision) {
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 578 case 4:
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 579 case 5:
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 580 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback);
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 581 bcm47xx_fill_sprom_path_r45(sprom, prefix, fallback);
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 582 break;
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 583 case 8:
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 584 case 9:
b8ebbaff037981 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-10-03 585 bcm47xx_fill_sprom_path_r4589(sprom, prefix, fallback);
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 586 break;
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 587 }
d55a52ccf8f80c arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-04-02 588
d55a52ccf8f80c arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-04-02 589 bcm47xx_sprom_fill_auto(sprom, prefix, fallback);
019eee2e34e2d1 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-02-28 590 }
a9bba182a1f3f3 arch/mips/bcm47xx/sprom.c Hauke Mehrtens 2012-04-29 591
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 592 #if IS_BUILTIN(CONFIG_SSB) && IS_ENABLED(CONFIG_SSB_SPROM)
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 593 static int bcm47xx_get_sprom_ssb(struct ssb_bus *bus, struct ssb_sprom *out)
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 594 {
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 595 char prefix[10];
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 596
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 597 switch (bus->bustype) {
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 598 case SSB_BUSTYPE_SSB:
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 599 bcm47xx_fill_sprom(out, NULL, false);
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 600 return 0;
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 601 case SSB_BUSTYPE_PCI:
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 602 memset(out, 0, sizeof(struct ssb_sprom));
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 603 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 604 bus->host_pci->bus->number + 1,
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 605 PCI_SLOT(bus->host_pci->devfn));
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 606 bcm47xx_fill_sprom(out, prefix, false);
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 607 return 0;
daa7ce02513d21 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-10-25 608 default:
d548ca6b0784a9 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-12-10 609 pr_warn("Unable to fill SPROM for given bustype.\n");
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 610 return -EINVAL;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 611 }
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 612 }
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 613 #endif
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 614
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 615 #if IS_BUILTIN(CONFIG_BCMA)
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 616 /*
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 617 * Having many NVRAM entries for PCI devices led to repeating prefixes like
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 618 * pci/1/1/ all the time and wasting flash space. So at some point Broadcom
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 619 * decided to introduce prefixes like 0: 1: 2: etc.
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 620 * If we find e.g. devpath0=pci/2/1 or devpath0=pci/2/1/ we should use 0:
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 621 * instead of pci/2/1/.
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 622 */
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 623 static void bcm47xx_sprom_apply_prefix_alias(char *prefix, size_t prefix_size)
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 624 {
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 625 size_t prefix_len = strlen(prefix);
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 626 size_t short_len = prefix_len - 1;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 627 char nvram_var[10];
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 628 char buf[20];
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 629 int i;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 630
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 631 /* Passed prefix has to end with a slash */
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 632 if (prefix_len <= 0 || prefix[prefix_len - 1] != '/')
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 633 return;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 634
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 635 for (i = 0; i < 3; i++) {
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 636 if (snprintf(nvram_var, sizeof(nvram_var), "devpath%d", i) <= 0)
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 637 continue;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 638 if (bcm47xx_nvram_getenv(nvram_var, buf, sizeof(buf)) < 0)
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 639 continue;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 640 if (!strcmp(buf, prefix) ||
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 641 (short_len && strlen(buf) == short_len && !strncmp(buf, prefix, short_len))) {
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 642 snprintf(prefix, prefix_size, "%d:", i);
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 643 return;
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 644 }
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 645 }
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 646 }
9a6a2b96dfd8b0 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-03-14 647
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 648 static int bcm47xx_get_sprom_bcma(struct bcma_bus *bus, struct ssb_sprom *out)
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 649 {
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 650 struct bcma_boardinfo *binfo = &bus->boardinfo;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 651 struct bcma_device *core;
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 652 char buf[10];
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 653 char *prefix;
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 654 bool fallback = false;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 655
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 656 switch (bus->hosttype) {
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 657 case BCMA_HOSTTYPE_PCI:
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 658 memset(out, 0, sizeof(struct ssb_sprom));
3d1f664ab94038 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2016-01-01 659 /* On BCM47XX all PCI buses share the same domain */
97f2645f358b41 drivers/firmware/broadcom/bcm47xx_sprom.c Masahiro Yamada 2016-08-03 660 if (IS_ENABLED(CONFIG_BCM47XX))
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 661 snprintf(buf, sizeof(buf), "pci/%u/%u/",
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 662 bus->host_pci->bus->number + 1,
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 663 PCI_SLOT(bus->host_pci->devfn));
3d1f664ab94038 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2016-01-01 664 else
3d1f664ab94038 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2016-01-01 665 snprintf(buf, sizeof(buf), "pci/%u/%u/",
3d1f664ab94038 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2016-01-01 666 pci_domain_nr(bus->host_pci->bus) + 1,
3d1f664ab94038 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2016-01-01 667 bus->host_pci->bus->number);
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 668 bcm47xx_sprom_apply_prefix_alias(buf, sizeof(buf));
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 669 prefix = buf;
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 670 break;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 671 case BCMA_HOSTTYPE_SOC:
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 672 memset(out, 0, sizeof(struct ssb_sprom));
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 673 core = bcma_find_core(bus, BCMA_CORE_80211);
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 674 if (core) {
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 675 snprintf(buf, sizeof(buf), "sb/%u/",
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 676 core->core_index);
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 677 prefix = buf;
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 678 fallback = true;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 679 } else {
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 680 prefix = NULL;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 681 }
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 682 break;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 683 default:
d548ca6b0784a9 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-12-10 684 pr_warn("Unable to fill SPROM for given bustype.\n");
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 685 return -EINVAL;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 686 }
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 687
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 688 nvram_read_u16(prefix, NULL, "boardvendor", &binfo->vendor, 0, true);
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 689 if (!binfo->vendor)
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 690 binfo->vendor = SSB_BOARDVENDOR_BCM;
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 691 nvram_read_u16(prefix, NULL, "boardtype", &binfo->type, 0, true);
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 692
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 693 bcm47xx_fill_sprom(out, prefix, fallback);
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 694
2623899459da55 arch/mips/bcm47xx/sprom.c Rafał Miłecki 2015-05-12 695 return 0;
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 696 }
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 697 #endif
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 698
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 699 static unsigned int bcm47xx_sprom_registered;
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 700
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 701 /*
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 702 * On bcm47xx we need to register SPROM fallback handler very early, so we can't
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 703 * use anything like platform device / driver for this.
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 704 */
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 @705 int bcm47xx_sprom_register_fallbacks(void)
a59da8fb3b2a1f arch/mips/bcm47xx/sprom.c Rafał Miłecki 2014-10-28 706 {
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 707 if (bcm47xx_sprom_registered)
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 708 return 0;
2ab71a02c56f82 drivers/firmware/broadcom/bcm47xx_sprom.c Rafał Miłecki 2016-01-25 709
:::::: The code at line 563 was first introduced by commit
:::::: b8ebbaff03798180c4d9661105670e03276afe83 MIPS: BCM47xx: sprom: read values without prefix as fallback
:::::: TO: Hauke Mehrtens <hauke(a)hauke-m.de>
:::::: CC: John Crispin <blogic(a)openwrt.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[net-next:master 211/211] net/bridge/br_netlink_tunnel.c:271:26: error: implicit declaration of function 'br_vlan_can_enter_range'; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 94339443686b36d3223bc032b7947267474e2679
commit: 94339443686b36d3223bc032b7947267474e2679 [211/211] net: bridge: notify on vlan tunnel changes done via the old api
config: s390-defconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 94339443686b36d3223bc032b7947267474e2679
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
net/bridge/br_netlink_tunnel.c:29:6: warning: no previous prototype for 'vlan_tunid_inrange' [-Wmissing-prototypes]
29 | bool vlan_tunid_inrange(const struct net_bridge_vlan *v_curr,
| ^~~~~~~~~~~~~~~~~~
net/bridge/br_netlink_tunnel.c:196:5: warning: no previous prototype for 'br_vlan_tunnel_info' [-Wmissing-prototypes]
196 | int br_vlan_tunnel_info(const struct net_bridge_port *p, int cmd,
| ^~~~~~~~~~~~~~~~~~~
net/bridge/br_netlink_tunnel.c: In function '__vlan_tunnel_handle_range':
>> net/bridge/br_netlink_tunnel.c:271:26: error: implicit declaration of function 'br_vlan_can_enter_range'; did you mean 'br_vlan_valid_range'? [-Werror=implicit-function-declaration]
271 | if (v && curr_change && br_vlan_can_enter_range(v, *v_end)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| br_vlan_valid_range
cc1: some warnings being treated as errors
vim +271 net/bridge/br_netlink_tunnel.c
252
253 /* send a notification if v_curr can't enter the range and start a new one */
254 static void __vlan_tunnel_handle_range(const struct net_bridge_port *p,
255 struct net_bridge_vlan **v_start,
256 struct net_bridge_vlan **v_end,
257 int v_curr, bool curr_change)
258 {
259 struct net_bridge_vlan_group *vg;
260 struct net_bridge_vlan *v;
261
262 vg = nbp_vlan_group(p);
263 if (!vg)
264 return;
265
266 v = br_vlan_find(vg, v_curr);
267
268 if (!*v_start)
269 goto out_init;
270
> 271 if (v && curr_change && br_vlan_can_enter_range(v, *v_end)) {
272 *v_end = v;
273 return;
274 }
275
276 br_vlan_notify(p->br, p, (*v_start)->vid, (*v_end)->vid, RTM_NEWVLAN);
277 out_init:
278 /* we start a range only if there are any changes to notify about */
279 *v_start = curr_change ? v : NULL;
280 *v_end = *v_start;
281 }
282
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[mlankhorst:locking-rework 30/30] drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: error: conflicting types for 'i915_gem_shrink'
by kernel test robot
tree: git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: df835d9d9fee30c2d4584242c64c8b32eae0d0a4
commit: df835d9d9fee30c2d4584242c64c8b32eae0d0a4 [30/30] how to implement eviction
config: x86_64-randconfig-c002-20200710 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/i915/gem/i915_gem_lmem.c: In function 'i915_gem_object_get_pages_phys':
>> drivers/gpu/drm/i915/gem/i915_gem_lmem.c:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
23 | }
| ^
At top level:
drivers/gpu/drm/i915/gem/i915_gem_lmem.c:12:12: warning: 'i915_gem_object_get_pages_phys' defined but not used [-Wunused-function]
12 | static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: error: conflicting types for 'i915_gem_shrink'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/i915_drv.h:77,
from drivers/gpu/drm/i915/display/intel_display_types.h:45,
from drivers/gpu/drm/i915/i915_trace.h:11,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:16:
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:15:15: note: previous declaration of 'i915_gem_shrink' was here
15 | unsigned long i915_gem_shrink(struct drm_i915_private *i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrink':
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:213:27: error: 'struct <anonymous>' has no member named 'lock'; did you mean 'blocks'?
213 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrinker_scan':
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:304:26: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
304 | freed = i915_gem_shrink(i915,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:305:7: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
305 | sc->nr_to_scan,
| ~~^~~~~~~~~~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:306:5: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
306 | &sc->nr_scanned,
| ^~~~~~~~~~~~~~~
| |
| long unsigned int *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:20:27: note: in expansion of macro 'BIT'
20 | #define I915_SHRINK_BOUND BIT(1)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:307:5: note: in expansion of macro 'I915_SHRINK_BOUND'
307 | I915_SHRINK_BOUND |
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
>> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:304:10: error: too few arguments to function 'i915_gem_shrink'
304 | freed = i915_gem_shrink(i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:313:29: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
313 | freed += i915_gem_shrink(i915,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:314:23: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
314 | sc->nr_to_scan - sc->nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:315:8: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
315 | &sc->nr_scanned,
| ^~~~~~~~~~~~~~~
| |
| long unsigned int *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'long unsigned int *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:21:28: note: in expansion of macro 'BIT'
21 | #define I915_SHRINK_ACTIVE BIT(2)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:316:8: note: in expansion of macro 'I915_SHRINK_ACTIVE'
316 | I915_SHRINK_ACTIVE |
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:313:13: error: too few arguments to function 'i915_gem_shrink'
313 | freed += i915_gem_shrink(i915,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrinker_oom':
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:34: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:40: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/linux/stddef.h:8:14: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:46: note: in expansion of macro 'NULL'
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'void *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:20:27: note: in expansion of macro 'BIT'
20 | #define I915_SHRINK_BOUND BIT(1)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:339:13: note: in expansion of macro 'I915_SHRINK_BOUND'
339 | I915_SHRINK_BOUND |
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:338:18: error: too few arguments to function 'i915_gem_shrink'
338 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrinker_vmap':
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:376:34: error: passing argument 1 of 'i915_gem_shrink' from incompatible pointer type [-Werror=incompatible-pointer-types]
376 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| struct drm_i915_private *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:41: note: expected 'struct i915_gem_ww_ctx *' but argument is of type 'struct drm_i915_private *'
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:376:40: warning: passing argument 2 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
376 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:95:28: note: expected 'struct drm_i915_private *' but argument is of type 'long unsigned int'
95 | struct drm_i915_private *i915,
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from include/linux/list.h:5,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/linux/stddef.h:8:14: warning: passing argument 3 of 'i915_gem_shrink' makes integer from pointer without a cast [-Wint-conversion]
8 | #define NULL ((void *)0)
| ^~~~~~~~~~~
| |
| void *
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:376:46: note: in expansion of macro 'NULL'
376 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:96:17: note: expected 'long unsigned int' but argument is of type 'void *'
96 | unsigned long target,
| ~~~~~~~~~~~~~~^~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:5,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/sched/signal.h:5,
from include/linux/oom.h:6,
from drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:7:
>> include/vdso/bits.h:7:19: warning: passing argument 4 of 'i915_gem_shrink' makes pointer from integer without a cast [-Wint-conversion]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
| |
| long unsigned int
drivers/gpu/drm/i915/gem/i915_gem_shrinker.h:20:27: note: in expansion of macro 'BIT'
20 | #define I915_SHRINK_BOUND BIT(1)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:377:13: note: in expansion of macro 'I915_SHRINK_BOUND'
377 | I915_SHRINK_BOUND |
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:97:18: note: expected 'long unsigned int *' but argument is of type 'long unsigned int'
97 | unsigned long *nr_scanned,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:376:18: error: too few arguments to function 'i915_gem_shrink'
376 | freed_pages += i915_gem_shrink(i915, -1UL, NULL,
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:94:1: note: declared here
94 | i915_gem_shrink(struct i915_gem_ww_ctx *ww,
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/i915_gem_shrink +94 drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
67
68 /**
69 * i915_gem_shrink - Shrink buffer object caches
70 * @i915: i915 device
71 * @target: amount of memory to make available, in pages
72 * @nr_scanned: optional output for number of pages scanned (incremental)
73 * @shrink: control flags for selecting cache types
74 *
75 * This function is the main interface to the shrinker. It will try to release
76 * up to @target pages of main memory backing storage from buffer objects.
77 * Selection of the specific caches can be done with @flags. This is e.g. useful
78 * when purgeable objects should be removed from caches preferentially.
79 *
80 * Note that it's not guaranteed that released amount is actually available as
81 * free system memory - the pages might still be in-used to due to other reasons
82 * (like cpu mmaps) or the mm core has reused them before we could grab them.
83 * Therefore code that needs to explicitly shrink buffer objects caches (e.g. to
84 * avoid deadlocks in memory reclaim) must fall back to i915_gem_shrink_all().
85 *
86 * Also note that any kind of pinning (both per-vma address space pins and
87 * backing storage pins at the buffer object level) result in the shrinker code
88 * having to skip the object.
89 *
90 * Returns:
91 * The number of pages of backing storage actually released.
92 */
93 unsigned long
> 94 i915_gem_shrink(struct i915_gem_ww_ctx *ww,
95 struct drm_i915_private *i915,
96 unsigned long target,
97 unsigned long *nr_scanned,
98 unsigned int shrink)
99 {
100 const struct {
101 struct list_head *list;
102 unsigned int bit;
103 } phases[] = {
104 { &i915->mm.purge_list, ~0u },
105 {
106 &i915->mm.shrink_list,
107 I915_SHRINK_BOUND | I915_SHRINK_UNBOUND
108 },
109 { NULL, 0 },
110 }, *phase;
111 intel_wakeref_t wakeref = 0;
112 unsigned long count = 0;
113 unsigned long scanned = 0;
114 int err;
115
116 /*
117 * When shrinking the active list, we should also consider active
118 * contexts. Active contexts are pinned until they are retired, and
119 * so can not be simply unbound to retire and unpin their pages. To
120 * shrink the contexts, we must wait until the gpu is idle and
121 * completed its switch to the kernel context. In short, we do
122 * not have a good mechanism for idling a specific context.
123 */
124
125 trace_i915_gem_shrink(i915, target, shrink);
126
127 /*
128 * Unbinding of objects will require HW access; Let us not wake the
129 * device just to recover a little memory. If absolutely necessary,
130 * we will force the wake during oom-notifier.
131 */
132 if (shrink & I915_SHRINK_BOUND) {
133 wakeref = intel_runtime_pm_get_if_in_use(&i915->runtime_pm);
134 if (!wakeref)
135 shrink &= ~I915_SHRINK_BOUND;
136 }
137
138 /*
139 * As we may completely rewrite the (un)bound list whilst unbinding
140 * (due to retiring requests) we have to strictly process only
141 * one element of the list at the time, and recheck the list
142 * on every iteration.
143 *
144 * In particular, we must hold a reference whilst removing the
145 * object as we may end up waiting for and/or retiring the objects.
146 * This might release the final reference (held by the active list)
147 * and result in the object being freed from under us. This is
148 * similar to the precautions the eviction code must take whilst
149 * removing objects.
150 *
151 * Also note that although these lists do not hold a reference to
152 * the object we can safely grab one here: The final object
153 * unreferencing and the bound_list are both protected by the
154 * dev->struct_mutex and so we won't ever be able to observe an
155 * object on the bound_list with a reference count equals 0.
156 */
157 for (phase = phases; phase->list; phase++) {
158 struct list_head still_in_list;
159 struct drm_i915_gem_object *obj;
160 unsigned long flags;
161
162 if ((shrink & phase->bit) == 0)
163 continue;
164
165 INIT_LIST_HEAD(&still_in_list);
166
167 /*
168 * We serialize our access to unreferenced objects through
169 * the use of the struct_mutex. While the objects are not
170 * yet freed (due to RCU then a workqueue) we still want
171 * to be able to shrink their pages, so they remain on
172 * the unbound/bound list until actually freed.
173 */
174 spin_lock_irqsave(&i915->mm.obj_lock, flags);
175 while (count < target &&
176 (obj = list_first_entry_or_null(phase->list,
177 typeof(*obj),
178 mm.link))) {
179 list_move_tail(&obj->mm.link, &still_in_list);
180
181 if (shrink & I915_SHRINK_VMAPS &&
182 !is_vmalloc_addr(obj->mm.mapping))
183 continue;
184
185 if (!(shrink & I915_SHRINK_ACTIVE) &&
186 i915_gem_object_is_framebuffer(obj))
187 continue;
188
189 if (!can_release_pages(obj))
190 continue;
191
192 if (!kref_get_unless_zero(&obj->base.refcount))
193 continue;
194
195 spin_unlock_irqrestore(&i915->mm.obj_lock, flags);
196
197 err = 0;
198 if (unsafe_drop_pages(obj, shrink)) {
199 /* May arrive from get_pages on another bo */
200 if (!ww) {
201 if (!i915_gem_object_trylock(obj))
202 goto skip;
203 } else {
204 err = i915_gem_object_lock(obj, ww);
205 if (err)
206 goto skip;
207 }
208
209 if (!i915_gem_object_has_pages(obj)) {
210 try_to_writeback(obj, shrink);
211 count += obj->base.size >> PAGE_SHIFT;
212 }
> 213 mutex_unlock(&obj->mm.lock);
214 }
215
216 scanned += obj->base.size >> PAGE_SHIFT;
217 skip:
218 i915_gem_object_put(obj);
219
220 spin_lock_irqsave(&i915->mm.obj_lock, flags);
221 if (err)
222 break;
223 }
224 list_splice_tail(&still_in_list, phase->list);
225 spin_unlock_irqrestore(&i915->mm.obj_lock, flags);
226 if (err)
227 return err;
228 }
229
230 if (shrink & I915_SHRINK_BOUND)
231 intel_runtime_pm_put(&i915->runtime_pm, wakeref);
232
233 if (nr_scanned)
234 *nr_scanned += scanned;
235 return count;
236 }
237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4437dd6e8f71e8b4b5546924a6e48e7edaf4a8dc
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 3 weeks ago
config: sh-randconfig-s032-20200713 (attached as .config)
compiler: sh4-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-37-gc9676a3b-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=sh
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 >>)
sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *arg @@
sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: got int [noderef] __user *arg
>> sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
>> sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_timer.c:224:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *arg @@
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: got int [noderef] __user *arg
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_timer.c:243:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *arg @@
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: got int [noderef] __user *arg
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_timer.c:247:21: sparse: got int const *__gu_addr
--
sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: got int [noderef] __user *p
>> sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
>> sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:97:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: got int [noderef] __user *p
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:115:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: got int [noderef] __user *p
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:126:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: got int [noderef] __user *p
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:132:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: got int [noderef] __user *p
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:150:21: sparse: got int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: expected int const *__gu_addr
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: got int [noderef] __user *p
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: expected void const volatile [noderef] __user *
sound/core/seq/oss/seq_oss_ioctl.c:162:21: sparse: got int const *__gu_addr
--
drivers/hid/hidraw.c:389:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/hid/hidraw.c:389:37: sparse: expected int const *__gu_addr
drivers/hid/hidraw.c:389:37: sparse: got int [noderef] __user *
>> drivers/hid/hidraw.c:389:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got int const *__gu_addr @@
>> drivers/hid/hidraw.c:389:37: sparse: expected void const volatile [noderef] __user *
drivers/hid/hidraw.c:389:37: sparse: got int const *__gu_addr
vim +224 sound/core/seq/oss/seq_oss_timer.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 212
^1da177e4c3f41 Linus Torvalds 2005-04-16 213
^1da177e4c3f41 Linus Torvalds 2005-04-16 214 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 215 * ioctls
^1da177e4c3f41 Linus Torvalds 2005-04-16 216 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 217 int
080dece3460b53 Takashi Iwai 2005-11-17 218 snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg)
^1da177e4c3f41 Linus Torvalds 2005-04-16 219 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 220 int value;
^1da177e4c3f41 Linus Torvalds 2005-04-16 221
^1da177e4c3f41 Linus Torvalds 2005-04-16 222 if (cmd == SNDCTL_SEQ_CTRLRATE) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 223 /* if *arg == 0, just return the current rate */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @224 if (get_user(value, arg))
:::::: The code at line 224 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months