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: <2130ad22-bf5d-f5df-e51a-12632055ab3c@suse.cz>
Date:   Tue, 6 Sep 2022 12:50:50 +0200
From:   Jiri Slaby <jslaby@...e.cz>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Tobias Klauser <tklauser@...tanz.ch>,
        Richard Genoud <richard.genoud@...il.com>,
        Nicolas Ferre <nicolas.ferre@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Beznea <claudiu.beznea@...rochip.com>,
        Vladimir Zapolskiy <vz@...ia.com>,
        Liviu Dudau <liviu.dudau@....com>,
        Sudeep Holla <sudeep.holla@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Andreas Färber <afaerber@...e.de>,
        Manivannan Sadhasivam <mani@...nel.org>
Subject: Re: [PATCH v2 2/3] tty: serial: use DEFINE_UART_PORT_TX_HELPER()

On 02. 09. 22, 16:21, Ilpo Järvinen wrote:
>> --- a/drivers/tty/serial/sa1100.c
>> +++ b/drivers/tty/serial/sa1100.c
>> @@ -226,45 +226,34 @@ sa1100_rx_chars(struct sa1100_port *sport)
>>   	tty_flip_buffer_push(&sport->port.state->port);
>>   }
>>   
>> -static void sa1100_tx_chars(struct sa1100_port *sport)
>> +static bool sa1100_tx_ready(struct uart_port *port)
>>   {
>> -	struct circ_buf *xmit = &sport->port.state->xmit;
>> +	struct sa1100_port *sport =
>> +		container_of(port, struct sa1100_port, port);
>>   
>> -	if (sport->port.x_char) {
>> -		UART_PUT_CHAR(sport, sport->port.x_char);
>> -		sport->port.icount.tx++;
>> -		sport->port.x_char = 0;
>> -		return;
>> -	}
>> +	return UART_GET_UTSR1(sport) & UTSR1_TNF;
>> +}
>> +
>> +static void sa1100_put_char(struct uart_port *port, unsigned char ch)
>> +{
>> +	struct sa1100_port *sport =
>> +		container_of(port, struct sa1100_port, port);
>> +
>> +	UART_PUT_CHAR(sport, ch);
>> +}
> 
> Perhaps not to add into this change itself, but I just point out these
> would be useful in addition to what is changed:
> 	- Get rid of UART_PUT_CHAR()

Right, that would make the above easier.

> 	- sa1100_console_putchar() could use sa1100_tx_ready()
That could be a nice cleanup. But looking at the history, I am not sure 
anyone cares enough about the driver (and cleaning it up :P). And I'm 
not much into it.

I've just sent v3 including your comments addressed.

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ