On 2/26/21 11:03 AM, Johannes Berg wrote:
@@ -5475,7 +5476,7 @@ noinstr int lock_is_held_type(const struct lockdep_map
*lock, int read)
/* avoid false negative lockdep_assert_not_held()
* and lockdep_assert_held()
*/
- return -1;
> @@ -5475,7 +5476,7 @@ noinstr int lock_is_held_type(const struct lockdep_map
> *lock, int read)
> /* avoid false negative lockdep_assert_not_held()
>* and lockdep_assert_held()
>*/
> - return -1;
> + return LOCK_STATE_UNKNOW
Adds defines for lock state returns from lock_is_held_type() based on
Johannes Berg's suggestions as it make it easier to read and maintain
the lock states. These are defines and a enum to avoid changes to
lock_is_held_type() and lockdep_is_held() return types.
Link:
https://lore.kernel.org/lkml/