Re: [PATCH] pinctrl: renesas: Allow the compiler to optimize away sh_pfc_pm

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

 



On Wed, Feb 21, 2024 at 12:13:59PM +0100, Geert Uytterhoeven wrote:
> The conversion to DEFINE_NOIRQ_DEV_PM_OPS() lost the ability of the
> compiler to optimize away the struct dev_pm_ops object when it is not
> needed.
> 
> Fix this by replacing the use of pm_sleep_ptr() by a custom wrapper.
> 
> Fixes: 727eb02eb753375e ("pinctrl: renesas: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper")

Is this a new requirement (I mean more than 12 digits of SHA)?

...

> ---
> To be queued in renesas-pinctrl for v6.9.
> 
> Alternatively, one could add a unified definition:
> 
>     #define pm_psci_sleep_ptr(_ptr)        PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP) && \
> 					  IS_ENABLED(CONFIG_ARM_PSCI_FW), (_ptr))
> 
> Since there are already separate sections for CONFIG_ARM_PSCI_FW enabled
> vs. disabled, I split in two and simplified the definition.

I'm fine with current approach, IIUC we discussed this that time and the
727eb02eb753 was not the first version (or I can be mistaken, I don't remember
exact driver that the discussion was about during the DEFINE_NOIRQ_DEV_PM_OPS()
conversions).


FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux