mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
sched: Make sched_param argument static in sched_setscheduler() callers
Andrew Morton pointed out almost all sched_setscheduler() callers are using fixed parameters and can be converted to static. It reduces runtime memory use a little. Signed-off-by: KOSAKI Motohiro <[email protected]> Reported-by: Andrew Morton <[email protected]> Acked-by: James Morris <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Steven Rostedt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
d4429f608a
commit
fe7de49f9d
7 changed files with 15 additions and 10 deletions
|
|
@ -4701,7 +4701,7 @@ static bool check_same_owner(struct task_struct *p)
|
|||
}
|
||||
|
||||
static int __sched_setscheduler(struct task_struct *p, int policy,
|
||||
struct sched_param *param, bool user)
|
||||
const struct sched_param *param, bool user)
|
||||
{
|
||||
int retval, oldprio, oldpolicy = -1, on_rq, running;
|
||||
unsigned long flags;
|
||||
|
|
@ -4856,7 +4856,7 @@ recheck:
|
|||
* NOTE that the task may be already dead.
|
||||
*/
|
||||
int sched_setscheduler(struct task_struct *p, int policy,
|
||||
struct sched_param *param)
|
||||
const struct sched_param *param)
|
||||
{
|
||||
return __sched_setscheduler(p, policy, param, true);
|
||||
}
|
||||
|
|
@ -4874,7 +4874,7 @@ EXPORT_SYMBOL_GPL(sched_setscheduler);
|
|||
* but our caller might not have that capability.
|
||||
*/
|
||||
int sched_setscheduler_nocheck(struct task_struct *p, int policy,
|
||||
struct sched_param *param)
|
||||
const struct sched_param *param)
|
||||
{
|
||||
return __sched_setscheduler(p, policy, param, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue