lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 4 Mar 2024 15:46:39 +0530
From: Anand Moon <linux.amoon@...il.com>
To: Johan Hovold <johan@...nel.org>
Cc: Alan Stern <stern@...land.harvard.edu>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Alim Akhtar <alim.akhtar@...sung.com>, 
	linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, 
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 2/4] usb: ehci-exynos: Switch from CONFIG_PM guards to pm_ptr()

Hi Johan,

On Mon, 4 Mar 2024 at 14:51, Johan Hovold <johan@...nel.org> wrote:
>
> On Sat, Mar 02, 2024 at 01:08:09AM +0530, Anand Moon wrote:
> > Use the new PM macros for the suspend and resume functions to be
> > automatically dropped by the compiler when CONFIG_PM are disabled,
> > without having to use #ifdef guards. If CONFIG_PM unused,
> > they will simply be discarded by the compiler.
> >
> > Use RUNTIME_PM_OPS runtime macro for suspend/resume function.
> >
> > Signed-off-by: Anand Moon <linux.amoon@...il.com>
> > ---
> >  drivers/usb/host/ehci-exynos.c | 10 ++--------
> >  1 file changed, 2 insertions(+), 8 deletions(-)
>
> >  static const struct dev_pm_ops exynos_ehci_pm_ops = {
> > -     .suspend        = exynos_ehci_suspend,
> > -     .resume         = exynos_ehci_resume,
> > +     RUNTIME_PM_OPS(exynos_ehci_suspend, exynos_ehci_resume, NULL)
> >  };
>
> This is also broken and clearly not tested. See the definition of
> RUNTIME_PM_OPS() which sets the runtime pm callbacks, not the suspend
> ones:
>
>         #define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
>                 .runtime_suspend = suspend_fn, \
>                 .runtime_resume = resume_fn, \
>                 .runtime_idle = idle_fn,
>
> Johan

Ok, I will drop these changes.

Thanks.
-Anand

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ