[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220806163255.10404-2-markuss.broks@gmail.com>
Date: Sat, 6 Aug 2022 19:32:22 +0300
From: Markuss Broks <markuss.broks@...il.com>
To: linux-kernel@...r.kernel.org
Cc: ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
Markuss Broks <markuss.broks@...il.com>,
Jonathan Corbet <corbet@....net>,
Ard Biesheuvel <ardb@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Helge Deller <deller@....de>,
"Paul E. McKenney" <paulmck@...nel.org>,
Borislav Petkov <bp@...e.de>,
Kees Cook <keescook@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Randy Dunlap <rdunlap@...radead.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Michal Suchanek <msuchanek@...e.de>,
Javier Martinez Canillas <javierm@...hat.com>,
Arnd Bergmann <arnd@...db.de>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Wei Ming Chen <jj251510319013@...il.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Tony Lindgren <tony@...mide.com>, linux-doc@...r.kernel.org,
linux-efi@...r.kernel.org, linux-serial@...r.kernel.org,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Rob Herring <robh@...nel.org>
Subject: [PATCH v2 1/3] drivers: serial: earlycon: Correct argument name
The "node" argument is actually an offset, and it's also
an "int", and not "unsigned long". Correct the of_setup_earlycon
function.
Signed-off-by: Markuss Broks <markuss.broks@...il.com>
---
drivers/tty/serial/earlycon.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 57c70851f22a0e78805f34d1a7700708104b6f6a..bc210ae8173d97d5ef422468acf2755a853cb943 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -244,7 +244,7 @@ early_param("earlycon", param_setup_earlycon);
#ifdef CONFIG_OF_EARLY_FLATTREE
int __init of_setup_earlycon(const struct earlycon_id *match,
- unsigned long node,
+ int offset,
const char *options)
{
int err;
@@ -255,25 +255,25 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
spin_lock_init(&port->lock);
port->iotype = UPIO_MEM;
- addr = of_flat_dt_translate_address(node);
+ addr = of_flat_dt_translate_address(offset);
if (addr == OF_BAD_ADDR) {
pr_warn("[%s] bad address\n", match->name);
return -ENXIO;
}
port->mapbase = addr;
- val = of_get_flat_dt_prop(node, "reg-offset", NULL);
+ val = of_get_flat_dt_prop(offset, "reg-offset", NULL);
if (val)
port->mapbase += be32_to_cpu(*val);
port->membase = earlycon_map(port->mapbase, SZ_4K);
- val = of_get_flat_dt_prop(node, "reg-shift", NULL);
+ val = of_get_flat_dt_prop(offset, "reg-shift", NULL);
if (val)
port->regshift = be32_to_cpu(*val);
- big_endian = of_get_flat_dt_prop(node, "big-endian", NULL) != NULL ||
+ big_endian = of_get_flat_dt_prop(offset, "big-endian", NULL) != NULL ||
(IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) &&
- of_get_flat_dt_prop(node, "native-endian", NULL) != NULL);
- val = of_get_flat_dt_prop(node, "reg-io-width", NULL);
+ of_get_flat_dt_prop(offset, "native-endian", NULL) != NULL);
+ val = of_get_flat_dt_prop(offset, "reg-io-width", NULL);
if (val) {
switch (be32_to_cpu(*val)) {
case 1:
@@ -291,11 +291,11 @@ int __init of_setup_earlycon(const struct earlycon_id *match,
}
}
- val = of_get_flat_dt_prop(node, "current-speed", NULL);
+ val = of_get_flat_dt_prop(offset, "current-speed", NULL);
if (val)
early_console_dev.baud = be32_to_cpu(*val);
- val = of_get_flat_dt_prop(node, "clock-frequency", NULL);
+ val = of_get_flat_dt_prop(offset, "clock-frequency", NULL);
if (val)
port->uartclk = be32_to_cpu(*val);
--
2.37.0
Powered by blists - more mailing lists