serial: 8250_early: fix comparison of different types
authorJingoo Han <jg1.han@samsung.com>
Thu, 8 Aug 2013 08:32:04 +0000 (17:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 18:35:31 +0000 (11:35 -0700)
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>
drivers/tty/serial/8250/8250_early.c

index 946ddd2b3a541990277aabad488843a429e3e6f5..c100d6343d508cd9b690ca3eb7c0e59e2fe87ef3 100644 (file)
@@ -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);