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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h4k+dmPXJT_CnPw9EwB0GYmL5YxG_DF1TTJynAWm73Hg@mail.gmail.com>
Date: Mon, 18 Mar 2024 14:50:48 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Dhruva Gole <d-gole@...com>
Cc: Ulf Hansson <ulf.hansson@...aro.org>, "Rafael J. Wysocki" <rafael@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Tony Lindgren <tony@...mide.com>, 
	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>, 
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Viresh Kumar <viresh.kumar@...aro.org>, 
	theo.lebrun@...tlin.com, linux-pm@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org
Subject: Re: [PATCH 3/3] mmc: sdhci-pci: Use device_set_wakeup_enable for
 en/disable wakeups

On Mon, Mar 18, 2024 at 6:55 AM Dhruva Gole <d-gole@...com> wrote:
>
> There exists device_set_wakeup_enable for wrapping device_wakeup_enable
> and device_wakeup_disable. Use that instead to avoid confusion in
> returning from a void vs int function.
>
> Signed-off-by: Dhruva Gole <d-gole@...com>
> ---
>
> I do not have the hardware to test out this driver, hence requesting
> someone to review/ test it if atall you suspect that this change can
> break existing functionality.
>
>  drivers/mmc/host/sdhci-pci-core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 025b31aa712c..db614389a5fc 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -61,9 +61,9 @@ static int sdhci_pci_init_wakeup(struct sdhci_pci_chip *chip)
>         }
>
>         if ((pm_flags & MMC_PM_KEEP_POWER) && (pm_flags & MMC_PM_WAKE_SDIO_IRQ))
> -               return device_wakeup_enable(&chip->pdev->dev);
> +               return device_set_wakeup_enable(&chip->pdev->dev, true);

This change is not necessary.

>         else if (!cap_cd_wake)
> -               return device_wakeup_disable(&chip->pdev->dev);
> +               return device_set_wakeup_enable(&chip->pdev->dev, false);

It would be sufficient to simply drop the return statement from here, that is

+               device_wakeup_disable(&chip->pdev->dev);

and it can be done in the first patch (which would be less confusing even IMO).

>
>         return 0;
>  }
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ