mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 06:24:53 +08:00
serial: 8250_early: fix comparison of different types
Fix the following sparse warning: drivers/tty/serial/8250/8250_early.c:196:26: error: incompatible types in comparison expression (different type sizes) Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9fdedf5d16
commit
75474b6fd6
@ -194,7 +194,7 @@ static int __init parse_options(struct early_serial8250_device *device,
|
||||
options++;
|
||||
device->baud = simple_strtoul(options, NULL, 0);
|
||||
length = min(strcspn(options, " ") + 1,
|
||||
sizeof(device->options));
|
||||
(size_t)(sizeof(device->options)));
|
||||
strlcpy(device->options, options, length);
|
||||
} else {
|
||||
device->baud = probe_baud(port);
|
||||
|
Loading…
Reference in New Issue
Block a user