From 48131a6bda18d65a6c63de1e6c54dcf40eb6057c Mon Sep 17 00:00:00 2001 From: Ebru Akagunduz Date: Tue, 7 Oct 2014 11:41:08 +0300 Subject: [PATCH] staging: gdm724x: Fix incorrect type in assignment This patch fixes following sparse warnings: drivers/staging/gdm724x/gdm_mux.c:389:32: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_mux.c:389:32: expected unsigned int [unsigned] start_flag drivers/staging/gdm724x/gdm_mux.c:389:32: got restricted __le32 [usertype] drivers/staging/gdm724x/gdm_mux.c:391:34: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_mux.c:391:34: expected unsigned int [unsigned] payload_size drivers/staging/gdm724x/gdm_mux.c:391:34: got restricted __le32 [usertype] drivers/staging/gdm724x/gdm_mux.c:392:33: warning: incorrect type in assignment (different base types) drivers/staging/gdm724x/gdm_mux.c:392:33: expected unsigned short [unsigned] packet_type drivers/staging/gdm724x/gdm_mux.c:392:33: got restricted __le16 [usertype] Sparse found above warnings, so this patch changes variable types of structs. Because expected and got variable types are different. Signed-off-by: Ebru Akagunduz Reviewed-by: Octavian Purdila Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gdm724x/gdm_mux.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/gdm724x/gdm_mux.h b/drivers/staging/gdm724x/gdm_mux.h index 0163b24..3d50383 100644 --- a/drivers/staging/gdm724x/gdm_mux.h +++ b/drivers/staging/gdm724x/gdm_mux.h @@ -35,10 +35,10 @@ #define RETRY_TIMER 30 /* msec */ struct mux_pkt_header { - unsigned int start_flag; - unsigned int seq_num; - unsigned int payload_size; - unsigned short packet_type; + __le32 start_flag; + __le32 seq_num; + __le32 payload_size; + __le16 packet_type; unsigned char data[0]; }; -- 2.7.4