sched: Make const-safe
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 12 Dec 2022 14:49:46 +0000 (14:49 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 27 Dec 2022 11:52:16 +0000 (12:52 +0100)
commit904cbab71dda1689d41a240541179f21ff433c40
treedfa06645baa7b63f99c6727d49827b42399a2525
parentb344b8f2d88dbf095caf97ac57fd3645843fa70f
sched: Make const-safe

With a modified container_of() that preserves constness, the compiler
finds some pointers which should have been marked as const.  task_of()
also needs to become const-preserving for the !FAIR_GROUP_SCHED case so
that cfs_rq_of() can take a const argument.  No change to generated code.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221212144946.2657785-1-willy@infradead.org
kernel/sched/core.c
kernel/sched/fair.c
kernel/sched/sched.h