[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] ns16550: fix an incorrect assignment to uart->io_size
commit 352c89f72ddb67b8d9d4e492203f8c77f85c8df1 Author: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> AuthorDate: Tue Jan 24 16:54:38 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jan 24 16:54:38 2023 +0100 ns16550: fix an incorrect assignment to uart->io_size uart->io_size represents the size in bytes. Thus, when serial_port.bit_width is assigned to it, it should be converted to size in bytes. Fixes: 17b516196c ("ns16550: add ACPI support for ARM only") Reported-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/drivers/char/ns16550.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 7e22e687fb..4ce74b3cd3 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -1875,7 +1875,7 @@ static int __init ns16550_acpi_uart_init(const void *data) uart->parity = spcr->parity; uart->stop_bits = spcr->stop_bits; uart->io_base = spcr->serial_port.address; - uart->io_size = spcr->serial_port.bit_width; + uart->io_size = DIV_ROUND_UP(spcr->serial_port.bit_width, BITS_PER_BYTE); uart->reg_shift = spcr->serial_port.bit_offset; uart->reg_width = spcr->serial_port.access_width; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |