invalid storage class for function '__inittest' '__exittest'

本文探讨了touchscreen代码中遇到的错误,包括`__inittest`、`__exittest`函数的存储类问题,并最终定位到代码中的`{}
drivers/input/touchscreen/ssl/msg2033/msg2033.c:815: error: invalid storage class for function '__inittest'

drivers/input/touchscreen/ssl/msg2033/msg2033.c:816: error: invalid storage class for function '__exittest'

drivers/input/touchscreen/ssl/msg2033/msg2033.c:820: error: expected declaration or statement at end of input


最后证明,是{}不匹配。少个}

/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c: In function 'param_set_ulong_safe': ./include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 2 has type 'int' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ ./include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^~~~~~~~ ./include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR' printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~ /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:29:9: note: in expansion of macro 'pr_err' pr_err("Buffer size too large, max is %lu\n", MAX_BUFFER_SIZE); ^~~~~~ /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:29:49: note: format string is defined here pr_err("Buffer size too large, max is %lu\n", MAX_BUFFER_SIZE); ~~^ %u /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c: At top level: /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:44:1: error: macro "param_check_ulong_safe" passed 2 arguments, but takes just 1 module_param(buffer_size, ulong_safe, 0644); ^~~~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/module.h:21:0, from /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:1: ./include/linux/moduleparam.h:150:2: warning: data definition has no type or storage class param_check_##type(name, &(value)); \ ^ ./include/linux/moduleparam.h:127:2: note: in expansion of macro 'module_param_named' module_param_named(name, name, type, perm) ^~~~~~~~~~~~~~~~~~ /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:44:1: note: in expansion of macro 'module_param' module_param(buffer_size, ulong_safe, 0644); ^~~~~~~~~~~~ ./include/linux/moduleparam.h:150:2: error: type defaults to 'int' in declaration of 'param_check_ulong_safe' [-Werror=implicit-int] param_check_##type(name, &(value)); \ ^ ./include/linux/moduleparam.h:127:2: note: in expansion of macro 'module_param_named' module_param_named(name, name, type, perm) ^~~~~~~~~~~~~~~~~~ /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:44:1: note: in expansion of macro 'module_param' module_param(buffer_size, ulong_safe, 0644); ^~~~~~~~~~~~ In file included from ./include/linux/kernel.h:17:0, from ./include/linux/list.h:9, from ./include/linux/module.h:12, from /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:1: /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c: In function 'console_hook_init': /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:173:58: error: implicit declaration of function 'utsname'; did you mean 'putname'? [-Werror=implicit-function-declaration] pr_info("Console hook module loaded on kernel %s\n", utsname()->release); ^ ./include/linux/printk.h:373:34: note: in definition of macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ /home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.c:173:67: error: invalid type argument of '->' (have 'int') pr_info("Console hook module loaded on kernel %s\n", utsname()->release); ^ ./include/linux/printk.h:373:34: note: in definition of macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~ cc1: some warnings being treated as errors scripts/Makefile.build:286: recipe for target '/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.o' failed make[2]: *** [/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver/log_to_file.o] Error 1 Makefile:1845: recipe for target '/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver' failed make[1]: *** [/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/driver] Error 2 make[1]: Leaving directory '/home/332641/IMOU/SmartLock/Kernel/Linux5.10AD100/src' Makefile:7: recipe for target 'all' failed make: *** [all] Error 2
07-20
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值