[mark-rutland:atomics/arch-atomic 20/33] include/asm-generic/atomic-long.h:883:9: error: implicit declaration of function 'atomic_xchg'; did you mean 'atomic64_xchg'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic
head: 11e2a4a373daf878d565ed5d53c35e4351d63221
commit: a3a90a873f0a64157c7e11ac1edd78f1106ef29d [20/33] locking/atomic: m68k: move to ARCH_ATOMIC
config: m68k-defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland atomics/arch-atomic
git checkout a3a90a873f0a64157c7e11ac1edd78f1106ef29d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the mark-rutland/atomics/arch-atomic HEAD 11e2a4a373daf878d565ed5d53c35e4351d63221 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/atomic.h:87,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/m68k/kernel/asm-offsets.c:15:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
include/asm-generic/atomic-long.h: In function 'atomic_long_xchg':
>> include/asm-generic/atomic-long.h:883:9: error: implicit declaration of function 'atomic_xchg'; did you mean 'atomic64_xchg'? [-Werror=implicit-function-declaration]
883 | return atomic_xchg(v, i);
| ^~~~~~~~~~~
| atomic64_xchg
include/asm-generic/atomic-long.h: In function 'atomic_long_cmpxchg':
>> include/asm-generic/atomic-long.h:907:9: error: implicit declaration of function 'atomic_cmpxchg'; did you mean 'atomic64_cmpxchg'? [-Werror=implicit-function-declaration]
907 | return atomic_cmpxchg(v, old, new);
| ^~~~~~~~~~~~~~
| atomic64_cmpxchg
cc1: some warnings being treated as errors
--
In file included from include/linux/atomic.h:87,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/m68k/kernel/asm-offsets.c:15:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
include/asm-generic/atomic-long.h: In function 'atomic_long_xchg':
>> include/asm-generic/atomic-long.h:883:9: error: implicit declaration of function 'atomic_xchg'; did you mean 'atomic64_xchg'? [-Werror=implicit-function-declaration]
883 | return atomic_xchg(v, i);
| ^~~~~~~~~~~
| atomic64_xchg
include/asm-generic/atomic-long.h: In function 'atomic_long_cmpxchg':
>> include/asm-generic/atomic-long.h:907:9: error: implicit declaration of function 'atomic_cmpxchg'; did you mean 'atomic64_cmpxchg'? [-Werror=implicit-function-declaration]
907 | return atomic_cmpxchg(v, old, new);
| ^~~~~~~~~~~~~~
| atomic64_cmpxchg
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/m68k/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/atomic.h:87,
from include/linux/rcupdate.h:25,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from arch/m68k/kernel/asm-offsets.c:15:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
include/asm-generic/atomic-long.h: In function 'atomic_long_xchg':
>> include/asm-generic/atomic-long.h:883:9: error: implicit declaration of function 'atomic_xchg'; did you mean 'atomic64_xchg'? [-Werror=implicit-function-declaration]
883 | return atomic_xchg(v, i);
| ^~~~~~~~~~~
| atomic64_xchg
include/asm-generic/atomic-long.h: In function 'atomic_long_cmpxchg':
>> include/asm-generic/atomic-long.h:907:9: error: implicit declaration of function 'atomic_cmpxchg'; did you mean 'atomic64_cmpxchg'? [-Werror=implicit-function-declaration]
907 | return atomic_cmpxchg(v, old, new);
| ^~~~~~~~~~~~~~
| atomic64_cmpxchg
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: arch/m68k/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +883 include/asm-generic/atomic-long.h
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 855
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 856 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 857 atomic_long_fetch_xor(long i, atomic_long_t *v)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 858 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 @859 return atomic_fetch_xor(i, v);
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 860 }
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 861
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 862 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 863 atomic_long_fetch_xor_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 864 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 865 return atomic_fetch_xor_acquire(i, v);
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 866 }
63ab7bd0d450b7 include/asm-generic/atomic-long.h Davidlohr Bueso 2015-09-30 867
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 868 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 869 atomic_long_fetch_xor_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 870 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 871 return atomic_fetch_xor_release(i, v);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 872 }
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 873
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 874 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 875 atomic_long_fetch_xor_relaxed(long i, atomic_long_t *v)
2856f5e31c1413 include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 876 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 877 return atomic_fetch_xor_relaxed(i, v);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 878 }
2856f5e31c1413 include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 879
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 880 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 881 atomic_long_xchg(atomic_long_t *v, long i)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 882 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 @883 return atomic_xchg(v, i);
2856f5e31c1413 include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 884 }
bb2382c3e4395a include/asm-generic/atomic.h Mathieu Desnoyers 2007-05-08 885
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 886 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 887 atomic_long_xchg_acquire(atomic_long_t *v, long i)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 888 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 889 return atomic_xchg_acquire(v, i);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 890 }
4b358e22064b45 include/asm-generic/atomic.h Adrian Bunk 2006-12-06 891
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 892 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 893 atomic_long_xchg_release(atomic_long_t *v, long i)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 894 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 895 return atomic_xchg_release(v, i);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 896 }
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 897
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 898 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 899 atomic_long_xchg_relaxed(atomic_long_t *v, long i)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 900 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 901 return atomic_xchg_relaxed(v, i);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 902 }
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 903
c020395b6634b7 include/asm-generic/atomic-long.h Marco Elver 2019-11-26 904 static __always_inline long
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 905 atomic_long_cmpxchg(atomic_long_t *v, long old, long new)
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 906 {
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 @907 return atomic_cmpxchg(v, old, new);
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 908 }
b5d47ef9ea5c5f include/asm-generic/atomic-long.h Mark Rutland 2018-09-04 909
:::::: The code at line 883 was first introduced by commit
:::::: b5d47ef9ea5c5fe31d7eabeb79f697629bd9e2cb locking/atomics: Switch to generated atomic-long
:::::: TO: Mark Rutland <mark.rutland(a)arm.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[xlnx:master 11920/12212] drivers/soc/xilinx/xlnx_vcu.c:661 xvcu_probe() warn: 'xvcu->aclk' not released on lines: 631.
by Dan Carpenter
tree: https://github.com/Xilinx/linux-xlnx master
head: 69b34cdcc637efc5238a230132f8a5a2e2fad625
commit: 6d72adc5a6e6088ae976bd7f0c23d668ad963111 [11920/12212] soc: xilinx: vcu: Update vcu init/reset sequence
config: x86_64-randconfig-m031-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/soc/xilinx/xlnx_vcu.c:661 xvcu_probe() warn: 'xvcu->aclk' not released on lines: 631.
drivers/soc/xilinx/xlnx_vcu.c:661 xvcu_probe() warn: 'xvcu->pll_ref' not released on lines: 631.
Old smatch warnings:
drivers/soc/xilinx/xlnx_vcu.c:482 xvcu_set_vcu_pll_info() warn: 'xvcu->pll_ref' not released on lines: 389,421.
vim +661 drivers/soc/xilinx/xlnx_vcu.c
cee8113a295acf Dhaval Shah 2017-12-21 544 static int xvcu_probe(struct platform_device *pdev)
cee8113a295acf Dhaval Shah 2017-12-21 545 {
cee8113a295acf Dhaval Shah 2017-12-21 546 struct resource *res;
cee8113a295acf Dhaval Shah 2017-12-21 547 struct xvcu_device *xvcu;
816934060798dc Michael Tretter 2020-11-09 548 void __iomem *regs;
cee8113a295acf Dhaval Shah 2017-12-21 549 int ret;
cee8113a295acf Dhaval Shah 2017-12-21 550
cee8113a295acf Dhaval Shah 2017-12-21 551 xvcu = devm_kzalloc(&pdev->dev, sizeof(*xvcu), GFP_KERNEL);
cee8113a295acf Dhaval Shah 2017-12-21 552 if (!xvcu)
cee8113a295acf Dhaval Shah 2017-12-21 553 return -ENOMEM;
cee8113a295acf Dhaval Shah 2017-12-21 554
cee8113a295acf Dhaval Shah 2017-12-21 555 xvcu->dev = &pdev->dev;
cee8113a295acf Dhaval Shah 2017-12-21 556 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "vcu_slcr");
cee8113a295acf Dhaval Shah 2017-12-21 557 if (!res) {
cee8113a295acf Dhaval Shah 2017-12-21 558 dev_err(&pdev->dev, "get vcu_slcr memory resource failed.\n");
cee8113a295acf Dhaval Shah 2017-12-21 559 return -ENODEV;
cee8113a295acf Dhaval Shah 2017-12-21 560 }
cee8113a295acf Dhaval Shah 2017-12-21 561
4bdc0d676a6431 Christoph Hellwig 2020-01-06 562 xvcu->vcu_slcr_ba = devm_ioremap(&pdev->dev, res->start,
cee8113a295acf Dhaval Shah 2017-12-21 563 resource_size(res));
cee8113a295acf Dhaval Shah 2017-12-21 564 if (!xvcu->vcu_slcr_ba) {
cee8113a295acf Dhaval Shah 2017-12-21 565 dev_err(&pdev->dev, "vcu_slcr register mapping failed.\n");
cee8113a295acf Dhaval Shah 2017-12-21 566 return -ENOMEM;
cee8113a295acf Dhaval Shah 2017-12-21 567 }
cee8113a295acf Dhaval Shah 2017-12-21 568
816934060798dc Michael Tretter 2020-11-09 569 xvcu->logicore_reg_ba =
816934060798dc Michael Tretter 2020-11-09 570 syscon_regmap_lookup_by_compatible("xlnx,vcu-settings");
816934060798dc Michael Tretter 2020-11-09 571 if (IS_ERR(xvcu->logicore_reg_ba)) {
816934060798dc Michael Tretter 2020-11-09 572 dev_info(&pdev->dev,
816934060798dc Michael Tretter 2020-11-09 573 "could not find xlnx,vcu-settings: trying direct register access\n");
816934060798dc Michael Tretter 2020-11-09 574
816934060798dc Michael Tretter 2020-11-09 575 res = platform_get_resource_byname(pdev,
816934060798dc Michael Tretter 2020-11-09 576 IORESOURCE_MEM, "logicore");
cee8113a295acf Dhaval Shah 2017-12-21 577 if (!res) {
cee8113a295acf Dhaval Shah 2017-12-21 578 dev_err(&pdev->dev, "get logicore memory resource failed.\n");
cee8113a295acf Dhaval Shah 2017-12-21 579 return -ENODEV;
cee8113a295acf Dhaval Shah 2017-12-21 580 }
cee8113a295acf Dhaval Shah 2017-12-21 581
816934060798dc Michael Tretter 2020-11-09 582 regs = devm_ioremap(&pdev->dev, res->start, resource_size(res));
816934060798dc Michael Tretter 2020-11-09 583 if (!regs) {
cee8113a295acf Dhaval Shah 2017-12-21 584 dev_err(&pdev->dev, "logicore register mapping failed.\n");
cee8113a295acf Dhaval Shah 2017-12-21 585 return -ENOMEM;
cee8113a295acf Dhaval Shah 2017-12-21 586 }
cee8113a295acf Dhaval Shah 2017-12-21 587
816934060798dc Michael Tretter 2020-11-09 588 xvcu->logicore_reg_ba =
816934060798dc Michael Tretter 2020-11-09 589 devm_regmap_init_mmio(&pdev->dev, regs,
816934060798dc Michael Tretter 2020-11-09 590 &vcu_settings_regmap_config);
816934060798dc Michael Tretter 2020-11-09 591 if (IS_ERR(xvcu->logicore_reg_ba)) {
816934060798dc Michael Tretter 2020-11-09 592 dev_err(&pdev->dev, "failed to init regmap\n");
816934060798dc Michael Tretter 2020-11-09 593 return PTR_ERR(xvcu->logicore_reg_ba);
816934060798dc Michael Tretter 2020-11-09 594 }
816934060798dc Michael Tretter 2020-11-09 595 }
816934060798dc Michael Tretter 2020-11-09 596
cee8113a295acf Dhaval Shah 2017-12-21 597 xvcu->aclk = devm_clk_get(&pdev->dev, "aclk");
cee8113a295acf Dhaval Shah 2017-12-21 598 if (IS_ERR(xvcu->aclk)) {
cee8113a295acf Dhaval Shah 2017-12-21 599 dev_err(&pdev->dev, "Could not get aclk clock\n");
cee8113a295acf Dhaval Shah 2017-12-21 600 return PTR_ERR(xvcu->aclk);
cee8113a295acf Dhaval Shah 2017-12-21 601 }
cee8113a295acf Dhaval Shah 2017-12-21 602
cee8113a295acf Dhaval Shah 2017-12-21 603 xvcu->pll_ref = devm_clk_get(&pdev->dev, "pll_ref");
cee8113a295acf Dhaval Shah 2017-12-21 604 if (IS_ERR(xvcu->pll_ref)) {
cee8113a295acf Dhaval Shah 2017-12-21 605 dev_err(&pdev->dev, "Could not get pll_ref clock\n");
cee8113a295acf Dhaval Shah 2017-12-21 606 return PTR_ERR(xvcu->pll_ref);
cee8113a295acf Dhaval Shah 2017-12-21 607 }
cee8113a295acf Dhaval Shah 2017-12-21 608
cee8113a295acf Dhaval Shah 2017-12-21 609 ret = clk_prepare_enable(xvcu->aclk);
cee8113a295acf Dhaval Shah 2017-12-21 610 if (ret) {
cee8113a295acf Dhaval Shah 2017-12-21 611 dev_err(&pdev->dev, "aclk clock enable failed\n");
cee8113a295acf Dhaval Shah 2017-12-21 612 return ret;
cee8113a295acf Dhaval Shah 2017-12-21 613 }
cee8113a295acf Dhaval Shah 2017-12-21 614
cee8113a295acf Dhaval Shah 2017-12-21 615 ret = clk_prepare_enable(xvcu->pll_ref);
cee8113a295acf Dhaval Shah 2017-12-21 616 if (ret) {
cee8113a295acf Dhaval Shah 2017-12-21 617 dev_err(&pdev->dev, "pll_ref clock enable failed\n");
cee8113a295acf Dhaval Shah 2017-12-21 618 goto error_aclk;
cee8113a295acf Dhaval Shah 2017-12-21 619 }
cee8113a295acf Dhaval Shah 2017-12-21 620
cee8113a295acf Dhaval Shah 2017-12-21 621 /*
cee8113a295acf Dhaval Shah 2017-12-21 622 * Do the Gasket isolation and put the VCU out of reset
cee8113a295acf Dhaval Shah 2017-12-21 623 * Bit 0 : Gasket isolation
cee8113a295acf Dhaval Shah 2017-12-21 624 * Bit 1 : put VCU out of reset
cee8113a295acf Dhaval Shah 2017-12-21 625 */
6d72adc5a6e608 Dhaval Shah 2021-01-29 626 xvcu->reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
6d72adc5a6e608 Dhaval Shah 2021-01-29 627 GPIOD_OUT_LOW);
6d72adc5a6e608 Dhaval Shah 2021-01-29 628 if (IS_ERR(xvcu->reset_gpio)) {
6d72adc5a6e608 Dhaval Shah 2021-01-29 629 ret = PTR_ERR(xvcu->reset_gpio);
6d72adc5a6e608 Dhaval Shah 2021-01-29 630 dev_err(&pdev->dev, "failed to get reset gpio for vcu.\n");
6d72adc5a6e608 Dhaval Shah 2021-01-29 631 return ret;
goto error_pll_ref;
6d72adc5a6e608 Dhaval Shah 2021-01-29 632 }
6d72adc5a6e608 Dhaval Shah 2021-01-29 633
6d72adc5a6e608 Dhaval Shah 2021-01-29 634 if (xvcu->reset_gpio) {
6d72adc5a6e608 Dhaval Shah 2021-01-29 635 gpiod_set_value(xvcu->reset_gpio, 0);
6d72adc5a6e608 Dhaval Shah 2021-01-29 636 /* min 2 clock cycle of vcu pll_ref, slowest freq is 33.33KHz */
6d72adc5a6e608 Dhaval Shah 2021-01-29 637 usleep_range(60, 120);
6d72adc5a6e608 Dhaval Shah 2021-01-29 638 gpiod_set_value(xvcu->reset_gpio, 1);
6d72adc5a6e608 Dhaval Shah 2021-01-29 639 usleep_range(60, 120);
6d72adc5a6e608 Dhaval Shah 2021-01-29 640 } else {
6d72adc5a6e608 Dhaval Shah 2021-01-29 641 dev_warn(&pdev->dev, "No reset gpio info from dts for vcu. This may lead to incorrect functionality if VCU isolation is removed post initialization.\n");
6d72adc5a6e608 Dhaval Shah 2021-01-29 642 }
6d72adc5a6e608 Dhaval Shah 2021-01-29 643
816934060798dc Michael Tretter 2020-11-09 644 regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
cee8113a295acf Dhaval Shah 2017-12-21 645
cee8113a295acf Dhaval Shah 2017-12-21 646 /* Do the PLL Settings based on the ref clk,core and mcu clk freq */
cee8113a295acf Dhaval Shah 2017-12-21 647 ret = xvcu_set_pll(xvcu);
cee8113a295acf Dhaval Shah 2017-12-21 648 if (ret) {
cee8113a295acf Dhaval Shah 2017-12-21 649 dev_err(&pdev->dev, "Failed to set the pll\n");
cee8113a295acf Dhaval Shah 2017-12-21 650 goto error_pll_ref;
cee8113a295acf Dhaval Shah 2017-12-21 651 }
cee8113a295acf Dhaval Shah 2017-12-21 652
cee8113a295acf Dhaval Shah 2017-12-21 653 dev_set_drvdata(&pdev->dev, xvcu);
cee8113a295acf Dhaval Shah 2017-12-21 654
cee8113a295acf Dhaval Shah 2017-12-21 655 return 0;
cee8113a295acf Dhaval Shah 2017-12-21 656
cee8113a295acf Dhaval Shah 2017-12-21 657 error_pll_ref:
cee8113a295acf Dhaval Shah 2017-12-21 658 clk_disable_unprepare(xvcu->pll_ref);
cee8113a295acf Dhaval Shah 2017-12-21 659 error_aclk:
cee8113a295acf Dhaval Shah 2017-12-21 660 clk_disable_unprepare(xvcu->aclk);
cee8113a295acf Dhaval Shah 2017-12-21 @661 return ret;
cee8113a295acf Dhaval Shah 2017-12-21 662 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/dsa/ocelot/felix.c:1329 felix_check_xtr_pkt() error: uninitialized symbol 'err'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d07f6ca923ea0927a1024dfccafc5b53b61cfecc
commit: 0a6f17c6ae2116809a7b7eb6dd3eab59ef5460ef net: dsa: tag_ocelot_8021q: add support for PTP timestamping
config: i386-randconfig-m021-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/dsa/ocelot/felix.c:1329 felix_check_xtr_pkt() error: uninitialized symbol 'err'.
vim +/err +1329 drivers/net/dsa/ocelot/felix.c
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1286 static bool felix_check_xtr_pkt(struct ocelot *ocelot, unsigned int ptp_type)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1287 {
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1288 struct felix *felix = ocelot_to_felix(ocelot);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1289 int err, grp = 0;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1290
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1291 if (felix->tag_proto != DSA_TAG_PROTO_OCELOT_8021Q)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1292 return false;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1293
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1294 if (!felix->info->quirk_no_xtr_irq)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1295 return false;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1296
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1297 if (ptp_type == PTP_CLASS_NONE)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1298 return false;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1299
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1300 while (ocelot_read(ocelot, QS_XTR_DATA_PRESENT) & BIT(grp)) {
The static checker can't know whether we always enter this loop.
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1301 struct sk_buff *skb;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1302 unsigned int type;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1303
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1304 err = ocelot_xtr_poll_frame(ocelot, grp, &skb);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1305 if (err)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1306 goto out;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1307
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1308 /* We trap to the CPU port module all PTP frames, but
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1309 * felix_rxtstamp() only gets called for event frames.
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1310 * So we need to avoid sending duplicate general
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1311 * message frames by running a second BPF classifier
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1312 * here and dropping those.
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1313 */
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1314 __skb_push(skb, ETH_HLEN);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1315
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1316 type = ptp_classify_raw(skb);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1317
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1318 __skb_pull(skb, ETH_HLEN);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1319
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1320 if (type == PTP_CLASS_NONE) {
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1321 kfree_skb(skb);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1322 continue;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1323 }
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1324
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1325 netif_rx(skb);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1326 }
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1327
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1328 out:
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 @1329 if (err < 0)
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1330 ocelot_drain_cpu_queue(ocelot, 0);
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1331
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1332 return true;
0a6f17c6ae21168 Vladimir Oltean 2021-02-14 1333 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[mark-rutland:atomics/arch-atomic 31/33] include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic
head: 11e2a4a373daf878d565ed5d53c35e4351d63221
commit: 2b748152193fe9172ee8395cacff3f316e106064 [31/33] locking/atomic: xtensa: move to ARCH_ATOMIC
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland atomics/arch-atomic
git checkout 2b748152193fe9172ee8395cacff3f316e106064
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the mark-rutland/atomics/arch-atomic HEAD 11e2a4a373daf878d565ed5d53c35e4351d63221 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/atomic.h:5,
from arch/xtensa/include/asm/bitops.h:192,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
cc1: some warnings being treated as errors
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/atomic.h:5,
from arch/xtensa/include/asm/bitops.h:192,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/linux/delay.h:22,
from kernel//trace/preemptirq_delay_test.c:9:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
In file included from include/linux/mmzone.h:19,
from include/linux/topology.h:33,
from include/linux/irq.h:19,
from include/asm-generic/hardirq.h:17,
from ./arch/xtensa/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from kernel//trace/preemptirq_delay_test.c:10:
include/linux/page-flags-layout.h: At top level:
include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
6 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/atomic.h:5,
from arch/xtensa/include/asm/bitops.h:192,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/atomic.h:5,
from arch/xtensa/include/asm/bitops.h:192,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from ./arch/xtensa/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:553:9: error: implicit declaration of function 'atomic_add_return'; did you mean 'atomic64_add_return'? [-Werror=implicit-function-declaration]
553 | return atomic_add_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_add_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:577:9: error: implicit declaration of function 'atomic_fetch_add'; did you mean 'atomic64_fetch_add'? [-Werror=implicit-function-declaration]
577 | return atomic_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_add
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:607:9: error: implicit declaration of function 'atomic_sub_return'; did you mean 'atomic64_sub_return'? [-Werror=implicit-function-declaration]
607 | return atomic_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_sub_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:631:9: error: implicit declaration of function 'atomic_fetch_sub'; did you mean 'atomic64_fetch_sub'? [-Werror=implicit-function-declaration]
631 | return atomic_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_sub
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:769:9: error: implicit declaration of function 'atomic_fetch_and'; did you mean 'atomic64_fetch_and'? [-Werror=implicit-function-declaration]
769 | return atomic_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_and
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:829:9: error: implicit declaration of function 'atomic_fetch_or'; did you mean 'atomic64_fetch_or'? [-Werror=implicit-function-declaration]
829 | return atomic_fetch_or(i, v);
| ^~~~~~~~~~~~~~~
| atomic64_fetch_or
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:859:9: error: implicit declaration of function 'atomic_fetch_xor'; did you mean 'atomic64_fetch_xor'? [-Werror=implicit-function-declaration]
859 | return atomic_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~
| atomic64_fetch_xor
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +553 include/asm-generic/atomic-long.h
b5d47ef9ea5c5f Mark Rutland 2018-09-04 549
c020395b6634b7 Marco Elver 2019-11-26 550 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 551 atomic_long_add_return(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 552 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @553 return atomic_add_return(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 554 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 555
c020395b6634b7 Marco Elver 2019-11-26 556 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 557 atomic_long_add_return_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 558 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 559 return atomic_add_return_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 560 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 561
c020395b6634b7 Marco Elver 2019-11-26 562 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 563 atomic_long_add_return_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 564 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 565 return atomic_add_return_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 566 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 567
c020395b6634b7 Marco Elver 2019-11-26 568 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 569 atomic_long_add_return_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 570 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 571 return atomic_add_return_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 572 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 573
c020395b6634b7 Marco Elver 2019-11-26 574 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 575 atomic_long_fetch_add(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 576 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @577 return atomic_fetch_add(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 578 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 579
c020395b6634b7 Marco Elver 2019-11-26 580 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 581 atomic_long_fetch_add_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 582 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 583 return atomic_fetch_add_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 584 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 585
c020395b6634b7 Marco Elver 2019-11-26 586 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 587 atomic_long_fetch_add_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 588 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 589 return atomic_fetch_add_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 590 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 591
c020395b6634b7 Marco Elver 2019-11-26 592 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 593 atomic_long_fetch_add_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 594 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 595 return atomic_fetch_add_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 596 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 597
c020395b6634b7 Marco Elver 2019-11-26 598 static __always_inline void
b5d47ef9ea5c5f Mark Rutland 2018-09-04 599 atomic_long_sub(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 600 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 601 atomic_sub(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 602 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 603
c020395b6634b7 Marco Elver 2019-11-26 604 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 605 atomic_long_sub_return(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 606 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @607 return atomic_sub_return(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 608 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 609
c020395b6634b7 Marco Elver 2019-11-26 610 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 611 atomic_long_sub_return_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 612 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 613 return atomic_sub_return_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 614 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 615
c020395b6634b7 Marco Elver 2019-11-26 616 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 617 atomic_long_sub_return_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 618 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 619 return atomic_sub_return_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 620 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 621
c020395b6634b7 Marco Elver 2019-11-26 622 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 623 atomic_long_sub_return_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 624 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 625 return atomic_sub_return_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 626 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 627
c020395b6634b7 Marco Elver 2019-11-26 628 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 629 atomic_long_fetch_sub(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 630 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @631 return atomic_fetch_sub(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 632 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 633
:::::: The code at line 553 was first introduced by commit
:::::: b5d47ef9ea5c5fe31d7eabeb79f697629bd9e2cb locking/atomics: Switch to generated atomic-long
:::::: TO: Mark Rutland <mark.rutland(a)arm.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[arm-platforms:irq/domain_cleanup 30/32] drivers/pci/controller/pcie-xilinx-cpm.c:225:51: error: expected ')'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head: 3aadfc1b915f97f186b3a94cacc82b9504e68223
commit: 51c378bd84120c03c6845ed75fc3a073b0d1f203 [30/32] PCI: Bulk conversion to generic_handle_domain_irq()
config: powerpc64-randconfig-r035-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/com...
git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
git fetch --no-tags arm-platforms irq/domain_cleanup
git checkout 51c378bd84120c03c6845ed75fc3a073b0d1f203
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
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/pci/controller/pcie-xilinx-cpm.c:225:36: warning: expression result unused [-Wunused-value]
generic_handle_domain_irq((port->intx_domain, i);
~~~~ ^~~~~~~~~~~
>> drivers/pci/controller/pcie-xilinx-cpm.c:225:51: error: expected ')'
generic_handle_domain_irq((port->intx_domain, i);
^
drivers/pci/controller/pcie-xilinx-cpm.c:225:28: note: to match this '('
generic_handle_domain_irq((port->intx_domain, i);
^
1 warning and 1 error generated.
vim +225 drivers/pci/controller/pcie-xilinx-cpm.c
211
212 static void xilinx_cpm_pcie_intx_flow(struct irq_desc *desc)
213 {
214 struct xilinx_cpm_pcie_port *port = irq_desc_get_handler_data(desc);
215 struct irq_chip *chip = irq_desc_get_chip(desc);
216 unsigned long val;
217 int i;
218
219 chained_irq_enter(chip, desc);
220
221 val = FIELD_GET(XILINX_CPM_PCIE_IDRN_MASK,
222 pcie_read(port, XILINX_CPM_PCIE_REG_IDRN));
223
224 for_each_set_bit(i, &val, PCI_NUM_INTX)
> 225 generic_handle_domain_irq((port->intx_domain, i);
226
227 chained_irq_exit(chip, desc);
228 }
229
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[mark-rutland:atomics/arch-atomic 30/33] include/asm-generic/atomic-long.h:59:9: error: implicit declaration of function 'atomic64_add_return'; did you mean 'atomic64_dec_return'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git atomics/arch-atomic
head: 11e2a4a373daf878d565ed5d53c35e4351d63221
commit: 48e41689de6bdea95046f62273daf4271e94381f [30/33] locking/atomic: sparc: move to ARCH_ATOMIC
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id...
git remote add mark-rutland https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark-rutland atomics/arch-atomic
git checkout 48e41689de6bdea95046f62273daf4271e94381f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the mark-rutland/atomics/arch-atomic HEAD 11e2a4a373daf878d565ed5d53c35e4351d63221 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_64.h:52,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:59:9: error: implicit declaration of function 'atomic64_add_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
59 | return atomic64_add_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:83:9: error: implicit declaration of function 'atomic64_fetch_add'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
83 | return atomic64_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:113:9: error: implicit declaration of function 'atomic64_sub_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
113 | return atomic64_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:137:9: error: implicit declaration of function 'atomic64_fetch_sub'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
137 | return atomic64_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:275:9: error: implicit declaration of function 'atomic64_fetch_and'; did you mean 'atomic64_fetch_inc'? [-Werror=implicit-function-declaration]
275 | return atomic64_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_inc
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:335:9: error: implicit declaration of function 'atomic64_fetch_or'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
335 | return atomic64_fetch_or(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:365:9: error: implicit declaration of function 'atomic64_fetch_xor'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
365 | return atomic64_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
cc1: some warnings being treated as errors
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_64.h:52,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/linux/delay.h:22,
from kernel//trace/preemptirq_delay_test.c:9:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:59:9: error: implicit declaration of function 'atomic64_add_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
59 | return atomic64_add_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:83:9: error: implicit declaration of function 'atomic64_fetch_add'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
83 | return atomic64_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:113:9: error: implicit declaration of function 'atomic64_sub_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
113 | return atomic64_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:137:9: error: implicit declaration of function 'atomic64_fetch_sub'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
137 | return atomic64_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:275:9: error: implicit declaration of function 'atomic64_fetch_and'; did you mean 'atomic64_fetch_inc'? [-Werror=implicit-function-declaration]
275 | return atomic64_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_inc
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:335:9: error: implicit declaration of function 'atomic64_fetch_or'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
335 | return atomic64_fetch_or(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:365:9: error: implicit declaration of function 'atomic64_fetch_xor'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
365 | return atomic64_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
In file included from include/linux/mmzone.h:19,
from include/linux/topology.h:33,
from include/linux/irq.h:19,
from kernel//trace/preemptirq_delay_test.c:11:
include/linux/page-flags-layout.h: At top level:
include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
6 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
compilation terminated.
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_64.h:52,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:59:9: error: implicit declaration of function 'atomic64_add_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
59 | return atomic64_add_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:83:9: error: implicit declaration of function 'atomic64_fetch_add'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
83 | return atomic64_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:113:9: error: implicit declaration of function 'atomic64_sub_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
113 | return atomic64_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:137:9: error: implicit declaration of function 'atomic64_fetch_sub'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
137 | return atomic64_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:275:9: error: implicit declaration of function 'atomic64_fetch_and'; did you mean 'atomic64_fetch_inc'? [-Werror=implicit-function-declaration]
275 | return atomic64_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_inc
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:335:9: error: implicit declaration of function 'atomic64_fetch_or'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
335 | return atomic64_fetch_or(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:365:9: error: implicit declaration of function 'atomic64_fetch_xor'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
365 | return atomic64_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/atomic.h:87,
from include/asm-generic/bitops/lock.h:5,
from arch/sparc/include/asm/bitops_64.h:52,
from arch/sparc/include/asm/bitops.h:5,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
include/asm-generic/atomic-long.h: In function 'atomic_long_add_return':
>> include/asm-generic/atomic-long.h:59:9: error: implicit declaration of function 'atomic64_add_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
59 | return atomic64_add_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_add':
>> include/asm-generic/atomic-long.h:83:9: error: implicit declaration of function 'atomic64_fetch_add'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
83 | return atomic64_fetch_add(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_sub_return':
>> include/asm-generic/atomic-long.h:113:9: error: implicit declaration of function 'atomic64_sub_return'; did you mean 'atomic64_dec_return'? [-Werror=implicit-function-declaration]
113 | return atomic64_sub_return(i, v);
| ^~~~~~~~~~~~~~~~~~~
| atomic64_dec_return
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_sub':
>> include/asm-generic/atomic-long.h:137:9: error: implicit declaration of function 'atomic64_fetch_sub'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
137 | return atomic64_fetch_sub(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_and':
>> include/asm-generic/atomic-long.h:275:9: error: implicit declaration of function 'atomic64_fetch_and'; did you mean 'atomic64_fetch_inc'? [-Werror=implicit-function-declaration]
275 | return atomic64_fetch_and(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_inc
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_or':
>> include/asm-generic/atomic-long.h:335:9: error: implicit declaration of function 'atomic64_fetch_or'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
335 | return atomic64_fetch_or(i, v);
| ^~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
include/asm-generic/atomic-long.h: In function 'atomic_long_fetch_xor':
>> include/asm-generic/atomic-long.h:365:9: error: implicit declaration of function 'atomic64_fetch_xor'; did you mean 'atomic64_fetch_dec'? [-Werror=implicit-function-declaration]
365 | return atomic64_fetch_xor(i, v);
| ^~~~~~~~~~~~~~~~~~
| atomic64_fetch_dec
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +59 include/asm-generic/atomic-long.h
586b610e43a5ad Will Deacon 2015-08-06 55
c020395b6634b7 Marco Elver 2019-11-26 56 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 57 atomic_long_add_return(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 58 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @59 return atomic64_add_return(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 60 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 61
c020395b6634b7 Marco Elver 2019-11-26 62 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 63 atomic_long_add_return_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 64 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 65 return atomic64_add_return_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 66 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 67
c020395b6634b7 Marco Elver 2019-11-26 68 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 69 atomic_long_add_return_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 70 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 71 return atomic64_add_return_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 72 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 73
c020395b6634b7 Marco Elver 2019-11-26 74 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 75 atomic_long_add_return_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 76 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 77 return atomic64_add_return_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 78 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 79
c020395b6634b7 Marco Elver 2019-11-26 80 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 81 atomic_long_fetch_add(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 82 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @83 return atomic64_fetch_add(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 84 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 85
c020395b6634b7 Marco Elver 2019-11-26 86 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 87 atomic_long_fetch_add_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 88 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 89 return atomic64_fetch_add_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 90 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 91
c020395b6634b7 Marco Elver 2019-11-26 92 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 93 atomic_long_fetch_add_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 94 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 95 return atomic64_fetch_add_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 96 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 97
c020395b6634b7 Marco Elver 2019-11-26 98 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 99 atomic_long_fetch_add_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 100 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 101 return atomic64_fetch_add_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 102 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 103
c020395b6634b7 Marco Elver 2019-11-26 104 static __always_inline void
b5d47ef9ea5c5f Mark Rutland 2018-09-04 105 atomic_long_sub(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 106 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 107 atomic64_sub(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 108 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 109
c020395b6634b7 Marco Elver 2019-11-26 110 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 111 atomic_long_sub_return(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 112 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @113 return atomic64_sub_return(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 114 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 115
c020395b6634b7 Marco Elver 2019-11-26 116 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 117 atomic_long_sub_return_acquire(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 118 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 119 return atomic64_sub_return_acquire(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 120 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 121
c020395b6634b7 Marco Elver 2019-11-26 122 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 123 atomic_long_sub_return_release(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 124 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 125 return atomic64_sub_return_release(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 126 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 127
c020395b6634b7 Marco Elver 2019-11-26 128 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 129 atomic_long_sub_return_relaxed(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 130 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 131 return atomic64_sub_return_relaxed(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 132 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 133
c020395b6634b7 Marco Elver 2019-11-26 134 static __always_inline long
b5d47ef9ea5c5f Mark Rutland 2018-09-04 135 atomic_long_fetch_sub(long i, atomic_long_t *v)
b5d47ef9ea5c5f Mark Rutland 2018-09-04 136 {
b5d47ef9ea5c5f Mark Rutland 2018-09-04 @137 return atomic64_fetch_sub(i, v);
b5d47ef9ea5c5f Mark Rutland 2018-09-04 138 }
b5d47ef9ea5c5f Mark Rutland 2018-09-04 139
:::::: The code at line 59 was first introduced by commit
:::::: b5d47ef9ea5c5fe31d7eabeb79f697629bd9e2cb locking/atomics: Switch to generated atomic-long
:::::: TO: Mark Rutland <mark.rutland(a)arm.com>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 2296/2770] kernel/bpf/helpers.c:713:43: warning: Uninitialized variable: bufs [uninitvar]
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: ec2618180c3450d06a6a4ba951d4c9a2c689b517
commit: e2d5b2bb769fa5f500760caba76436ba3a10a895 [2296/2770] bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers
compiler: sparc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> kernel/bpf/helpers.c:713:43: warning: Uninitialized variable: bufs [uninitvar]
if (WARN_ON_ONCE(nest_level > ARRAY_SIZE(bufs->tmp_bufs))) {
^
kernel/bpf/helpers.c:408:20: warning: Possible null pointer dereference: storage [nullPointer]
ptr = &READ_ONCE(storage->buf)->data[0];
^
kernel/bpf/helpers.c:395:39: note: Assignment 'storage=NULL', assigned value is 0
struct bpf_cgroup_storage *storage = NULL;
^
kernel/bpf/helpers.c:408:20: note: Null pointer dereference
ptr = &READ_ONCE(storage->buf)->data[0];
^
vim +713 kernel/bpf/helpers.c
d9c9e4db186ab4 Florent Revest 2021-04-19 705
d9c9e4db186ab4 Florent Revest 2021-04-19 706 static int try_get_fmt_tmp_buf(char **tmp_buf)
d9c9e4db186ab4 Florent Revest 2021-04-19 707 {
e2d5b2bb769fa5 Florent Revest 2021-05-11 708 struct bpf_bprintf_buffers *bufs;
e2d5b2bb769fa5 Florent Revest 2021-05-11 709 int nest_level;
d9c9e4db186ab4 Florent Revest 2021-04-19 710
d9c9e4db186ab4 Florent Revest 2021-04-19 711 preempt_disable();
e2d5b2bb769fa5 Florent Revest 2021-05-11 712 nest_level = this_cpu_inc_return(bpf_bprintf_nest_level);
e2d5b2bb769fa5 Florent Revest 2021-05-11 @713 if (WARN_ON_ONCE(nest_level > ARRAY_SIZE(bufs->tmp_bufs))) {
e2d5b2bb769fa5 Florent Revest 2021-05-11 714 this_cpu_dec(bpf_bprintf_nest_level);
d9c9e4db186ab4 Florent Revest 2021-04-19 715 preempt_enable();
d9c9e4db186ab4 Florent Revest 2021-04-19 716 return -EBUSY;
d9c9e4db186ab4 Florent Revest 2021-04-19 717 }
e2d5b2bb769fa5 Florent Revest 2021-05-11 718 bufs = this_cpu_ptr(&bpf_bprintf_bufs);
e2d5b2bb769fa5 Florent Revest 2021-05-11 719 *tmp_buf = bufs->tmp_bufs[nest_level - 1];
d9c9e4db186ab4 Florent Revest 2021-04-19 720
d9c9e4db186ab4 Florent Revest 2021-04-19 721 return 0;
d9c9e4db186ab4 Florent Revest 2021-04-19 722 }
d9c9e4db186ab4 Florent Revest 2021-04-19 723
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[chrome-os:chromeos-5.4 59/70] drivers/gpu/drm/drm_dp_aux_backlight.c:177 drm_dp_aux_backlight_register() warn: passing zero to 'PTR_ERR'
by Dan Carpenter
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: 15d194a5987968744e349126609033f418625127
commit: 09cbe8d3853433d8c98826761d0a2c68013e7250 [59/70] CHROMIUM: drm/dp: Add DisplayPort aux backlight control support
config: x86_64-randconfig-m001-20210516 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/drm_dp_aux_backlight.c:177 drm_dp_aux_backlight_register() warn: passing zero to 'PTR_ERR'
vim +/PTR_ERR +177 drivers/gpu/drm/drm_dp_aux_backlight.c
09cbe8d3853433 Rajeev Nandan 2021-04-07 158 int drm_dp_aux_backlight_register(const char *name,
09cbe8d3853433 Rajeev Nandan 2021-04-07 159 struct drm_dp_aux_backlight *aux_bl)
09cbe8d3853433 Rajeev Nandan 2021-04-07 160 {
09cbe8d3853433 Rajeev Nandan 2021-04-07 161 struct backlight_properties bl_props = { 0 };
09cbe8d3853433 Rajeev Nandan 2021-04-07 162 int max_brightness;
09cbe8d3853433 Rajeev Nandan 2021-04-07 163
09cbe8d3853433 Rajeev Nandan 2021-04-07 164 if (!name || !aux_bl || !aux_bl->aux)
09cbe8d3853433 Rajeev Nandan 2021-04-07 165 return -EINVAL;
09cbe8d3853433 Rajeev Nandan 2021-04-07 166
09cbe8d3853433 Rajeev Nandan 2021-04-07 167 max_brightness = 0xffff;
09cbe8d3853433 Rajeev Nandan 2021-04-07 168
09cbe8d3853433 Rajeev Nandan 2021-04-07 169 bl_props.type = BACKLIGHT_RAW;
09cbe8d3853433 Rajeev Nandan 2021-04-07 170 bl_props.brightness = max_brightness;
09cbe8d3853433 Rajeev Nandan 2021-04-07 171 bl_props.max_brightness = max_brightness;
09cbe8d3853433 Rajeev Nandan 2021-04-07 172 aux_bl->bd = devm_backlight_device_register(aux_bl->dev, name,
09cbe8d3853433 Rajeev Nandan 2021-04-07 173 aux_bl->dev, aux_bl,
09cbe8d3853433 Rajeev Nandan 2021-04-07 174 &aux_bl_ops, &bl_props);
09cbe8d3853433 Rajeev Nandan 2021-04-07 175 if (IS_ERR(aux_bl->bd)) {
09cbe8d3853433 Rajeev Nandan 2021-04-07 176 aux_bl->bd = NULL;
^^^^^^^^^^^^^^^^^^
Preserve the error code before setting this to NULL
09cbe8d3853433 Rajeev Nandan 2021-04-07 @177 return PTR_ERR(aux_bl->bd);
^^^^^^^^^^^^^^^^^^^^^^^^^^
PTR_ERR(NULL) is success.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[hnaz-linux-mm:master 179/239] include/linux/thread_info.h:215:27: error: 'INT_MAX' undeclared
by kernel test robot
tree: https://github.com/hnaz/linux-mm master
head: 12891f829e4851b3562ddcde27a4a9ade308ada3
commit: 161b082aa6ac5047f1b0f243f0e834d2bfb39842 [179/239] kernel.h: split out panic and oops helpers
config: nds32-defconfig (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/hnaz/linux-mm/commit/161b082aa6ac5047f1b0f243f0e834d2b...
git remote add hnaz-linux-mm https://github.com/hnaz/linux-mm
git fetch --no-tags hnaz-linux-mm master
git checkout 161b082aa6ac5047f1b0f243f0e834d2bfb39842
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=nds32
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the hnaz-linux-mm/master HEAD 12891f829e4851b3562ddcde27a4a9ade308ada3 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
In file included from ./arch/nds32/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from lib/strncpy_from_user.c:6:
include/linux/thread_info.h: In function 'check_copy_size':
>> include/linux/thread_info.h:215:27: error: 'INT_MAX' undeclared (first use in this function)
215 | if (WARN_ON_ONCE(bytes > INT_MAX))
| ^~~~~~~
include/asm-generic/bug.h:146:27: note: in definition of macro 'WARN_ON_ONCE'
146 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
In file included from lib/strncpy_from_user.c:6:
include/linux/thread_info.h:60:1: note: 'INT_MAX' is defined in header '<limits.h>'; did you forget to '#include <limits.h>'?
59 | #include <asm/thread_info.h>
+++ |+#include <limits.h>
60 |
In file included from ./arch/nds32/include/generated/asm/bug.h:1,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from lib/strncpy_from_user.c:6:
include/linux/thread_info.h:215:27: note: each undeclared identifier is reported only once for each function it appears in
215 | if (WARN_ON_ONCE(bytes > INT_MAX))
| ^~~~~~~
include/asm-generic/bug.h:146:27: note: in definition of macro 'WARN_ON_ONCE'
146 | int __ret_warn_once = !!(condition); \
| ^~~~~~~~~
vim +/INT_MAX +215 include/linux/thread_info.h
b0377fedb65280 Al Viro 2017-06-29 201
9dd819a15162f8 Kees Cook 2019-09-25 202 static __always_inline __must_check bool
b0377fedb65280 Al Viro 2017-06-29 203 check_copy_size(const void *addr, size_t bytes, bool is_source)
b0377fedb65280 Al Viro 2017-06-29 204 {
b0377fedb65280 Al Viro 2017-06-29 205 int sz = __compiletime_object_size(addr);
b0377fedb65280 Al Viro 2017-06-29 206 if (unlikely(sz >= 0 && sz < bytes)) {
b0377fedb65280 Al Viro 2017-06-29 207 if (!__builtin_constant_p(bytes))
b0377fedb65280 Al Viro 2017-06-29 208 copy_overflow(sz, bytes);
b0377fedb65280 Al Viro 2017-06-29 209 else if (is_source)
b0377fedb65280 Al Viro 2017-06-29 210 __bad_copy_from();
b0377fedb65280 Al Viro 2017-06-29 211 else
b0377fedb65280 Al Viro 2017-06-29 212 __bad_copy_to();
b0377fedb65280 Al Viro 2017-06-29 213 return false;
b0377fedb65280 Al Viro 2017-06-29 214 }
6d13de1489b6bf Kees Cook 2019-12-04 @215 if (WARN_ON_ONCE(bytes > INT_MAX))
6d13de1489b6bf Kees Cook 2019-12-04 216 return false;
b0377fedb65280 Al Viro 2017-06-29 217 check_object_size(addr, bytes, is_source);
b0377fedb65280 Al Viro 2017-06-29 218 return true;
b0377fedb65280 Al Viro 2017-06-29 219 }
b0377fedb65280 Al Viro 2017-06-29 220
:::::: The code at line 215 was first introduced by commit
:::::: 6d13de1489b6bf539695f96d945de3860e6d5e17 uaccess: disallow > INT_MAX copy sizes
:::::: TO: Kees Cook <keescook(a)chromium.org>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months