Skip to content

Commit

Permalink
serial: 8250_early: fix comparison of different types
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Greg Kroah-Hartman committed Aug 12, 2013
1 parent 9fdedf5 commit 75474b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_early.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 75474b6

Please sign in to comment.