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: <336df8ff-72fa-90af-607b-eeb683de4a37@microchip.com>
Date:   Thu, 7 Oct 2021 14:03:36 +0200
From:   Nicolas Ferre <nicolas.ferre@...rochip.com>
To:     Claudiu Beznea <claudiu.beznea@...rochip.com>,
        <richard.genoud@...il.com>, <gregkh@...uxfoundation.org>,
        <jirislaby@...nel.org>, <alexandre.belloni@...tlin.com>,
        <ludovic.desroches@...rochip.com>
CC:     <linux-serial@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] tty: serial: atmel: use macros instead of hardcoded
 values

On 07/10/2021 at 13:20, Claudiu Beznea wrote:
> Use UART_PM_STATE_ON, UART_PM_STATE_OFF instead of hardcoded values.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...rochip.com>

Reviewed-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

Thanks Claudiu, best regards,
   Nicolas

> ---
>   drivers/tty/serial/atmel_serial.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 249ea35088d2..2c99a47a2535 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2084,7 +2084,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state,
>   	struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
>   
>   	switch (state) {
> -	case 0:
> +	case UART_PM_STATE_ON:
>   		/*
>   		 * Enable the peripheral clock for this serial port.
>   		 * This is called on uart_open() or a resume event.
> @@ -2094,7 +2094,7 @@ static void atmel_serial_pm(struct uart_port *port, unsigned int state,
>   		/* re-enable interrupts if we disabled some on suspend */
>   		atmel_uart_writel(port, ATMEL_US_IER, atmel_port->backup_imr);
>   		break;
> -	case 3:
> +	case UART_PM_STATE_OFF:
>   		/* Back up the interrupt mask and disable all interrupts */
>   		atmel_port->backup_imr = atmel_uart_readl(port, ATMEL_US_IMR);
>   		atmel_uart_writel(port, ATMEL_US_IDR, -1);
> 


-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ