[csky-linux:riscv_compat_v6_svpbmt-v6 35/35] arch/riscv/include/asm/pgtable-64.h:105:2: error: expected assembly-time absolute expression
by kernel test robot
tree: https://github.com/c-sky/csky-linux riscv_compat_v6_svpbmt-v6
head: 54acb36c958fc990cc59889f79c8ddca7386c295
commit: 54acb36c958fc990cc59889f79c8ddca7386c295 [35/35] riscv: xtpbmt: Fixup T-HEAD CPU _PAGE_KERNEL quirks
config: riscv-randconfig-c006-20220209 (https://download.01.org/0day-ci/archive/20220211/202202110254.CrnRD2CM-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project aa845d7a245d85c441d0bd44fc7b6c3be8f3de8d)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/c-sky/csky-linux/commit/54acb36c958fc990cc59889f79c8dd...
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux riscv_compat_v6_svpbmt-v6
git checkout 54acb36c958fc990cc59889f79c8ddca7386c295
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/kernel/setup.c:21:
In file included from include/linux/efi.h:20:
In file included from include/linux/rtc.h:17:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from arch/riscv/kernel/setup.c:21:
In file included from include/linux/efi.h:20:
In file included from include/linux/rtc.h:17:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from arch/riscv/kernel/setup.c:21:
In file included from include/linux/efi.h:20:
In file included from include/linux/rtc.h:17:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
In file included from arch/riscv/kernel/setup.c:12:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
In file included from arch/riscv/include/asm/pgtable.h:111:
>> arch/riscv/include/asm/pgtable-64.h:105:2: error: expected assembly-time absolute expression
ALT_SVPBMT(val, _PAGE_NOCACHE);
^
arch/riscv/include/asm/errata_list.h:52:5: note: expanded from macro 'ALT_SVPBMT'
asm(ALTERNATIVE_2("li %0, 0\t\nnop", \
^
arch/riscv/include/asm/alternative-macros.h:147:2: note: expanded from macro 'ALTERNATIVE_2'
_ALTERNATIVE_CFG_2(old_content, new_content_1, vendor_id_1, errata_id_1, CONFIG_k_1, \
^
arch/riscv/include/asm/alternative-macros.h:117:2: note: expanded from macro '_ALTERNATIVE_CFG_2'
__ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, IS_ENABLED(CONFIG_k_1), \
^
arch/riscv/include/asm/alternative-macros.h:112:2: note: expanded from macro '__ALTERNATIVE_CFG_2'
ALT_NEW_CONTENT(vendor_id_1, errata_id_1, enable_1, new_c_1) \
^
arch/riscv/include/asm/alternative-macros.h:88:3: note: expanded from macro 'ALT_NEW_CONTENT'
".org . - (887b - 886b) + (889b - 888b)\n" \
^
<inline asm>:25:6: note: instantiated into assembly here
.org . - (887b - 886b) + (889b - 888b)
^
In file included from arch/riscv/kernel/setup.c:12:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
In file included from arch/riscv/include/asm/pgtable.h:111:
>> arch/riscv/include/asm/pgtable-64.h:105:2: error: expected assembly-time absolute expression
ALT_SVPBMT(val, _PAGE_NOCACHE);
^
arch/riscv/include/asm/errata_list.h:52:5: note: expanded from macro 'ALT_SVPBMT'
asm(ALTERNATIVE_2("li %0, 0\t\nnop", \
^
arch/riscv/include/asm/alternative-macros.h:147:2: note: expanded from macro 'ALTERNATIVE_2'
_ALTERNATIVE_CFG_2(old_content, new_content_1, vendor_id_1, errata_id_1, CONFIG_k_1, \
^
arch/riscv/include/asm/alternative-macros.h:117:2: note: expanded from macro '_ALTERNATIVE_CFG_2'
__ALTERNATIVE_CFG_2(old_c, new_c_1, vendor_id_1, errata_id_1, IS_ENABLED(CONFIG_k_1), \
^
arch/riscv/include/asm/alternative-macros.h:112:2: note: expanded from macro '__ALTERNATIVE_CFG_2'
ALT_NEW_CONTENT(vendor_id_1, errata_id_1, enable_1, new_c_1) \
^
arch/riscv/include/asm/alternative-macros.h:89:3: note: expanded from macro 'ALT_NEW_CONTENT'
".org . - (889b - 888b) + (887b - 886b)\n" \
^
<inline asm>:26:6: note: instantiated into assembly here
.org . - (889b - 888b) + (887b - 886b)
^
7 warnings and 2 errors generated.
vim +105 arch/riscv/include/asm/pgtable-64.h
54acb36c958fc9 Guo Ren 2022-02-10 100
bac41a3372f958 Wei Fu 2021-11-29 101 static inline u64 riscv_page_nocache(void)
bac41a3372f958 Wei Fu 2021-11-29 102 {
bac41a3372f958 Wei Fu 2021-11-29 103 u64 val;
bac41a3372f958 Wei Fu 2021-11-29 104
bac41a3372f958 Wei Fu 2021-11-29 @105 ALT_SVPBMT(val, _PAGE_NOCACHE);
bac41a3372f958 Wei Fu 2021-11-29 106 return val;
bac41a3372f958 Wei Fu 2021-11-29 107 }
bac41a3372f958 Wei Fu 2021-11-29 108
:::::: The code at line 105 was first introduced by commit
:::::: bac41a3372f9586652716665df9da6c4059b9309 riscv: add RISC-V Svpbmt extension support
:::::: TO: Wei Fu <wefu(a)redhat.com>
:::::: CC: Guo Ren <guoren(a)linux.alibaba.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[csky-linux:riscv_compat_v6_svpbmt-v6 35/35] arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared
by kernel test robot
tree: https://github.com/c-sky/csky-linux riscv_compat_v6_svpbmt-v6
head: 54acb36c958fc990cc59889f79c8ddca7386c295
commit: 54acb36c958fc990cc59889f79c8ddca7386c295 [35/35] riscv: xtpbmt: Fixup T-HEAD CPU _PAGE_KERNEL quirks
config: riscv-randconfig-r026-20220209 (https://download.01.org/0day-ci/archive/20220211/202202110244.QjvpBb6X-lk...)
compiler: riscv32-linux-gcc (GCC) 11.2.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/c-sky/csky-linux/commit/54acb36c958fc990cc59889f79c8dd...
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux riscv_compat_v6_svpbmt-v6
git checkout 54acb36c958fc990cc59889f79c8ddca7386c295
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/pgtable.h:6,
from arch/riscv/include/asm/io.h:15,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:17,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:11,
from include/linux/interrupt.h:11,
from arch/riscv/kernel/irq.c:8:
include/asm-generic/io.h: In function 'ioremap':
>> arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared (first use in this function)
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:167:35: note: each undeclared identifier is reported only once for each function it appears in
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
--
In file included from include/linux/pgtable.h:6,
from include/linux/mm.h:33,
from arch/riscv/kernel/setup.c:12:
include/asm-generic/io.h: In function 'ioremap':
>> arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared (first use in this function)
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:167:35: note: each undeclared identifier is reported only once for each function it appears in
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
In file included from arch/riscv/include/asm/thread_info.h:11,
from include/linux/thread_info.h:60,
from include/asm-generic/preempt.h:5,
from ./arch/riscv/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:55,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/mm.h:10,
from arch/riscv/kernel/setup.c:12:
arch/riscv/kernel/setup.c: In function 'setup_arch':
>> arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared (first use in this function)
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/page.h:80:27: note: in definition of macro 'pgprot_val'
80 | #define pgprot_val(x) ((x).pgprot)
| ^
arch/riscv/include/asm/pgtable.h:170:33: note: in expansion of macro '__pgprot'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~
arch/riscv/include/asm/pgtable.h:170:42: note: in expansion of macro '_PAGE_KERNEL'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~~~~~
include/linux/printk.h:418:33: note: in expansion of macro 'PAGE_KERNEL'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:446:26: note: in expansion of macro 'printk_index_wrap'
446 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~
arch/riscv/kernel/setup.c:270:1: note: in expansion of macro 'printk'
270 | printk("%s: _PAGE_KERNEL: 0x%lx\n", __func__, pgprot_val(PAGE_KERNEL));
| ^~~~~~
In file included from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from arch/riscv/kernel/setup.c:12:
>> arch/riscv/kernel/setup.c:271:8: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'int' [-Wformat=]
271 | printk("%s: _PAGE_IO: 0x%llx\n", __func__, _PAGE_IO);
| ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
arch/riscv/kernel/setup.c:271:1: note: in expansion of macro 'printk'
271 | printk("%s: _PAGE_IO: 0x%llx\n", __func__, _PAGE_IO);
| ^~~~~~
arch/riscv/kernel/setup.c:271:28: note: format string is defined here
271 | printk("%s: _PAGE_IO: 0x%llx\n", __func__, _PAGE_IO);
| ~~~^
| |
| long long unsigned int
| %x
In file included from include/asm-generic/bug.h:22,
from arch/riscv/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/mm.h:9,
from arch/riscv/kernel/setup.c:12:
arch/riscv/kernel/setup.c:272:8: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'int' [-Wformat=]
272 | printk("%s: _PAGE_NOCACHE: 0x%llx\n", __func__, _PAGE_NOCACHE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:418:25: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~
arch/riscv/kernel/setup.c:272:1: note: in expansion of macro 'printk'
272 | printk("%s: _PAGE_NOCACHE: 0x%llx\n", __func__, _PAGE_NOCACHE);
| ^~~~~~
arch/riscv/kernel/setup.c:272:33: note: format string is defined here
272 | printk("%s: _PAGE_NOCACHE: 0x%llx\n", __func__, _PAGE_NOCACHE);
| ~~~^
| |
| long long unsigned int
| %x
--
In file included from arch/riscv/include/asm/uaccess.h:12,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/compat.h:17,
from arch/riscv/kernel/signal.c:9:
include/asm-generic/io.h: In function 'ioremap':
>> arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared (first use in this function)
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:167:35: note: each undeclared identifier is reported only once for each function it appears in
167 | | _PAGE_PMA \
| ^~~~~~~~~
arch/riscv/include/asm/pgtable.h:178:27: note: in expansion of macro '_PAGE_KERNEL'
178 | #define _PAGE_IOREMAP ((_PAGE_KERNEL & ~_PAGE_MTMASK) | _PAGE_IO)
| ^~~~~~~~~~~~
include/asm-generic/io.h:973:41: note: in expansion of macro '_PAGE_IOREMAP'
973 | return ioremap_prot(addr, size, _PAGE_IOREMAP);
| ^~~~~~~~~~~~~
arch/riscv/kernel/signal.c: At top level:
arch/riscv/kernel/signal.c:320:27: warning: no previous prototype for 'do_notify_resume' [-Wmissing-prototypes]
320 | asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~
--
In file included from arch/riscv/include/asm/fixmap.h:55,
from arch/riscv/kernel/patch.c:13:
arch/riscv/kernel/patch.c: In function 'patch_map':
>> arch/riscv/include/asm/pgtable.h:167:35: error: '_PAGE_PMA' undeclared (first use in this function)
167 | | _PAGE_PMA \
| ^~~~~~~~~
include/asm-generic/fixmap.h:77:33: note: in definition of macro '__set_fixmap_offset'
77 | __set_fixmap(idx, phys, flags); \
| ^~~~~
arch/riscv/include/asm/pgtable.h:170:33: note: in expansion of macro '__pgprot'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~
arch/riscv/include/asm/pgtable.h:170:42: note: in expansion of macro '_PAGE_KERNEL'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~~~~~
include/asm-generic/fixmap.h:48:28: note: in expansion of macro 'PAGE_KERNEL'
48 | #define FIXMAP_PAGE_NORMAL PAGE_KERNEL
| ^~~~~~~~~~~
include/asm-generic/fixmap.h:83:40: note: in expansion of macro 'FIXMAP_PAGE_NORMAL'
83 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL)
| ^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/patch.c:42:24: note: in expansion of macro 'set_fixmap_offset'
42 | return (void *)set_fixmap_offset(fixmap, page_to_phys(page) +
| ^~~~~~~~~~~~~~~~~
arch/riscv/include/asm/pgtable.h:167:35: note: each undeclared identifier is reported only once for each function it appears in
167 | | _PAGE_PMA \
| ^~~~~~~~~
include/asm-generic/fixmap.h:77:33: note: in definition of macro '__set_fixmap_offset'
77 | __set_fixmap(idx, phys, flags); \
| ^~~~~
arch/riscv/include/asm/pgtable.h:170:33: note: in expansion of macro '__pgprot'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~
arch/riscv/include/asm/pgtable.h:170:42: note: in expansion of macro '_PAGE_KERNEL'
170 | #define PAGE_KERNEL __pgprot(_PAGE_KERNEL)
| ^~~~~~~~~~~~
include/asm-generic/fixmap.h:48:28: note: in expansion of macro 'PAGE_KERNEL'
48 | #define FIXMAP_PAGE_NORMAL PAGE_KERNEL
| ^~~~~~~~~~~
include/asm-generic/fixmap.h:83:40: note: in expansion of macro 'FIXMAP_PAGE_NORMAL'
83 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL)
| ^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/patch.c:42:24: note: in expansion of macro 'set_fixmap_offset'
42 | return (void *)set_fixmap_offset(fixmap, page_to_phys(page) +
| ^~~~~~~~~~~~~~~~~
vim +/_PAGE_PMA +167 arch/riscv/include/asm/pgtable.h
161
162 #define _PAGE_KERNEL (_PAGE_READ \
163 | _PAGE_WRITE \
164 | _PAGE_PRESENT \
165 | _PAGE_ACCESSED \
166 | _PAGE_DIRTY \
> 167 | _PAGE_PMA \
168 | _PAGE_GLOBAL)
169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[PATCH] remoteproc: fix minmax.cocci warnings
by Julia Lawall
From: kernel test robot <lkp(a)intel.com>
The code seems more readable with min.
Generated by: scripts/coccinelle/misc/minmax.cocci
Fixes: 2b9408d09dc6 ("remoteproc: Add support for peek from remote and acking kick from remote")
CC: Wendy Liang <wendy.liang(a)xilinx.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: Julia Lawall <julia.lawall(a)inria.fr>
---
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: 2b9408d09dc6367fd2f0820f0c7beab69e9aed56 [550/872] remoteproc: Add support for peek from remote and acking kick from remote
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
remoteproc_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/remoteproc/remoteproc_sysfs.c
+++ b/drivers/remoteproc/remoteproc_sysfs.c
@@ -241,7 +241,7 @@ static ssize_t kick_store(struct device
size_t cpy_len;
(void)attr;
- cpy_len = count <= sizeof(id) ? count : sizeof(id);
+ cpy_len = min(count, sizeof(id));
memcpy((char *)(&id), buf, cpy_len);
if (rproc->ops->kick)
7 months, 1 week
[intel-lts:5.10/yocto 10648/20393] drivers/media/i2c/ti960-des.c:129:5: warning: no previous prototype for 'bus_switch'
by kernel test robot
Hi Ng,
FYI, the error/warning still remains.
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 2dafc777a64181d42982628c7f5907a03da5f070
commit: bd8c7120c481ebe8e2e40e6b9308d689f8adfff7 [10648/20393] media: ti960: remove crlmodule dependency
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220211/202202110149.oMw9L4SG-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/intel/linux-intel-lts/commit/bd8c7120c481ebe8e2e40e6b9...
git remote add intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-lts 5.10/yocto
git checkout bd8c7120c481ebe8e2e40e6b9308d689f8adfff7
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/crypto/ drivers/gpio/ drivers/gpu/drm/i915/ drivers/media/i2c/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/i2c/ti960-des.c:129:5: warning: no previous prototype for 'bus_switch' [-Wmissing-prototypes]
129 | int bus_switch(struct ti960 *va)
| ^~~~~~~~~~
drivers/media/i2c/ti960-des.c: In function 'ti960_init':
drivers/media/i2c/ti960-des.c:1240:15: warning: unused variable 'reset_gpio' [-Wunused-variable]
1240 | unsigned int reset_gpio = va->pdata->reset_gpio;
| ^~~~~~~~~~
In file included from drivers/media/i2c/ti960-des.c:20:
At top level:
drivers/media/i2c/ti953.h:101:42: warning: 'ti953_FPD3_RX_ID' defined but not used [-Wunused-const-variable=]
101 | static const struct ti953_register_devid ti953_FPD3_RX_ID[] = {
| ^~~~~~~~~~~~~~~~
drivers/media/i2c/ti953.h:96:42: warning: 'ti953_init_settings_clk' defined but not used [-Wunused-const-variable=]
96 | static const struct ti953_register_write ti953_init_settings_clk[] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ti953.h:29:42: warning: 'ti953_init_settings' defined but not used [-Wunused-const-variable=]
29 | static const struct ti953_register_write ti953_init_settings[] = {
| ^~~~~~~~~~~~~~~~~~~
vim +/bus_switch +129 drivers/media/i2c/ti960-des.c
1aafb1e0df5527 Ng Khai Wen 2021-07-01 128
d2753af810c799 Ng Khai Wen 2021-07-01 @129 int bus_switch(struct ti960 *va)
d2753af810c799 Ng Khai Wen 2021-07-01 130 {
d2753af810c799 Ng Khai Wen 2021-07-01 131 int ret;
d2753af810c799 Ng Khai Wen 2021-07-01 132 int retry, timeout = 10;
d2753af810c799 Ng Khai Wen 2021-07-01 133 struct i2c_client *client = v4l2_get_subdevdata(&va->sd);
d2753af810c799 Ng Khai Wen 2021-07-01 134
d2753af810c799 Ng Khai Wen 2021-07-01 135 dev_dbg(&client->dev, "bus switch");
d2753af810c799 Ng Khai Wen 2021-07-01 136 client->addr = 0x70;
d2753af810c799 Ng Khai Wen 2021-07-01 137 for (retry = 0; retry < timeout; retry++) {
d2753af810c799 Ng Khai Wen 2021-07-01 138 ret = i2c_smbus_write_byte(client, 0x01);
d2753af810c799 Ng Khai Wen 2021-07-01 139 if (ret < 0)
d2753af810c799 Ng Khai Wen 2021-07-01 140 usleep_range(5000, 6000);
d2753af810c799 Ng Khai Wen 2021-07-01 141 else
d2753af810c799 Ng Khai Wen 2021-07-01 142 break;
d2753af810c799 Ng Khai Wen 2021-07-01 143 }
d2753af810c799 Ng Khai Wen 2021-07-01 144
d2753af810c799 Ng Khai Wen 2021-07-01 145 client->addr = TI960_I2C_ADDRESS;
d2753af810c799 Ng Khai Wen 2021-07-01 146 if (retry >= timeout) {
d2753af810c799 Ng Khai Wen 2021-07-01 147 dev_err(&client->dev, "bus switch failed");
d2753af810c799 Ng Khai Wen 2021-07-01 148 return -EREMOTEIO;
d2753af810c799 Ng Khai Wen 2021-07-01 149 }
d2753af810c799 Ng Khai Wen 2021-07-01 150
d2753af810c799 Ng Khai Wen 2021-07-01 151 return 0;
d2753af810c799 Ng Khai Wen 2021-07-01 152 }
d2753af810c799 Ng Khai Wen 2021-07-01 153
:::::: The code at line 129 was first introduced by commit
:::::: d2753af810c79927ae6a70fd532a0b19d9816dc5 media: intel-ipu6: add ti960 driver
:::::: TO: Ng Khai Wen <khai.wen.ng(a)intel.com>
:::::: CC: Pan, Kris <kris.pan(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week