From: Jingoo Han Date: Thu, 8 Aug 2013 08:32:04 +0000 (+0900) Subject: serial: 8250_early: fix comparison of different types X-Git-Tag: firefly_0821_release~176^2~5470^2~70 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=75474b6fd6660486d89226fc6f704853c76210e3;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index 946ddd2b3a54..c100d6343d50 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -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);