From 547ee338cd3c131265fad49d8c88b4e14547d7af Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 28 Feb 2021 13:51:30 +0100 Subject: [PATCH] ANDROID: binder: fix up use of MAX_USER_RT_PRIO Commit e00eb41c0c7b ("ANDROID: binder: add support for RT prio inheritance.") added the use of MAX_USER_RT_PRIO to the binder.c code, but that commit was never sent upstream. In commit ae18ad281e82 ("sched: Remove MAX_USER_RT_PRIO"), that define was taken away, so to fix up the build breakage, move the binder code to use MAX_RT_PRIO instead of the now-removed MAX_USER_RT_PRIO define. Hopefully this is correct, who knows, it's binder RT code! :) Bug: 34461621 Bug: 37293077 Bug: 120446518 Fixes: e00eb41c0c7b ("ANDROID: binder: add support for RT prio inheritance.") Fixes: ae18ad281e82 ("sched: Remove MAX_USER_RT_PRIO") Cc: Martijn Coenen Cc: Amit Pundir Cc: Alistair Strachan Cc: Todd Kjos Signed-off-by: Greg Kroah-Hartman Change-Id: I66b85e99697fdde462ec2d2ade5c92d5917896a3 --- drivers/android/binder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index b8a8b1fa204b..eb080e3b09c0 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -637,7 +637,7 @@ static int to_userspace_prio(int policy, int kernel_priority) if (is_fair_policy(policy)) return PRIO_TO_NICE(kernel_priority); else - return MAX_USER_RT_PRIO - 1 - kernel_priority; + return MAX_RT_PRIO - 1 - kernel_priority; } static int to_kernel_prio(int policy, int user_priority) @@ -645,7 +645,7 @@ static int to_kernel_prio(int policy, int user_priority) if (is_fair_policy(policy)) return NICE_TO_PRIO(user_priority); else - return MAX_USER_RT_PRIO - 1 - user_priority; + return MAX_RT_PRIO - 1 - user_priority; } static void binder_do_set_priority(struct task_struct *task,