Skip to content

Commit

Permalink
sched,arch: Remove unused TASK_STATE offsets
Browse files Browse the repository at this point in the history
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) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Peter Zijlstra committed Jun 18, 2021
1 parent 600642a commit 7c3edd6
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion arch/csky/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
int main(void)
{
/* offsets into the task struct */
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
Expand Down
1 change: 0 additions & 1 deletion arch/h8300/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
int main(void)
{
/* offsets into the task struct */
OFFSET(TASK_STATE, task_struct, state);
OFFSET(TASK_FLAGS, task_struct, flags);
OFFSET(TASK_PTRACE, task_struct, ptrace);
OFFSET(TASK_BLOCKED, task_struct, blocked);
Expand Down
1 change: 0 additions & 1 deletion arch/microblaze/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ int main(int argc, char *argv[])

/* struct task_struct */
DEFINE(TS_THREAD_INFO, offsetof(struct task_struct, stack));
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked));
Expand Down
1 change: 0 additions & 1 deletion arch/mips/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ void output_ptreg_defines(void)
void output_task_defines(void)
{
COMMENT("MIPS task_struct offsets.");
OFFSET(TASK_STATE, task_struct, state);
OFFSET(TASK_THREAD_INFO, task_struct, stack);
OFFSET(TASK_FLAGS, task_struct, flags);
OFFSET(TASK_MM, task_struct, mm);
Expand Down
1 change: 0 additions & 1 deletion arch/openrisc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
int main(void)
{
/* offsets into the task_struct */
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
int main(void)
{
DEFINE(TASK_THREAD_INFO, offsetof(struct task_struct, stack));
DEFINE(TASK_STATE, offsetof(struct task_struct, state));
DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags));
DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, pending));
DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace));
Expand Down

0 comments on commit 7c3edd6

Please sign in to comment.