[PATCH RT 2/4] rtmutex: Fix rt_mutex_timed_fastlock() slowfn type mismatch up to 3.10

From: Ben Hutchings
Date: Mon Oct 05 2015 - 22:55:53 EST


The type of the slowfn parameter is declared incorrectly in some of
the backports, resulting in:

kernel/rtmutex.c: In function 'rt_mutex_timed_futex_lock':
kernel/rtmutex.c:1730:12: warning: passing argument 5 of 'rt_mutex_timed_fastlock' from incompatible pointer type [enabled by default]
kernel/rtmutex.c:1655:1: note: expected 'int (*)(struct rt_mutex *, int, struct hrtimer_sleeper *, int)' but argument is of type 'int (*)(struct rt_mutex *, int, struct hrtimer_sleeper *, enum rtmutex_chainwalk)'
kernel/rtmutex.c: In function 'rt_mutex_timed_lock':
kernel/rtmutex.c:1770:12: warning: passing argument 5 of 'rt_mutex_timed_fastlock' from incompatible pointer type [enabled by default]
kernel/rtmutex.c:1655:1: note: expected 'int (*)(struct rt_mutex *, int, struct hrtimer_sleeper *, int)' but argument is of type 'int (*)(struct rt_mutex *, int, struct hrtimer_sleeper *, enum rtmutex_chainwalk)'

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Cc: <stable-rt@xxxxxxxxxxxxxxx> # 3.2 3.4 3.10
---
kernel/rtmutex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 52cab27..26550b6 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -1657,7 +1657,7 @@ rt_mutex_timed_fastlock(struct rt_mutex *lock, int state,
enum rtmutex_chainwalk chwalk,
int (*slowfn)(struct rt_mutex *lock, int state,
struct hrtimer_sleeper *timeout,
- int detect_deadlock))
+ enum rtmutex_chainwalk chwalk))
{
if (chwalk == RT_MUTEX_MIN_CHAINWALK &&
likely(rt_mutex_cmpxchg(lock, NULL, current))) {

--
Ben Hutchings
All the simple programs have been written, and all the good names taken.

Attachment: signature.asc
Description: This is a digitally signed message part