[PATCH v2 4/4] locking/rtmutex: Remove Comparison to bool
From: Jules Irenge
Date: Sun Mar 29 2020 - 21:25:16 EST
Coccinelle reports a warning inside __sched rt_mutex_slowunlock()
WARNING: Comparison to bool
To fix this,
a comparison (==) of a bool type function result to value true
together with the value are removed.
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/locking/rtmutex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 851bbb10819d..7289e7b26be4 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1378,7 +1378,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock,
*/
while (!rt_mutex_has_waiters(lock)) {
/* Drops lock->wait_lock ! */
- if (unlock_rt_mutex_safe(lock, flags) == true)
+ if (unlock_rt_mutex_safe(lock, flags))
return false;
/* Relock the rtmutex and try again */
raw_spin_lock_irqsave(&lock->wait_lock, flags);
--
2.25.1