Re: [PATCH] platform/x86: thinkpad_acpi: Use bool for str_supported() parameter

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.