Skip to content

Commit c745a62

Browse files
Valentin SchneiderIngo Molnar
authored andcommitted
sched/debug: Remove redundant macro define
Most printing macros for procfs are defined globally in debug.c, and they are re-defined (to the exact same thing) within proc_sched_show_task(). Get rid of the duplicate defines. Reviewed-by: Qais Yousef <[email protected]> Signed-off-by: Valentin Schneider <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 275b2f6 commit c745a62

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

kernel/sched/debug.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -868,16 +868,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
868868
SEQ_printf(m,
869869
"---------------------------------------------------------"
870870
"----------\n");
871-
#define __P(F) \
872-
SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)F)
873-
#define P(F) \
874-
SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)p->F)
875871
#define P_SCHEDSTAT(F) \
876872
SEQ_printf(m, "%-45s:%21Ld\n", #F, (long long)schedstat_val(p->F))
877-
#define __PN(F) \
878-
SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)F))
879-
#define PN(F) \
880-
SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)p->F))
881873
#define PN_SCHEDSTAT(F) \
882874
SEQ_printf(m, "%-45s:%14Ld.%06ld\n", #F, SPLIT_NS((long long)schedstat_val(p->F)))
883875

@@ -963,11 +955,7 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,
963955
P(dl.deadline);
964956
}
965957
#undef PN_SCHEDSTAT
966-
#undef PN
967-
#undef __PN
968958
#undef P_SCHEDSTAT
969-
#undef P
970-
#undef __P
971959

972960
{
973961
unsigned int this_cpu = raw_smp_processor_id();

0 commit comments

Comments
 (0)