locking/mutex: Simplify <linux/mutex.h>
authorWaiman Long <longman@redhat.com>
Thu, 22 Feb 2024 15:05:38 +0000 (10:05 -0500)
committerIngo Molnar <mingo@kernel.org>
Wed, 28 Feb 2024 12:08:37 +0000 (13:08 +0100)
commitd6cac0b6b0115fd0a5f51a49401473626e4e4fe7
treea97f233a82d71861781027b42c4d85c45ebe18af
parentca4bc2e07b716509fd279d2b449bb42f4263a9c8
locking/mutex: Simplify <linux/mutex.h>

CONFIG_DEBUG_MUTEXES and CONFIG_PREEMPT_RT are mutually exclusive. They
can't be both set at the same time.  Move up the mutex_destroy() function
declaration and the __DEBUG_MUTEX_INITIALIZER() macro above the "#ifndef
CONFIG_PREEMPT_RT" section to eliminate duplicated mutex_destroy()
declaration.

Also remove the duplicated mutex_trylock() function declaration in the
CONFIG_PREEMPT_RT section.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20240222150540.79981-3-longman@redhat.com
include/linux/mutex.h