Re: [PATCH 1/2] ACPI: platform_profile: Stub platform_profile_cycle

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

 



On Sun, May 18, 2025 at 12:42:36PM +0200, Arnd Bergmann wrote:
> On Sun, May 18, 2025, at 12:18, Janne Grunau via B4 Relay wrote:
> *ops);
> > +#ifdef CONFIG_ACPI_PLATFORM_PROFILE
> >  int platform_profile_cycle(void);
> > +#else
> 
> CONFIG_ACPI_PLATFORM_PROFILE is a 'tristate' symbol, so the #ifdef
> check is wrong here when both the caller and the platform profile
> are in a loadable module.
> 
> I think what you want here is
> 
> #if IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE)

ack, kernel test robot already complained

> Alternatively, you could move that check into the caller
> and do
> 
>       if (IS_ENABLED(CONFIG_ACPI_PLATFORM_PROFILE))
>               ret = platform_profile_cycle();
> 
> which makes it a little easier to catch build failures in
> drivers that are missing the 'select ACPI_PLATFORM_PROFILE'.

I think I'll go with this for v2 and remove the "ACPI || !ACPI" from
Patch 2.

thanks,

Janne




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux