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]
Message-ID: <AM6PR04MB496638316A3B2F8383F59E1A80B80@AM6PR04MB4966.eurprd04.prod.outlook.com>
Date:   Mon, 18 May 2020 03:43:59 +0000
From:   Aisheng Dong <aisheng.dong@....com>
To:     Anson Huang <anson.huang@....com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "jslaby@...e.com" <jslaby@...e.com>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH] tty: serial: fsl_lpuart: Use __maybe_unused instead of
 #if CONFIG_PM_SLEEP

> From: Anson Huang <Anson.Huang@....com>
> Sent: Friday, May 15, 2020 8:58 PM
> 
> Use __maybe_unused for power management related functions to simplify the
> code.
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>

Reviewed-by: Dong Aisheng <aisheng.dong@....com>

Regards
Aisheng

> ---
>  drivers/tty/serial/fsl_lpuart.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index
> 6a9909e..cca485d 100644
> --- a/drivers/tty/serial/fsl_lpuart.c
> +++ b/drivers/tty/serial/fsl_lpuart.c
> @@ -2662,8 +2662,7 @@ static int lpuart_remove(struct platform_device
> *pdev)
>  	return 0;
>  }
> 
> -#ifdef CONFIG_PM_SLEEP
> -static int lpuart_suspend(struct device *dev)
> +static int __maybe_unused lpuart_suspend(struct device *dev)
>  {
>  	struct lpuart_port *sport = dev_get_drvdata(dev);
>  	unsigned long temp;
> @@ -2721,7 +2720,7 @@ static int lpuart_suspend(struct device *dev)
>  	return 0;
>  }
> 
> -static int lpuart_resume(struct device *dev)
> +static int __maybe_unused lpuart_resume(struct device *dev)
>  {
>  	struct lpuart_port *sport = dev_get_drvdata(dev);
>  	bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
> @@ -2752,7 +2751,6 @@ static int lpuart_resume(struct device *dev)
> 
>  	return 0;
>  }
> -#endif
> 
>  static SIMPLE_DEV_PM_OPS(lpuart_pm_ops, lpuart_suspend, lpuart_resume);
> 
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ