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

Jiri Slaby jirislaby at kernel.org
Tue May 9 22:47:48 PDT 2023


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




More information about the linux-arm-kernel mailing list