[PATCH v3.10-rt] rtmutex: fixup semi incomplete backport causing new warning spew

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>

diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index 5388ba98acaf..7213fd35ffce 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -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))) {
-- 
2.4.3

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



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux