[PATCH 2/2] staging: rtl8723au: include/rtl8723a_hal.h: use __leXX types in fw header struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch makes field in struct rt_8723a_firmware_hdr use endianness-aware
types (__leXX), thus fixing the following sparse warnings:

CHECK   drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:263:37: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:265:39: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to
restricted __le16

Signed-off-by: Daniele Alessandrelli <daniele.alessandrelli@xxxxxxxxx>
---
 drivers/staging/rtl8723au/include/rtl8723a_hal.h | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
index d40e420..743b52a 100644
--- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h
+++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
@@ -80,10 +80,11 @@ struct rt_8723a_firmware_hdr {
 	/*  8-byte alinment required */
 
 	/*  LONG WORD 0 ---- */
-	u16		Signature;	/*  92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut */
+	__le16		Signature;  /* 92C0: test chip; 92C, 88C0: test chip;
+				     * 88C1: MP A-cut; 92C1: MP A-cut */
 	u8		Category;	/*  AP/NIC and USB/PCI */
 	u8		Function;	/*  Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */
-	u16		Version;		/*  FW Version */
+	__le16		Version;		/*  FW Version */
 	u8		Subversion;	/*  FW Subversion, default 0x00 */
 	u8		Rsvd1;
 
@@ -93,16 +94,16 @@ struct rt_8723a_firmware_hdr {
 	u8		Date;	/*  Release time Date field */
 	u8		Hour;	/*  Release time Hour field */
 	u8		Minute;	/*  Release time Minute field */
-	u16		RamCodeSize;	/*  The size of RAM code */
-	u16		Rsvd2;
+	__le16		RamCodeSize;	/*  The size of RAM code */
+	__le16		Rsvd2;
 
 	/*  LONG WORD 2 ---- */
-	u32		SvnIdx;	/*  The SVN entry index */
-	u32		Rsvd3;
+	__le32		SvnIdx;	/*  The SVN entry index */
+	__le32		Rsvd3;
 
 	/*  LONG WORD 3 ---- */
-	u32		Rsvd4;
-	u32		Rsvd5;
+	__le32		Rsvd4;
+	__le32		Rsvd5;
 };
 
 #define DRIVER_EARLY_INT_TIME		0x05
-- 
1.8.3.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux