错误 #1176
新国产平台,编译驱动出现错误。
0%
描述
单独编译ko文件时,出现错误信息如下:
/root/zyg/P13_Pre1/dev2/lib/ko/nr_pcie.c:256:4: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_from_user( (void )barinf, (void *)arg, sizeof(barinf));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/zyg/P13_Pre1/dev2/lib/ko/nr_pcie.c:276:6: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result [-Wunused-result]
copy_from_user( (void *)&barRegInfo, (void *)arg, count);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ././include/linux/compiler_types.h:68:0,
from <command-line>:0:
./arch/arm64/include/asm/jump_label.h: In function ‘arm64_kernel_unmapped_at_el0’:
./include/linux/compiler-gcc.h:120:38: warning: asm operand 0 probably doesn’t match constraints
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
^
./arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(
^~~~~~~~~~~~~~~
./include/linux/compiler-gcc.h:120:38: warning: asm operand 0 probably doesn’t match constraints
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
^
./arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(
^~~~~~~~~~~~~~~
./include/linux/compiler-gcc.h:120:38: error: impossible constraint in ‘asm’
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
^
./arch/arm64/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(
^~~~~~~~~~~~~~~
./include/linux/compiler-gcc.h:120:38: error: impossible constraint in ‘asm’
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
^
./arch/arm64/include/asm/jump_label.h:21:2: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(
^~~~~~~~~~~~~~~
make2: [scripts/Makefile.build:275:/root/zyg/P13_Pre1/dev2/lib/ko/nr_pcie.o] 错误 1
make1: [Makefile:1698:/root/zyg/P13_Pre1/dev2/lib/ko] 错误 2
make1: 离开目录“/usr/src/linux-headers-5.4.18-41kt01-generic”
make: ** [Makefile:17:all] 错误 2