Skip to contentSkip to conversation

serial: msm_serial: fix comparison of different types

PATCH In review Jingoo Han 1 participant 1 message Aug 8, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 7/10 serial: msm_serial: fix comparison of different types

Fix the following sparse warning:

drivers/tty/serial/msm_serial.c:237:37: error: incompatible types in comparison expression (different type sizes)

---
 drivers/tty/serial/msm_serial.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/msm_serial.c +2 -1
index 252d514..8f58540 100644
@@ -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;
 
Signature · 1 line
1.7.10.4