From: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: <sstabellini@kernel.org>, <stefano.stabellini@amd.com>,
<julien@xen.org>, <Volodymyr_Babchuk@epam.com>,
<bertrand.marquis@arm.com>, <andrew.cooper3@citrix.com>,
<george.dunlap@citrix.com>, <jbeulich@suse.com>, <wl@xen.org>,
<xuwei5@hisilicon.com>,
Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Subject: [XEN v3 3/3] xen/drivers: ns16550: Fix an incorrect assignment to uart->io_size
Date: Mon, 23 Jan 2023 13:44:51 +0000 [thread overview]
Message-ID: <20230123134451.47185-4-ayan.kumar.halder@amd.com> (raw)
In-Reply-To: <20230123134451.47185-1-ayan.kumar.halder@amd.com>
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: 17b516196c55 ("ns16550: add ACPI support for ARM only")
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
Changes from -
v1, v2 - NA (New patch introduced in v3).
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 43e1f971ab..092f6b9c4b 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1870,7 +1870,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;
--
2.17.1
next prev parent reply other threads:[~2023-01-23 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 13:44 [XEN v3 0/3] Pre-requisite patches for supporting 32 bit physical address Ayan Kumar Halder
2023-01-23 13:44 ` [XEN v3 1/3] xen/arm: Use the correct format specifier Ayan Kumar Halder
2023-01-23 21:19 ` Stefano Stabellini
2023-01-23 22:07 ` Julien Grall
2023-01-23 22:57 ` Stefano Stabellini
2023-01-23 13:44 ` [XEN v3 2/3] xen/drivers: ns16550: Fix the use of simple_strtoul() for extracting u64 Ayan Kumar Halder
2023-01-23 14:01 ` Jan Beulich
2023-01-23 13:44 ` Ayan Kumar Halder [this message]
2023-01-23 21:21 ` [XEN v3 3/3] xen/drivers: ns16550: Fix an incorrect assignment to uart->io_size Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123134451.47185-4-ayan.kumar.halder@amd.com \
--to=ayan.kumar.halder@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=bertrand.marquis@arm.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=stefano.stabellini@amd.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xuwei5@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.