[Skiboot] [PATCH 32/36] sparse: fix incorrect type in assignment warning in hw/lpc-uart.c

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 15:18:26 AEDT 2015


hw/lpc-uart.c:77:25: warning: incorrect type in assignment (different base types)
hw/lpc-uart.c:77:25:    expected restricted beint16_t [assigned] [usertype] in_count
hw/lpc-uart.c:77:25:    got unsigned char [unsigned] [usertype] in_count

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 hw/lpc-uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/lpc-uart.c b/hw/lpc-uart.c
index e856563732e3..b6670b38a4d6 100644
--- a/hw/lpc-uart.c
+++ b/hw/lpc-uart.c
@@ -74,7 +74,7 @@ static void uart_trace(u8 ctx, u8 cnt, u8 irq_state, u8 in_count)
 	t.uart.ctx = ctx;
 	t.uart.cnt = cnt;
 	t.uart.irq_state = irq_state;
-	t.uart.in_count = in_count;
+	t.uart.in_count = cpu_to_be16(in_count);
 	trace_add(&t, TRACE_UART, sizeof(struct trace_uart));
 }
 
-- 
2.1.4



More information about the Skiboot mailing list