RE: [PATCH] HID: Intel-thc-hid: Intel-thc: Use str_true_false() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: liu.xuemei1@xxxxxxxxxx <liu.xuemei1@xxxxxxxxxx>
> Sent: Thursday, July 24, 2025 10:36 AM
> To: jikos@xxxxxxxxxx; bentiss@xxxxxxxxxx
> Cc: Xu, Even <even.xu@xxxxxxxxx>; Sun, Xinpeng <xinpeng.sun@xxxxxxxxx>;
> srinivas.pandruvada@xxxxxxxxxxxxxxx; liu.song13@xxxxxxxxxx; linux-
> input@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH] HID: Intel-thc-hid: Intel-thc: Use str_true_false() helper
> 
> From: Liu Song <liu.song13@xxxxxxxxxx>
> 
> Remove hard-coded strings by using the str_true_false() helper function.
> 
> Signed-off-by: Liu Song <liu.song13@xxxxxxxxxx>
> ---
>  drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c b/drivers/hid/intel-
> thc-hid/intel-thc/intel-thc-dev.c
> index 6f2263869b20..2b794bb481a0 100644
> --- a/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
> +++ b/drivers/hid/intel-thc-hid/intel-thc/intel-thc-dev.c
> @@ -4,6 +4,7 @@
>  #include <linux/bitfield.h>
>  #include <linux/math.h>
>  #include <linux/regmap.h>
> +#include <linux/string_choices.h>
> 
>  #include "intel-thc-dev.h"
>  #include "intel-thc-hw.h"
> @@ -664,7 +665,7 @@ int thc_interrupt_quiesce(const struct thc_device *dev,
> bool int_quiesce)
>  	if (ret) {
>  		dev_err_once(dev->dev,
>  			     "Timeout while waiting THC idle, target quiesce state
> = %s\n",
> -			     int_quiesce ? "true" : "false");
> +			     str_true_false(int_quiesce));
>  		return ret;
>  	}
> 

Thanks for the patch! Looks good to me!

Reviewed-by: Even Xu <even.xu@xxxxxxxxx>

> --
> 2.27.0




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux