Re: [PATCH 1/1] x86/split_lock: add the source of exception to warning logs

From: Dave Hansen
Date: Fri Feb 23 2024 - 11:27:47 EST


On 2/23/24 01:47, Dongli Zhang wrote:
> @@ -1194,11 +1195,11 @@ static void split_lock_warn(unsigned long ip)
> bool handle_guest_split_lock(unsigned long ip)
> {
> if (sld_state == sld_warn) {
> - split_lock_warn(ip);
> + split_lock_warn(ip, true);
> return true;
> }

I really despise random true/falses getting passed to functions.

Wouldn't this be a lot easier to read if you just passed the string in:

split_lock_warn(ip, "guest");

rather than bools plus the ternary form dance?