Skip to contentSkip to conversation

serial: 8250_early: fix comparison of different types

PATCH In review Jingoo Han 1 participant 1 message Aug 8, 2013 TTY layer and serial drivers

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 2/10 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)

---
 drivers/tty/serial/8250/8250_early.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_early.c +1 -1
index 946ddd2..c100d63 100644
@@ -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);
Signature · 1 line
1.7.10.4