Skip to contentSkip to conversation

rtmutex: fixup semi incomplete backport causing new warning spew

PATCH New Paul Gortmaker 1 participant 1 message Jun 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtmutex: fixup semi incomplete backport causing new warning spew

We have a backport of commit 8930ed80f970a90a795239e7415c9b0e6f964649 ("rtmutex: Cleanup deadlock detector debug logic") which is commit 8a3af0727b43a6e51e3699f62bd15f9bb60e0692 here on the v3.10-rt branch, added in the creation v3.10.70-rt75. However it missed one of the conversions from the old int to the new enum, leading to this spew:

CC kernel/rtmutex.o
kernel/rtmutex.c: In function ‘rt_mutex_timed_futex_lock’:
kernel/rtmutex.c:1709:37: warning: passing argument 5 of ‘rt_mutex_timed_fastlock’ from incompatible pointer type

            RT_MUTEX_FULL_CHAINWALK, rt_mutex_slowlock);
                                     ^

kernel/rtmutex.c:1634: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)’
rt_mutex_timed_fastlock(struct rt_mutex *lock, int state,
^
kernel/rtmutex.c: In function ‘rt_mutex_timed_lock’:
kernel/rtmutex.c:1749:36: warning: passing argument 5 of ‘rt_mutex_timed_fastlock’ from incompatible pointer type

            RT_MUTEX_MIN_CHAINWALK, rt_mutex_slowlock);
                                    ^

kernel/rtmutex.c:1634: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)’
rt_mutex_timed_fastlock(struct rt_mutex *lock, int state,
^

Slightly hard to wrap your head around, but once you do, the missing conversion is clear, and once fixed, all rtmutex warnings are gone.

kernel/rtmutex.c +1 -1
index 5388ba98acaf..7213fd35ffce 100644
@@ -1636,7 +1636,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))) {
Signature · 4 lines
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in