[PATCH] KVM: x86: fix bugon.cocci warnings
by Julia Lawall
From: kbuild test robot <lkp(a)intel.com>
Use BUG_ON instead of a if condition followed by BUG.
Generated by: scripts/coccinelle/misc/bugon.cocci
Fixes: 4b526de50e39 ("KVM: x86: Check kvm_rebooting in kvm_spurious_fault()")
CC: Sean Christopherson <sean.j.christopherson(a)intel.com>
Signed-off-by: kbuild test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)lip6.fr>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 02dc96ef6c25f990452c114c59d75c368a1f4c8f
commit: 4b526de50e39b38cd828396267379183c7c21354 KVM: x86: Check kvm_rebooting in kvm_spurious_fault()
:::::: branch date: 9 hours ago
:::::: commit date: 4 days ago
Please take the patch only if it's a positive warning. Thanks!
x86.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -360,8 +360,7 @@ EXPORT_SYMBOL_GPL(kvm_set_apic_base);
asmlinkage __visible void kvm_spurious_fault(void)
{
/* Fault while not rebooting. We want the trace. */
- if (!kvm_rebooting)
- BUG();
+ BUG_ON(!kvm_rebooting);
}
EXPORT_SYMBOL_GPL(kvm_spurious_fault);
2 years, 8 months
[mmotm:master 236/260] sdhci-of-aspeed.c:undefined reference to `of_platform_device_create'
by kbuild test robot
Hi Andrew,
It's probably a bug fix that unveils the link errors.
tree: git://git.cmpxchg.org/linux-mmotm.git master
head: 89331b857195aa00660fb19f1383924e95f7709e
commit: d9cc9c2bd830a180cc8ac762a739fcfd3fc6c330 [236/260] linux-next-git-rejects
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d9cc9c2bd830a180cc8ac762a739fcfd3fc6c330
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
`.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o
drivers/mmc/host/sdhci-of-aspeed.o: In function `aspeed_sdc_probe':
>> sdhci-of-aspeed.c:(.text+0xf8): undefined reference to `of_platform_device_create'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 8 months
Re: [PATCH] x86/hyperv: make vapic support x2apic mode
by kbuild test robot
Hi Roman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/x86/core]
[cannot apply to v5.4-rc1 next-20190930]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Roman-Kagan/x86-hyperv-make-vapi...
config: x86_64-randconfig-e004-201939 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86/hyperv/hv_apic.c: In function 'hv_x2apic_read':
>> arch/x86/hyperv/hv_apic.c:91:10: error: implicit declaration of function 'native_apic_msr_read'; did you mean 'native_apic_icr_read'? [-Werror=implicit-function-declaration]
return native_apic_msr_read(reg);
^~~~~~~~~~~~~~~~~~~~
native_apic_icr_read
arch/x86/hyperv/hv_apic.c: In function 'hv_x2apic_write':
>> arch/x86/hyperv/hv_apic.c:119:3: error: implicit declaration of function 'native_apic_msr_write'; did you mean 'native_apic_icr_write'? [-Werror=implicit-function-declaration]
native_apic_msr_write(reg, val);
^~~~~~~~~~~~~~~~~~~~~
native_apic_icr_write
cc1: some warnings being treated as errors
vim +91 arch/x86/hyperv/hv_apic.c
77
78 static u32 hv_x2apic_read(u32 reg)
79 {
80 u32 reg_val, hi;
81
82 switch (reg) {
83 case APIC_EOI:
84 rdmsr(HV_X64_MSR_EOI, reg_val, hi);
85 return reg_val;
86 case APIC_TASKPRI:
87 rdmsr(HV_X64_MSR_TPR, reg_val, hi);
88 return reg_val;
89
90 default:
> 91 return native_apic_msr_read(reg);
92 }
93 }
94
95 static void hv_apic_write(u32 reg, u32 val)
96 {
97 switch (reg) {
98 case APIC_EOI:
99 wrmsr(HV_X64_MSR_EOI, val, 0);
100 break;
101 case APIC_TASKPRI:
102 wrmsr(HV_X64_MSR_TPR, val, 0);
103 break;
104 default:
105 native_apic_mem_write(reg, val);
106 }
107 }
108
109 static void hv_x2apic_write(u32 reg, u32 val)
110 {
111 switch (reg) {
112 case APIC_EOI:
113 wrmsr(HV_X64_MSR_EOI, val, 0);
114 break;
115 case APIC_TASKPRI:
116 wrmsr(HV_X64_MSR_TPR, val, 0);
117 break;
118 default:
> 119 native_apic_msr_write(reg, val);
120 }
121 }
122
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
Re: [PATCH v13 3/9] open: O_EMPTYPATH: procfs-less file descriptor re-opening
by kbuild test robot
Hi Aleksa,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc1 next-20190930]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Aleksa-Sarai/namei-openat2-2-pat...
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11:0,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:74,
from fs/fcntl.c:8:
fs/fcntl.c: In function 'fcntl_init':
>> include/linux/compiler.h:350:38: error: call to '__compiletime_assert_1037' declared with attribute error: BUILD_BUG_ON failed: 22 - 1 != HWEIGHT32( (VALID_OPEN_FLAGS & ~(O_NONBLOCK | O_NDELAY)) | __FMODE_EXEC | __FMODE_NONOTIFY)
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
>> fs/fcntl.c:1034:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(22 - 1 /* for O_RDONLY being 0 */ !=
^~~~~~~~~~~~
vim +/__compiletime_assert_1037 +350 include/linux/compiler.h
9a8ab1c39970a4 Daniel Santos 2013-02-21 336
9a8ab1c39970a4 Daniel Santos 2013-02-21 337 #define _compiletime_assert(condition, msg, prefix, suffix) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 338 __compiletime_assert(condition, msg, prefix, suffix)
9a8ab1c39970a4 Daniel Santos 2013-02-21 339
9a8ab1c39970a4 Daniel Santos 2013-02-21 340 /**
9a8ab1c39970a4 Daniel Santos 2013-02-21 341 * compiletime_assert - break build and emit msg if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 342 * @condition: a compile-time constant condition to check
9a8ab1c39970a4 Daniel Santos 2013-02-21 343 * @msg: a message to emit if condition is false
9a8ab1c39970a4 Daniel Santos 2013-02-21 344 *
9a8ab1c39970a4 Daniel Santos 2013-02-21 345 * In tradition of POSIX assert, this macro will break the build if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 346 * supplied condition is *false*, emitting the supplied error message if the
9a8ab1c39970a4 Daniel Santos 2013-02-21 347 * compiler has support to do so.
9a8ab1c39970a4 Daniel Santos 2013-02-21 348 */
9a8ab1c39970a4 Daniel Santos 2013-02-21 349 #define compiletime_assert(condition, msg) \
9a8ab1c39970a4 Daniel Santos 2013-02-21 @350 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
9a8ab1c39970a4 Daniel Santos 2013-02-21 351
:::::: The code at line 350 was first introduced by commit
:::::: 9a8ab1c39970a4938a72d94e6fd13be88a797590 bug.h, compiler.h: introduce compiletime_assert & BUILD_BUG_ON_MSG
:::::: TO: Daniel Santos <daniel.santos(a)pobox.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
Re: [PATCH] x86/hyperv: make vapic support x2apic mode
by kbuild test robot
Hi Roman,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/x86/core]
[cannot apply to v5.4-rc1 next-20190930]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Roman-Kagan/x86-hyperv-make-vapi...
config: x86_64-randconfig-s0-201939 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/x86//hyperv/hv_apic.c: In function 'hv_x2apic_read':
>> arch/x86//hyperv/hv_apic.c:91:10: error: implicit declaration of function 'native_apic_msr_read' [-Werror=implicit-function-declaration]
return native_apic_msr_read(reg);
^
arch/x86//hyperv/hv_apic.c: In function 'hv_x2apic_write':
>> arch/x86//hyperv/hv_apic.c:119:3: error: implicit declaration of function 'native_apic_msr_write' [-Werror=implicit-function-declaration]
native_apic_msr_write(reg, val);
^
cc1: some warnings being treated as errors
vim +/native_apic_msr_read +91 arch/x86//hyperv/hv_apic.c
77
78 static u32 hv_x2apic_read(u32 reg)
79 {
80 u32 reg_val, hi;
81
82 switch (reg) {
83 case APIC_EOI:
84 rdmsr(HV_X64_MSR_EOI, reg_val, hi);
85 return reg_val;
86 case APIC_TASKPRI:
87 rdmsr(HV_X64_MSR_TPR, reg_val, hi);
88 return reg_val;
89
90 default:
> 91 return native_apic_msr_read(reg);
92 }
93 }
94
95 static void hv_apic_write(u32 reg, u32 val)
96 {
97 switch (reg) {
98 case APIC_EOI:
99 wrmsr(HV_X64_MSR_EOI, val, 0);
100 break;
101 case APIC_TASKPRI:
102 wrmsr(HV_X64_MSR_TPR, val, 0);
103 break;
104 default:
105 native_apic_mem_write(reg, val);
106 }
107 }
108
109 static void hv_x2apic_write(u32 reg, u32 val)
110 {
111 switch (reg) {
112 case APIC_EOI:
113 wrmsr(HV_X64_MSR_EOI, val, 0);
114 break;
115 case APIC_TASKPRI:
116 wrmsr(HV_X64_MSR_TPR, val, 0);
117 break;
118 default:
> 119 native_apic_msr_write(reg, val);
120 }
121 }
122
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
Re: [PATCH v13 7/9] open: openat2(2) syscall
by kbuild test robot
Hi Aleksa,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc1 next-20190930]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Aleksa-Sarai/namei-openat2-2-pat...
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
fs/open.c: In function '__do_sys_openat2':
>> fs/open.c:1173:8: error: implicit declaration of function 'copy_struct_from_user'; did you mean 'copy_siginfo_from_user'? [-Werror=implicit-function-declaration]
err = copy_struct_from_user(&tmp, sizeof(tmp), how, usize);
^~~~~~~~~~~~~~~~~~~~~
copy_siginfo_from_user
cc1: some warnings being treated as errors
vim +1173 fs/open.c
1163
1164 SYSCALL_DEFINE4(openat2, int, dfd, const char __user *, filename,
1165 const struct open_how __user *, how, size_t, usize)
1166 {
1167 int err;
1168 struct open_how tmp;
1169
1170 if (unlikely(usize < OPEN_HOW_SIZE_VER0))
1171 return -EINVAL;
1172
> 1173 err = copy_struct_from_user(&tmp, sizeof(tmp), how, usize);
1174 if (err)
1175 return err;
1176
1177 if (force_o_largefile())
1178 tmp.flags |= O_LARGEFILE;
1179
1180 return do_sys_open(dfd, filename, &tmp);
1181 }
1182
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[linux-next:master 14074/14219] include/linux/rcupdate.h:651:9: sparse: sparse: context imbalance in 'dump_tasks' - unexpected unlock
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 8b0eed9f6e36a5488967b0acc51444d658dd711b
commit: cc2ceda020c2d0ee9ea839fc0f4239a3f7055c95 [14074/14219] mm, oom: avoid printk() iteration under RCU
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-37-gd466a02-dirty
git checkout cc2ceda020c2d0ee9ea839fc0f4239a3f7055c95
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
include/linux/rcupdate.h:651:9: sparse: sparse: context imbalance in 'find_lock_task_mm' - wrong count at exit
include/linux/sched/mm.h:166:37: sparse: sparse: dereference of noderef expression
mm/oom_kill.c:219:28: sparse: sparse: context imbalance in 'oom_badness' - unexpected unlock
>> include/linux/rcupdate.h:651:9: sparse: sparse: context imbalance in 'dump_tasks' - unexpected unlock
include/linux/rcupdate.h:651:9: sparse: sparse: context imbalance in '__oom_kill_process' - unexpected unlock
vim +/dump_tasks +651 include/linux/rcupdate.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 603
^1da177e4c3f41 Linus Torvalds 2005-04-16 604 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 605 * So where is rcu_write_lock()? It does not exist, as there is no
^1da177e4c3f41 Linus Torvalds 2005-04-16 606 * way for writers to lock out RCU readers. This is a feature, not
^1da177e4c3f41 Linus Torvalds 2005-04-16 607 * a bug -- this property is what provides RCU's performance benefits.
^1da177e4c3f41 Linus Torvalds 2005-04-16 608 * Of course, writers must coordinate with each other. The normal
^1da177e4c3f41 Linus Torvalds 2005-04-16 609 * spinlock primitives work well for this, but any other technique may be
^1da177e4c3f41 Linus Torvalds 2005-04-16 610 * used as well. RCU does not care how the writers keep out of each
^1da177e4c3f41 Linus Torvalds 2005-04-16 611 * others' way, as long as they do so.
^1da177e4c3f41 Linus Torvalds 2005-04-16 612 */
3d76c082907e8f Paul E. McKenney 2009-09-28 613
3d76c082907e8f Paul E. McKenney 2009-09-28 614 /**
ca5ecddfa8fcbd Paul E. McKenney 2010-04-28 615 * rcu_read_unlock() - marks the end of an RCU read-side critical section.
3d76c082907e8f Paul E. McKenney 2009-09-28 616 *
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 617 * In most situations, rcu_read_unlock() is immune from deadlock.
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 618 * However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 619 * is responsible for deboosting, which it does via rt_mutex_unlock().
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 620 * Unfortunately, this function acquires the scheduler's runqueue and
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 621 * priority-inheritance spinlocks. This means that deadlock could result
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 622 * if the caller of rcu_read_unlock() already holds one of these locks or
ec84b27f9b3b56 Anna-Maria Gleixner 2018-05-25 623 * any lock that is ever acquired while holding them.
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 624 *
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 625 * That said, RCU readers are never priority boosted unless they were
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 626 * preempted. Therefore, one way to avoid deadlock is to make sure
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 627 * that preemption never happens within any RCU read-side critical
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 628 * section whose outermost rcu_read_unlock() is called with one of
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 629 * rt_mutex_unlock()'s locks held. Such preemption can be avoided in
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 630 * a number of ways, for example, by invoking preempt_disable() before
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 631 * critical section's outermost rcu_read_lock().
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 632 *
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 633 * Given that the set of locks acquired by rt_mutex_unlock() might change
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 634 * at any time, a somewhat more future-proofed approach is to make sure
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 635 * that that preemption never happens within any RCU read-side critical
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 636 * section whose outermost rcu_read_unlock() is called with irqs disabled.
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 637 * This approach relies on the fact that rt_mutex_unlock() currently only
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 638 * acquires irq-disabled locks.
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 639 *
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 640 * The second of these two approaches is best in most situations,
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 641 * however, the first approach can also be useful, at least to those
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 642 * developers willing to keep abreast of the set of locks acquired by
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 643 * rt_mutex_unlock().
f27bc4873fa8b7 Paul E. McKenney 2014-05-04 644 *
3d76c082907e8f Paul E. McKenney 2009-09-28 645 * See rcu_read_lock() for more information.
3d76c082907e8f Paul E. McKenney 2009-09-28 646 */
bc33f24bdca8b6 Paul E. McKenney 2009-08-22 647 static inline void rcu_read_unlock(void)
bc33f24bdca8b6 Paul E. McKenney 2009-08-22 648 {
f78f5b90c4ffa5 Paul E. McKenney 2015-06-18 649 RCU_LOCKDEP_WARN(!rcu_is_watching(),
bde23c6892878e Heiko Carstens 2012-02-01 650 "rcu_read_unlock() used illegally while idle");
bc33f24bdca8b6 Paul E. McKenney 2009-08-22 @651 __release(RCU);
bc33f24bdca8b6 Paul E. McKenney 2009-08-22 652 __rcu_read_unlock();
d24209bb689e2c Paul E. McKenney 2015-01-21 653 rcu_lock_release(&rcu_lock_map); /* Keep acq info for rls diags. */
bc33f24bdca8b6 Paul E. McKenney 2009-08-22 654 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 655
:::::: The code at line 651 was first introduced by commit
:::::: bc33f24bdca8b6e97376e3a182ab69e6cdefa989 rcu: Consolidate sparse and lockdep declarations in include/linux/rcupdate.h
:::::: TO: Paul E. McKenney <paulmck(a)linux.vnet.ibm.com>
:::::: CC: Ingo Molnar <mingo(a)elte.hu>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
Re: [PATCH v8 8/8] media: imx214: Add new control with V4L2_CID_UNIT_CELL_SIZE
by kbuild test robot
Hi Ricardo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[cannot apply to v5.3 next-20190930]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Ricardo-Ribalda-Delgado/Implemen...
base: git://linuxtv.org/media_tree.git master
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-37-gd466a02-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> include/media/v4l2-ctrls.h:84:17: sparse: sparse: cast to non-scalar
vim +84 include/media/v4l2-ctrls.h
0176077a813933 Hans Verkuil 2014-04-27 75
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 76 /**
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 77 * v4l2_ctrl_ptr() - Helper function to return a v4l2_ctrl_ptr from a
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 78 * void pointer
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 79 * @ptr: The void pointer
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 80 */
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 81 static inline union v4l2_ctrl_ptr v4l2_ctrl_ptr_from_void(void *ptr)
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 82 {
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 83 BUILD_BUG_ON(sizeof(union v4l2_ctrl_ptr) != sizeof(void *));
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 @84 return (union v4l2_ctrl_ptr) ptr;
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 85 }
ba17c23180bad2 Ricardo Ribalda Delgado 2019-09-30 86
:::::: The code at line 84 was first introduced by commit
:::::: ba17c23180bad2a150b4094b28c9df8aa6195621 media: v4l2-ctrl: Add new helper v4l2_ctrl_ptr_from_void
:::::: TO: Ricardo Ribalda Delgado <ribalda(a)kernel.org>
:::::: CC: 0day robot <lkp(a)intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[linux-sof-driver:pr/1269 9/30] sound/soc/sof/intel/hda-pcm.c:103:6: error: 'sof_pcm_period_elapsed_work' undeclared; did you mean 'snd_pcm_period_elapsed'?
by kbuild test robot
tree: https://github.com/thesofproject/linux pr/1269
head: 139650b647059f8f5fad2c406910f8907acd9c73
commit: 57c311789ab56a9c85dfc92c0459bef4295a72ec [9/30] ASoC: SOF: HDA: Intel: initialise elapsed period work
config: x86_64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
git checkout 57c311789ab56a9c85dfc92c0459bef4295a72ec
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the linux-sof-driver/pr/1269 HEAD 139650b647059f8f5fad2c406910f8907acd9c73 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
In file included from include/linux/srcu.h:21:0,
from include/linux/notifier.h:16,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/device.h:16,
from include/sound/hdaudio.h:9,
from include/sound/hda_register.h:12,
from sound/soc/sof/intel/hda-pcm.c:18:
sound/soc/sof/intel/hda-pcm.c: In function 'hda_dsp_pcm_hw_params':
>> sound/soc/sof/intel/hda-pcm.c:103:6: error: 'sof_pcm_period_elapsed_work' undeclared (first use in this function); did you mean 'snd_pcm_period_elapsed'?
sof_pcm_period_elapsed_work);
^
include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
(_work)->func = (_func); \
^~~~~
>> sound/soc/sof/intel/hda-pcm.c:102:3: note: in expansion of macro 'INIT_WORK'
INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
^~~~~~~~~
sound/soc/sof/intel/hda-pcm.c:103:6: note: each undeclared identifier is reported only once for each function it appears in
sof_pcm_period_elapsed_work);
^
include/linux/workqueue.h:245:20: note: in definition of macro '__INIT_WORK'
(_work)->func = (_func); \
^~~~~
>> sound/soc/sof/intel/hda-pcm.c:102:3: note: in expansion of macro 'INIT_WORK'
INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
^~~~~~~~~
vim +103 sound/soc/sof/intel/hda-pcm.c
13
14 /*
15 * Hardware interface for generic Intel audio DSP HDA IP
16 */
17
> 18 #include <sound/hda_register.h>
19 #include <sound/pcm_params.h>
20 #include "../ops.h"
21 #include "hda.h"
22
23 #define SDnFMT_BASE(x) ((x) << 14)
24 #define SDnFMT_MULT(x) (((x) - 1) << 11)
25 #define SDnFMT_DIV(x) (((x) - 1) << 8)
26 #define SDnFMT_BITS(x) ((x) << 4)
27 #define SDnFMT_CHAN(x) ((x) << 0)
28
29 static inline u32 get_mult_div(struct snd_sof_dev *sdev, int rate)
30 {
31 switch (rate) {
32 case 8000:
33 return SDnFMT_DIV(6);
34 case 9600:
35 return SDnFMT_DIV(5);
36 case 11025:
37 return SDnFMT_BASE(1) | SDnFMT_DIV(4);
38 case 16000:
39 return SDnFMT_DIV(3);
40 case 22050:
41 return SDnFMT_BASE(1) | SDnFMT_DIV(2);
42 case 32000:
43 return SDnFMT_DIV(3) | SDnFMT_MULT(2);
44 case 44100:
45 return SDnFMT_BASE(1);
46 case 48000:
47 return 0;
48 case 88200:
49 return SDnFMT_BASE(1) | SDnFMT_MULT(2);
50 case 96000:
51 return SDnFMT_MULT(2);
52 case 176400:
53 return SDnFMT_BASE(1) | SDnFMT_MULT(4);
54 case 192000:
55 return SDnFMT_MULT(4);
56 default:
57 dev_warn(sdev->dev, "can't find div rate %d using 48kHz\n",
58 rate);
59 return 0; /* use 48KHz if not found */
60 }
61 };
62
63 static inline u32 get_bits(struct snd_sof_dev *sdev, int sample_bits)
64 {
65 switch (sample_bits) {
66 case 8:
67 return SDnFMT_BITS(0);
68 case 16:
69 return SDnFMT_BITS(1);
70 case 20:
71 return SDnFMT_BITS(2);
72 case 24:
73 return SDnFMT_BITS(3);
74 case 32:
75 return SDnFMT_BITS(4);
76 default:
77 dev_warn(sdev->dev, "can't find %d bits using 16bit\n",
78 sample_bits);
79 return SDnFMT_BITS(1); /* use 16bits format if not found */
80 }
81 };
82
83 int hda_dsp_pcm_hw_params(struct snd_sof_dev *sdev,
84 struct snd_pcm_substream *substream,
85 struct snd_pcm_hw_params *params,
86 struct sof_ipc_stream_params *ipc_params)
87 {
88 struct hdac_stream *hstream = substream->runtime->private_data;
89 struct hdac_ext_stream *stream = stream_to_hdac_ext_stream(hstream);
90 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
91 struct snd_dma_buffer *dmab;
92 struct snd_sof_pcm *spcm;
93 int ret;
94 u32 size, rate, bits;
95
96 size = params_buffer_bytes(params);
97 rate = get_mult_div(sdev, params_rate(params));
98 bits = get_bits(sdev, params_width(params));
99
100 spcm = snd_sof_find_spcm_dai(sdev, substream->private_data);
101 if (spcm)
> 102 INIT_WORK(&spcm->stream[substream->stream].period_elapsed_work,
> 103 sof_pcm_period_elapsed_work);
104
105 hstream->substream = substream;
106
107 dmab = substream->runtime->dma_buffer_p;
108
109 hstream->format_val = rate | bits | (params_channels(params) - 1);
110 hstream->bufsize = size;
111 hstream->period_bytes = params_period_bytes(params);
112 hstream->no_period_wakeup =
113 (params->info & SNDRV_PCM_INFO_NO_PERIOD_WAKEUP) &&
114 (params->flags & SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP);
115
116 ret = hda_dsp_stream_hw_params(sdev, stream, dmab, params);
117 if (ret < 0) {
118 dev_err(sdev->dev, "error: hdac prepare failed: %x\n", ret);
119 return ret;
120 }
121
122 /* disable SPIB, to enable buffer wrap for stream */
123 hda_dsp_stream_spib_config(sdev, stream, HDA_DSP_SPIB_DISABLE, 0);
124
125 /* set host_period_bytes to 0 if no IPC position */
126 if (hda && hda->no_ipc_position)
127 ipc_params->host_period_bytes = 0;
128
129 ipc_params->stream_tag = hstream->stream_tag;
130
131 return 0;
132 }
133
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months
[hch-misc:dma_alloc_pages /6] kernel/dma/mapping.c:399:2: error: implicit declaration of function 'dma_free_contiguous'; did you mean 'set_zone_contiguous'?
by kbuild test robot
tree: git://git.infradead.org/users/hch/misc.git dma_alloc_pages
head: 9321e87b6405e6a6af978c0221fac97faef5a5e3
commit: aadd1578979b47af197cf5acedc2a63d068e357e [/6] dma-mapping: add a new dma_alloc_pages API
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout aadd1578979b47af197cf5acedc2a63d068e357e
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Note: the hch-misc/dma_alloc_pages HEAD 9321e87b6405e6a6af978c0221fac97faef5a5e3 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
kernel/dma/mapping.c: In function 'dma_alloc_pages':
kernel/dma/mapping.c:387:9: error: implicit declaration of function 'dma_alloc_contiguous'; did you mean 'dma_alloc_coherent'? [-Werror=implicit-function-declaration]
return dma_alloc_contiguous(dev, size, gfp);
^~~~~~~~~~~~~~~~~~~~
dma_alloc_coherent
kernel/dma/mapping.c:387:9: warning: return makes pointer from integer without a cast [-Wint-conversion]
return dma_alloc_contiguous(dev, size, gfp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/dma/mapping.c: In function 'dma_free_pages':
>> kernel/dma/mapping.c:399:2: error: implicit declaration of function 'dma_free_contiguous'; did you mean 'set_zone_contiguous'? [-Werror=implicit-function-declaration]
dma_free_contiguous(dev, page, size);
^~~~~~~~~~~~~~~~~~~
set_zone_contiguous
cc1: some warnings being treated as errors
vim +399 kernel/dma/mapping.c
347
348 /**
349 * dma_alloc_pages - allocate memory that is DMA addressable by a device
350 * @dev: device the memory is allocated for
351 * @size: size of the memory to be allocated
352 * @gfp: GFP_* mask for the memory allocation
353 *
354 * This function allocates memory which is guaranteed to be DMA addressable
355 * by @dev when later mapped for DMA using the dma_map_page(), dma_map_single(),
356 * or dma_map_sg() functions.
357 */
358 struct page *dma_alloc_pages(struct device *dev, size_t size, gfp_t gfp)
359 {
360 const struct dma_map_ops *ops = get_dma_ops(dev);
361
362 /* let the implementation decide on the zone to allocate from: */
363 if (WARN_ON_ONCE(gfp & (__GFP_DMA | __GFP_DMA32)))
364 return NULL;
365
366 /* we must zero all memory to avoid information leaks */
367 gfp |= __GFP_ZERO;
368
369 if (dma_is_direct(ops))
370 return dma_direct_alloc_pages(dev, size, gfp);
371
372 /*
373 * Must return a page from the page allocator or CMA.
374 */
375 if (ops->alloc_pages)
376 return ops->alloc_pages(dev, size, gfp);
377
378 /*
379 * Everything that looks remotely like an IOMMU should be able to map
380 * any system memory into at least 32-bit of dma_addr_t.
381 */
382 if (dev->coherent_dma_mask < 32) {
383 dev_warn(dev, "can't support DMA page allocation for DMA mask < 32-bit\n");
384 return NULL;
385 }
386
> 387 return dma_alloc_contiguous(dev, size, gfp);
388 }
389 EXPORT_SYMBOL_GPL(dma_alloc_pages);
390
391 /**
392 * dma_free_pages - free memory allocated by dma_alloc_pages()
393 * @dev: device the memory is allocated for
394 * @page: the memory to be freed
395 * @size: size of the memory to be freed
396 */
397 void dma_free_pages(struct device *dev, struct page *page, size_t size)
398 {
> 399 dma_free_contiguous(dev, page, size);
400 }
401 EXPORT_SYMBOL_GPL(dma_free_pages);
402
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 9 months