lkml.org 
[lkml]   [2022]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] earlycon: Let users set the clock frequency
Hi,

On 24. 11. 22, 11:02, Ricardo Ribalda wrote:
...
> --- a/drivers/tty/serial/earlycon.c
> +++ b/drivers/tty/serial/earlycon.c
> @@ -120,9 +120,15 @@ static int __init parse_options(struct earlycon_device *device, char *options)
> }
>
> if (options) {
> + char *uartclk;
> +
> if (kstrtouint(options, 0, &device->baud) < 0)
> pr_warn("[%s] unsupported earlycon baud rate option\n",
> options);

IMO this won't work if there is a comma in options (i.e. your new
clkrate param). kstrtouint will return -EINVAL in that case.

> + uartclk = strchr(options, ',');
> + if (uartclk && kstrtouint(uartclk, 0, &port->uartclk) < 0)

You are giving ",number" to kstrtouint, right? That won't work either ;).

regards,
--
js

\
 
 \ /
  Last update: 2022-11-24 12:19    [W:0.081 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site