linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3.10-rt] rtmutex: fixup semi incomplete backport causing new warning spew
@ 2015-06-22 22:23 Paul Gortmaker
  0 siblings, 0 replies; only message in thread
From: Paul Gortmaker @ 2015-06-22 22:23 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: Thomas Gleixner, linux-rt-users, Paul Gortmaker

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@windriver.com>

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-22 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-22 22:23 [PATCH v3.10-rt] rtmutex: fixup semi incomplete backport causing new warning spew Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).