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: <CWIDX8TT14N7.2UR5AIDDY37MX@tleb-bootlin-xps13-01>
Date:   Thu, 26 Oct 2023 14:54:35 +0200
From:   Théo Lebrun <theo.lebrun@...tlin.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     "Russell King" <linux@...linux.org.uk>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Jiri Slaby" <jirislaby@...nel.org>,
        <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
        "Linus Walleij" <linus.walleij@...aro.org>,
        "Gregory CLEMENT" <gregory.clement@...tlin.com>,
        "Alexandre Belloni" <alexandre.belloni@...tlin.com>,
        "Thomas Petazzoni" <thomas.petazzoni@...tlin.com>,
        "Vladimir Kondratiev" <vladimir.kondratiev@...ileye.com>,
        "Tawfik Bayouk" <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 6/6] tty: serial: amba-pl011: Parse bits option as 5, 6,
 7 or 8 in _get_options

Hi,

On Thu Oct 26, 2023 at 1:13 PM CEST, Ilpo Järvinen wrote:
> On Thu, 26 Oct 2023, Théo Lebrun wrote:
> > 
> > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> > index 5774d48c7f16..b2062e4cbbab 100644
> > --- a/drivers/tty/serial/amba-pl011.c
> > +++ b/drivers/tty/serial/amba-pl011.c
> > @@ -2384,10 +2384,7 @@ static void pl011_console_get_options(struct uart_amba_port *uap, int *baud,
> >  			*parity = 'o';
> >  	}
> >  
> > -	if ((lcr_h & 0x60) == UART01x_LCRH_WLEN_7)
> > -		*bits = 7;
> > -	else
> > -		*bits = 8;
> > +	*bits = FIELD_GET(0x60, lcr_h) + 5; /* from 5 to 8 inclusive */
>
> 0x60 needs to be replaced with a named define!

Fixed locally for the next revision, thanks!

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ