Re: [PATCH] platform/x86: thinkpad_acpi: Use bool for str_supported() parameter
From: Andy Shevchenko
Date: Tue Aug 18 2026 - 09:38:11 EST
On Tue, Aug 18, 2026 at 04:25:21PM +0300, Ilpo Järvinen wrote:
> On Thu, 6 Aug 2026, Thorsten Blum wrote:
>
> > Make str_supported() take a bool, define it inline, and return string
> > literals directly. Use a single inline definition for both debug and
> > non-debug builds.
> > +static inline const char * __init str_supported(bool is_supported)
> > +{
> > + return is_supported ? "supported" : "not supported";
> > +}
>
> This certainly looks something that should be in linux/string_choices.h.
> I'm pretty surprised it isn't already there actually.
>
> Not sure about how to name it though, str_supported_not_supported() a bit
> repetitive. Andy?
Is it part of ABI? Otherwise I would rather see str_supported_unsupported().
--
With Best Regards,
Andy Shevchenko