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 2/3] xen/drivers: ns16550: Fix the use of simple_strtoul() for extracting u64
Date: Mon, 23 Jan 2023 13:44:50 +0000 [thread overview]
Message-ID: <20230123134451.47185-3-ayan.kumar.halder@amd.com> (raw)
In-Reply-To: <20230123134451.47185-1-ayan.kumar.halder@amd.com>
One should be using simple_strtoull() ( instead of simple_strtoul() )
to assign value to 'u64' variable. The reason being u64 can be
represented by 'unsigned long long' on all the platforms (ie Arm32,
Arm64 and x86).
Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
---
Changes from -
v1,v2 - NA (This patch is introduced in v3).
xen/drivers/char/ns16550.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 58d0ccd889..43e1f971ab 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1532,7 +1532,7 @@ static bool __init parse_positional(struct ns16550 *uart, char **str)
else
#endif
{
- uart->io_base = simple_strtoul(conf, &conf, 0);
+ uart->io_base = simple_strtoull(conf, &conf, 0);
}
}
@@ -1603,7 +1603,7 @@ static bool __init parse_namevalue_pairs(char *str, struct ns16550 *uart)
"Can't use io_base with dev=pci or dev=amt options\n");
break;
}
- uart->io_base = simple_strtoul(param_value, NULL, 0);
+ uart->io_base = simple_strtoull(param_value, NULL, 0);
break;
case irq:
--
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 ` Ayan Kumar Halder [this message]
2023-01-23 14:01 ` [XEN v3 2/3] xen/drivers: ns16550: Fix the use of simple_strtoul() for extracting u64 Jan Beulich
2023-01-23 13:44 ` [XEN v3 3/3] xen/drivers: ns16550: Fix an incorrect assignment to uart->io_size Ayan Kumar Halder
2023-01-23 21:21 ` 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-3-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.