Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sched,arch: Remove unused TASK_STATE offsets

All 6 architectures define TASK_STATE in asm-offsets, but then never
actually use it. Remove the definitions to make sure they never will.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210611082838.472811363@infradead.org

-6
-1
arch/csky/kernel/asm-offsets.c
··· 9 9 int main(void) 10 10 { 11 11 /* offsets into the task struct */ 12 - DEFINE(TASK_STATE, offsetof(struct task_struct, state)); 13 12 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); 14 13 DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); 15 14 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
-1
arch/h8300/kernel/asm-offsets.c
··· 21 21 int main(void) 22 22 { 23 23 /* offsets into the task struct */ 24 - OFFSET(TASK_STATE, task_struct, state); 25 24 OFFSET(TASK_FLAGS, task_struct, flags); 26 25 OFFSET(TASK_PTRACE, task_struct, ptrace); 27 26 OFFSET(TASK_BLOCKED, task_struct, blocked);
-1
arch/microblaze/kernel/asm-offsets.c
··· 70 70 71 71 /* struct task_struct */ 72 72 DEFINE(TS_THREAD_INFO, offsetof(struct task_struct, stack)); 73 - DEFINE(TASK_STATE, offsetof(struct task_struct, state)); 74 73 DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); 75 74 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); 76 75 DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
-1
arch/mips/kernel/asm-offsets.c
··· 78 78 void output_task_defines(void) 79 79 { 80 80 COMMENT("MIPS task_struct offsets."); 81 - OFFSET(TASK_STATE, task_struct, state); 82 81 OFFSET(TASK_THREAD_INFO, task_struct, stack); 83 82 OFFSET(TASK_FLAGS, task_struct, flags); 84 83 OFFSET(TASK_MM, task_struct, mm);
-1
arch/openrisc/kernel/asm-offsets.c
··· 37 37 int main(void) 38 38 { 39 39 /* offsets into the task_struct */ 40 - DEFINE(TASK_STATE, offsetof(struct task_struct, state)); 41 40 DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); 42 41 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); 43 42 DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
-1
arch/parisc/kernel/asm-offsets.c
··· 42 42 int main(void) 43 43 { 44 44 DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack)); 45 - DEFINE(TASK_STATE, offsetof(struct task_struct, state)); 46 45 DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); 47 46 DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending)); 48 47 DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));