serial: msm_serial: fix comparison of different types
authorJingoo Han <jg1.han@samsung.com>
Thu, 8 Aug 2013 08:38:20 +0000 (17:38 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 18:35:32 +0000 (11:35 -0700)
Fix the following sparse warning:

drivers/tty/serial/msm_serial.c:237:37: 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/msm_serial.c

index 252d514..8f58540 100644 (file)
@@ -234,7 +234,8 @@ static void handle_tx(struct uart_port *port)
                        break;
 
                if (msm_port->is_uartdm)
-                       num_chars = min(tx_count - tf_pointer, sizeof(buf));
+                       num_chars = min(tx_count - tf_pointer,
+                                       (unsigned int)sizeof(buf));
                else
                        num_chars = 1;