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>,
Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Subject: [XEN v2 01/11] xen/ns16550: Remove unneeded truncation check in the DT init code
Date: Tue, 17 Jan 2023 17:43:48 +0000 [thread overview]
Message-ID: <20230117174358.15344-2-ayan.kumar.halder@amd.com> (raw)
In-Reply-To: <20230117174358.15344-1-ayan.kumar.halder@amd.com>
In an earlier commit (7c1de0038895), "ns16550.io_size" was u32 and
"io_size" was u64. Thus, the ASSERT() was needed to check if the values
are the same.
However, in a later commit (c9f8e0aee507), "ns16550.io_size" was changed
to u64. Thus, the ASSERT() became redundant.
So, now as "io_size" and "uart->io_size" are both u64, there will be no
truncation. Thus, one can remove the ASSERT() and extra assignment.
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
Changes from :
v1 - 1. Updated commit message/title.
2. Added Rb.
xen/drivers/char/ns16550.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 01a05c9aa8..58d0ccd889 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1747,7 +1747,6 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
struct ns16550 *uart;
int res;
u32 reg_shift, reg_width;
- u64 io_size;
uart = &ns16550_com[0];
@@ -1758,14 +1757,10 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
uart->parity = UART_PARITY_NONE;
uart->stop_bits = 1;
- res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
+ res = dt_device_get_address(dev, 0, &uart->io_base, &uart->io_size);
if ( res )
return res;
- uart->io_size = io_size;
-
- ASSERT(uart->io_size == io_size); /* Detect truncation */
-
res = dt_property_read_u32(dev, "reg-shift", ®_shift);
if ( !res )
uart->reg_shift = 0;
--
2.17.1
next prev parent reply other threads:[~2023-01-17 17:45 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 17:43 [XEN v2 00/11] Add support for 32 bit physical address Ayan Kumar Halder
2023-01-17 17:43 ` Ayan Kumar Halder [this message]
2023-01-17 17:43 ` [XEN v2 02/11] xen/arm: Use the correct format specifier Ayan Kumar Halder
2023-01-19 22:54 ` Stefano Stabellini
2023-01-20 9:32 ` Julien Grall
2023-01-20 11:09 ` Ayan Kumar Halder
2023-01-20 14:40 ` Michal Orzel
2023-01-20 15:09 ` Julien Grall
2023-01-20 16:03 ` Michal Orzel
2023-01-20 17:49 ` Julien Grall
2023-01-20 18:08 ` Ayan Kumar Halder
2023-01-20 23:01 ` Stefano Stabellini
2023-01-21 10:24 ` Michal Orzel
2023-01-17 17:43 ` [XEN v2 03/11] xen/arm: domain_build: Replace use of paddr_t in find_domU_holes() Ayan Kumar Halder
2023-01-19 23:02 ` Stefano Stabellini
2023-01-20 9:48 ` Julien Grall
2023-01-20 9:52 ` Julien Grall
2023-01-17 17:43 ` [XEN v2 04/11] xen/arm: Typecast the DT values into paddr_t Ayan Kumar Halder
2023-01-19 23:20 ` Stefano Stabellini
2023-01-19 23:34 ` Stefano Stabellini
2023-01-20 10:16 ` Julien Grall
2023-01-31 10:51 ` Ayan Kumar Halder
2023-01-31 15:57 ` Julien Grall
2023-01-17 17:43 ` [XEN v2 05/11] xen/arm: Use paddr_t instead of u64 for address/size Ayan Kumar Halder
2023-01-18 8:40 ` Jan Beulich
2023-01-18 11:15 ` Ayan Kumar Halder
2023-01-18 13:14 ` Jan Beulich
2023-01-18 13:34 ` George Dunlap
2023-01-18 13:58 ` Jan Beulich
2023-01-18 14:45 ` George Dunlap
2023-01-19 23:24 ` Stefano Stabellini
2023-02-06 19:21 ` Ayan Kumar Halder
2023-02-07 9:03 ` Julien Grall
2023-02-07 10:59 ` Ayan Kumar Halder
2023-02-07 12:18 ` Julien Grall
2023-01-20 10:34 ` Julien Grall
2023-01-17 17:43 ` [XEN v2 06/11] xen/arm: Introduce a wrapper for dt_device_get_address() to handle paddr_t Ayan Kumar Halder
2023-01-19 23:35 ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 07/11] xen/arm: smmu: Use writeq_relaxed_non_atomic() for writing to SMMU_CBn_TTBR0 Ayan Kumar Halder
2023-01-19 23:40 ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 08/11] xen/arm: guest_walk: LPAE specific bits should be enclosed within "ifndef CONFIG_ARM_PA_32" Ayan Kumar Halder
2023-01-19 23:43 ` Stefano Stabellini
2023-01-20 10:39 ` Julien Grall
2023-01-17 17:43 ` [XEN v2 09/11] xen/arm: Introduce ARM_PA_32 to support 32 bit physical address Ayan Kumar Halder
2023-01-18 8:50 ` Jan Beulich
2023-01-18 11:57 ` Ayan Kumar Halder
2023-01-18 13:19 ` Jan Beulich
2023-01-19 23:48 ` Stefano Stabellini
2023-01-18 9:18 ` Julien Grall
2023-01-30 22:00 ` Julien Grall
2023-01-17 17:43 ` [XEN v2 10/11] xen/arm: Restrict zeroeth_table_offset for ARM_64 Ayan Kumar Halder
2023-01-20 0:19 ` Stefano Stabellini
2023-01-20 10:53 ` Julien Grall
2023-01-20 16:53 ` Stefano Stabellini
2023-01-17 17:43 ` [XEN v2 11/11] xen/arm: p2m: Enable support for 32bit IPA Ayan Kumar Halder
2023-01-20 0:05 ` Stefano Stabellini
2023-01-20 11:06 ` Julien Grall
2023-02-07 15:34 ` Ayan Kumar Halder
2023-02-09 11:45 ` Julien Grall
2023-02-10 15:39 ` Ayan Kumar Halder
2023-02-10 16:19 ` Julien Grall
2023-02-10 17:51 ` Ayan Kumar Halder
2023-02-10 17:58 ` Julien Grall
2023-01-18 10:12 ` [XEN v2 00/11] Add support for 32 bit physical address Michal Orzel
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=20230117174358.15344-2-ayan.kumar.halder@amd.com \
--to=ayan.kumar.halder@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=stefano.stabellini@amd.com \
--cc=xen-devel@lists.xenproject.org \
/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.