Android内核错误:'struct kernel_stat'没有名为'cpustat'的成员且错误:'struct request'没有名为'elevator_private'的成员

时间:2014-12-27 16:16:24

标签: android c++ c struct linux-kernel

我正在为S5 mini LTE编译内核,我收到了这些错误:

1

drivers/cpufreq/cpufreq_pegasusq.c: In function 'get_cpu_idle_time_jiffy':
drivers/cpufreq/cpufreq_pegasusq.c:420: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:420: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:423: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:424: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:425: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:426: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c: In function 'store_ignore_nice_load':
drivers/cpufreq/cpufreq_pegasusq.c:661: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c: In function 'dbs_check_cpu':
drivers/cpufreq/cpufreq_pegasusq.c:1125: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c:1134: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusq.c: In function 'cpufreq_governor_dbs':
drivers/cpufreq/cpufreq_pegasusq.c:1380: error: 'struct kernel_stat' has no member named 'cpustat'
make[2]: *** [drivers/cpufreq/cpufreq_pegasusq.o] Błąd 1
make[2]: *** Oczekiwanie na niezakończone zadania....
CC kernel/audit_watch.o
drivers/cpufreq/cpufreq_pegasusqplus.c: In function 'get_cpu_idle_time_jiffy':
drivers/cpufreq/cpufreq_pegasusqplus.c:484: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:484: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:487: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:488: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:489: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:490: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c: In function 'store_ignore_nice_load':
drivers/cpufreq/cpufreq_pegasusqplus.c:720: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c: In function 'dbs_check_cpu':
drivers/cpufreq/cpufreq_pegasusqplus.c:1465: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c:1474: error: 'struct kernel_stat' has no member named 'cpustat'
drivers/cpufreq/cpufreq_pegasusqplus.c: In function 'cpufreq_governor_dbs':
drivers/cpufreq/cpufreq_pegasusqplus.c:1934: error: 'struct kernel_stat' has no member named 'cpustat'
make[2]: *** [drivers/cpufreq/cpufreq_pegasusqplus.o] Błąd 1
make[1]: *** [drivers/cpufreq] Błąd 2
make: *** [drivers] Błąd 2

2

block/row-iosched.c: In function 'row_add_request':
block/row-iosched.c:278: error: 'struct request' has no member named 'elevator_private'
block/row-iosched.c: In function 'row_reinsert_req':
block/row-iosched.c:325: error: 'struct request' has no member named 'elevator_private'
block/row-iosched.c: In function 'row_remove_request':
block/row-iosched.c:377: error: 'struct request' has no member named 'elevator_private'
block/row-iosched.c: In function 'row_merged_requests':
block/row-iosched.c:605: error: 'struct request' has no member named 'elevator_private'
block/row-iosched.c: In function 'row_set_request':
block/row-iosched.c:650: error: 'struct request' has no member named 'elevator_private'
make[1]: *** [block/row-iosched.o] Błąd 1
make: *** [block] Błąd 2
make: *** Oczekiwanie na niezakończone zadania....

我试图解决第二个错误而且收到了这个:

block/elevator.c: In function 'elv_set_request':
block/elevator.c:702: error: 'struct request' has no member named 'elevator_private'
make[1]: *** [block/elevator.o] Błąd 1
make: *** [block] Błąd 2
make: *** Oczekiwanie na niezakończone zadania....

来自this repo

我是个菜鸟。我正在开始内核开发的冒险。谢谢你的帮助。

P.S。我通过添加

修复了第二个错误
rq->elevator_private[0] = NULL;

int elv_set_request(struct request_queue *q, struct request *rq, gfp_t gfp_mask)
块/ elevator.c中的

0 个答案:

没有答案