linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-rt-users@vger.kernel.org,
	Paul Gortmaker <paul.gortmaker@windriver.com>
Subject: [PATCH v3.10-rt] rtmutex: fixup semi incomplete backport causing new warning spew
Date: Mon, 22 Jun 2015 18:23:07 -0400	[thread overview]
Message-ID: <1435011787-29356-1-git-send-email-paul.gortmaker@windriver.com> (raw)

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

                 reply	other threads:[~2015-06-22 22:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435011787-29356-1-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).