Skip to contentSkip to conversation

rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif

PATCH New Steven Rostedt 2 participants 2 messages Sep 11, 2018 Locking primitives

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif

From: Steven Rostedt (VMware) <[email protected]>

Merging v4.14.68 into v4.14-rt I tripped over a conflict in the rtmutex.c code. There I found that we had:

#ifdef CONFIG_DEBUG_LOCK_ALLOC
[..]
#endif

#ifndef CONFIG_DEBUG_LOCK_ALLOC
[..]
#endif

Really this should be:

#ifdef CONFIG_DEBUG_LOCK_ALLOC
[..]
#else
[..]
#endif

This cleans up that logic.

---

kernel/locking/rtmutex.c +2 -2
index 2823d4163a37..581edcc63c26 100644
@@ -1485,9 +1485,9 @@ void __sched rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass)
 	__rt_mutex_lock(lock, subclass);
 }
 EXPORT_SYMBOL_GPL(rt_mutex_lock_nested);
-#endif
 
-#ifndef CONFIG_DEBUG_LOCK_ALLOC
+#else /* !CONFIG_DEBUG_LOCK_ALLOC */
+
 /**
  * rt_mutex_lock - lock a rt_mutex
  *
#1 lore raw

[tip:locking/core] locking/rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif

locking/rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif
Commit-ID:  84818af26350c245c8e1994493b7459c0822be5b
Gitweb:     https://git.kernel.org/tip/84818af26350c245c8e1994493b7459c0822be5b
Author:     Steven Rostedt (VMware) <[email protected]>
AuthorDate: Mon, 10 Sep 2018 21:46:38 -0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 11 Sep 2018 08:12:00 +0200

locking/rtmutex: Fix the preprocessor logic with normal #ifdef #else #endif

Merging v4.14.68 into v4.14-rt I tripped over a conflict in the rtmutex.c code. There I found that we had:

#ifdef CONFIG_DEBUG_LOCK_ALLOC
[..]
#endif

#ifndef CONFIG_DEBUG_LOCK_ALLOC
[..]
#endif

Really this should be:

#ifdef CONFIG_DEBUG_LOCK_ALLOC
[..]
#else
[..]
#endif

This cleans up that logic.

---
 kernel/locking/rtmutex.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/locking/rtmutex.c +2 -2
index 2823d4163a37..581edcc63c26 100644
@@ -1485,9 +1485,9 @@ void __sched rt_mutex_lock_nested(struct rt_mutex *lock, unsigned int subclass)
 	__rt_mutex_lock(lock, subclass);
 }
 EXPORT_SYMBOL_GPL(rt_mutex_lock_nested);
-#endif
 
-#ifndef CONFIG_DEBUG_LOCK_ALLOC
+#else /* !CONFIG_DEBUG_LOCK_ALLOC */
+
 /**
  * rt_mutex_lock - lock a rt_mutex
  *