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: <56C33BC6.1040801@arm.com>
Date:	Tue, 16 Feb 2016 15:09:58 +0000
From:	Vladimir Murzin <vladimir.murzin@....com>
To:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
CC:	mark.rutland@....com, devicetree@...r.kernel.org,
	linux@....linux.org.uk, pawel.moll@....com, arnd@...db.de,
	ijc+devicetree@...lion.org.uk, gregkh@...uxfoundation.org,
	daniel.lezcano@...aro.org, linux-kernel@...r.kernel.org,
	robh+dt@...nel.org, andy.shevchenko@...il.com,
	galak@...eaurora.org, linux-serial@...r.kernel.org,
	u.kleine-koenig@...gutronix.de, tglx@...utronix.de,
	linux-api@...r.kernel.org, jslaby@...e.cz,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 04/10] serial: mps2-uart: add MPS2 UART driver

On 16/02/16 11:02, One Thousand Gnomes wrote:
> 
>> +static void mps2_uart_set_termios(struct uart_port *port,
>> +	struct ktermios *new, struct ktermios *old)
> 
> Not that I care much but you might not want to call it "new". People get
> upset when their syntax aware editors get confused by C++ keywords 8)

Just renamed it to have cpp suffix and looks like my editor falls under
that category :)

> 
>> +{
>> +	unsigned long flags;
>> +	unsigned int baud, bauddiv;
>> +
>> +	new->c_cflag &= ~(CRTSCTS | CMSPAR);
>> +	new->c_cflag &= ~CSIZE;
>> +	new->c_cflag |= CS8;
>> +	new->c_cflag &= ~PARENB;
>> +	new->c_cflag &= ~CSTOPB;
>> +
>> +	baud = uart_get_baud_rate(port, new, old,
>> +			DIV_ROUND_CLOSEST(port->uartclk, UARTn_BAUDDIV_MASK),
>> +			DIV_ROUND_CLOSEST(port->uartclk, 16));
>> +
>> +	bauddiv = DIV_ROUND_CLOSEST(port->uartclk, baud);
>> +
>> +	spin_lock_irqsave(&port->lock, flags);
>> +
>> +	uart_update_timeout(port, new->c_cflag, baud);
>> +	mps2_uart_write32(port, bauddiv, UARTn_BAUDDIV);
> 
> This should also set the baud bits back in the termios struct
> accordingly. 
> 
> 	if (tty_termios_baud_rate(new))
> 		tty_termios_encode_baud_rate(new, baud, baud);
> 
> 
> Not a big deal and could certainly be a follow up patch after it's merged.

I'll fold it in the next version.

Thanks
Vladimir

> 
> Alan
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ