[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7d561941-b6e2-6a30-b951-8ef9df9c7e79@gmail.com>
Date: Tue, 28 Jun 2022 13:09:58 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Paul Cercueil <paul@...pouillou.net>,
Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>
Cc: linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>
Subject: Re: [PATCH 1/8] watchdog: bcm7038_wdt: Remove #ifdef guards for PM
related functions
On 6/28/22 12:34, Paul Cercueil wrote:
> Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros to
> handle the .suspend/.resume callbacks.
>
> These macros allow the suspend and resume functions to be automatically
> dropped by the compiler when CONFIG_SUSPEND is disabled, without having
> to use #ifdef guards. Not using #ifdef guards means that the code is
> always compiled independently of any Kconfig option, and thanks to that
> bugs and regressions are easier to catch.
>
> Signed-off-by: Paul Cercueil <paul@...pouillou.net>
> Cc: Florian Fainelli <f.fainelli@...il.com>
> Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
Tested-by: Florian Fainelli <f.fainelli@...il.com>
Confirmed that the exact same code is generated before/after, thanks Paul!
--
Florian
Powered by blists - more mailing lists