遇到一个问题,macro ”ioremap” requires 2 arguments, but only 1 given
http://stackoverflow.com/questions/518517/macro-max-requires-2-arguments-but-only-1-given 上面有解答
You're including a header file somewhere that #defines max as a macro. The best solution would be to figure out where it's being defined, and inhibit it from being defined if possible. Alternatively, you could just #undef it:
#include <evil_header_which_defines_max.h>
#undef max
最后发现是因为在ioremap的函数里,ioremap(INT_REG_START,0x1C)的逗号打成了全角符号。导致函数认为只有一个参数。
像这种情况,一般有两种可能:
- 字符编码错误,导致参数列表不符合函数定义
- 使用的函数被某个头文件宏定义过