Skip to contentSkip to conversation

serial: mxs-auart: Index is unsigned

PATCH In review Fabio Estevam 2 participants 2 messages Jan 8, 2013

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 serial: mxs-auart: Index is unsigned

From: Fabio Estevam <[email protected]>>

Fix the following warning when building with W=1 option:

drivers/tty/serial/mxs-auart.c: In function 'mxs_auart_tx_chars':
drivers/tty/serial/mxs-auart.c:272:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

---
 drivers/tty/serial/mxs-auart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/mxs-auart.c +1 -1
index 6db23b0..537e0af 100644
@@ -253,7 +253,7 @@ static void mxs_auart_tx_chars(struct mxs_auart_port *s)
 	struct circ_buf *xmit = &s->port.state->xmit;
 
 	if (auart_dma_enabled(s)) {
-		int i = 0;
+		u32 i = 0;
 		int size;
 		void *buffer = s->tx_dma_buf;
 
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw

Dear Fabio Estevam,

Quoted 9 lines

From: Fabio Estevam <[email protected]>>

Fix the following warning when building with W=1 option:

drivers/tty/serial/mxs-auart.c: In function 'mxs_auart_tx_chars':
drivers/tty/serial/mxs-auart.c:272:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Quoted 9 lines
---
 drivers/tty/serial/mxs-auart.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/tty/serial/mxs-auart.c index 6db23b0..537e0af 100644

drivers/tty/serial/mxs-auart.c static void mxs_auart_tx_chars(struct mxs_auart_port · line 258

Quoted 7 lines
drivers/tty/serial/mxs-auart.c +1 -1
@@ -253,7 +253,7 @@ static void mxs_auart_tx_chars(struct mxs_auart_port
 *s) struct circ_buf *xmit = &s->port.state->xmit;
 
 	if (auart_dma_enabled(s)) {
-		int i = 0;
+		u32 i = 0;
 		int size;
 		void *buffer = s->tx_dma_buf;

Best regards,
Marek Vasut