[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] ns16550: fix the use of simple_strtoul() for parsing u64
commit aa7d3432caf02b6c8b60476fb54197c28f3b5e03 Author: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> AuthorDate: Tue Jan 24 16:53:13 2023 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jan 24 16:53:13 2023 +0100 ns16550: fix the use of simple_strtoul() for parsing u64 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). Suggested-by: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- 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 01a05c9aa8..7e22e687fb 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: -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |