On 2023/01/14 18:36, Ingo Molnar wrote:
Yeah, so note how you introduce a function with a parameter:Initial version at https://lkml.kernel.org/r/82af40cc-bf85-2b53-b8f9-dfc12e66a781@xxxxxxxxxxxxxxxxxxx
void __debug_show_all_locks(bool show_stack)
... only to then *hide* the new parameter via helper functions:
static inline void debug_show_all_locks(void)
{
__debug_show_all_locks(false);
}
static inline void debug_show_all_lock_holders(void)
{
__debug_show_all_locks(true);
}
... which is a *strong* hint by our universe that the new parameter was
probably a bad idea to begin with.
Given how small debug_show_all_locks() is to begin with, I'd suggest simply
duplicating the loop into debug_show_all_lock_holders() or so.
was duplicating the loop.
Waiman Long suggested me not to duplicate the loop at
https://lkml.kernel.org/r/3e027453-fda4-3891-3ec3-5623f1525e56@xxxxxxxxxx .
Please talk with Waiman. I'm fine with either approach.