ww_mutex compile warning
Hi Luis,
The empty implementations of owner_running() and mutex_spin_on_owner() in backport/compat/kernel/ww_mutex.c should return something (one an in, one an bool), but they don't. That causes a compile warning about a missing return statement with kernel 3.9. I do not understand that code, could you please have a look into that.
Hauke
Quoted 7 lines · Hauke Mehrtens
Hi Luis,
The empty implementations of
owner_running()andmutex_spin_on_owner()inbackport/compat/kernel/ww_mutex.cshould return something (one an in, one an bool), but they don't. That causes a compile warning about a missing return statement with kernel 3.9. I do not understand that code, could you please have a look into that.
Sure here's the fix, I'll submit. Thanks for reporting this.
Luis
backport/compat/kernel/ww_mutex.c +2 -0
@@ -206,10 +206,12 @@ static void mspin_unlock(struct mspin_node **lock, struct mspin_node *node)static inline bool owner_running (struct mutex *lock,struct task_struct *owner) { +return false; }int mutex_spin_on_owner (struct mutex *lock,struct task_struct *owner) { +return 1 ; }static inline int mutex_can_spin_on_owner (struct mutex *lock)