Re: [PATCH v3 1/6] serial: 8250: Change dl_read/write to handle value as u32

From: Jiri Slaby
Date: Wed May 10 2023 - 01:47:57 EST


On 09. 05. 23, 13:39, Ilpo Järvinen wrote:
Divisor latch read/write functions currently handle the value is int.

*as* int?

As the value is related to HW context, u32 makes much more sense than a
signed type.

While at it, name the parameters in the callback signature.
...
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
...
@@ -847,7 +847,7 @@ static void disable_rsa(struct uart_8250_port *up)
static int size_fifo(struct uart_8250_port *up)
{
unsigned char old_fcr, old_mcr, old_lcr;
- unsigned short old_dl;
+ unsigned int old_dl;

I am missing the context, but why not u32 here?

thanks,
--
js
suse labs