Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1545348

[PATCH 02/13] staging: rtl8712: changed variables to __le32

From Jannik Becher <becher.jannik@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 02/13] staging: rtl8712: changed variables to __le32
Date 2016-12-20 19:10 +0100
Message-ID <sQx1o-ys-43@gated-at.bofh.it> (permalink)
References <sQx1o-ys-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fixed sparse warning "cast to restricted __le32".
Changed struct tx_desc members to __le32 and pcmdbuf to __le32.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/staging/rtl8712/rtl8712_cmd.c  |  5 +++--
 drivers/staging/rtl8712/rtl8712_xmit.h | 16 ++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c
index 9f61583..6e5e177 100644
--- a/drivers/staging/rtl8712/rtl8712_cmd.c
+++ b/drivers/staging/rtl8712/rtl8712_cmd.c
@@ -314,7 +314,8 @@ void r8712_fw_cmd_data(struct _adapter *pAdapter, u32 *value, u8 flag)
 int r8712_cmd_thread(void *context)
 {
 	struct cmd_obj *pcmd;
-	unsigned int cmdsz, wr_sz, *pcmdbuf;
+	unsigned int cmdsz, wr_sz;
+	__le32 *pcmdbuf;
 	struct tx_desc *pdesc;
 	void (*pcmd_callback)(struct _adapter *dev, struct cmd_obj *pcmd);
 	struct _adapter *padapter = context;
@@ -334,7 +335,7 @@ int r8712_cmd_thread(void *context)
 			r8712_unregister_cmd_alive(padapter);
 			continue;
 		}
-		pcmdbuf = (unsigned int *)pcmdpriv->cmd_buf;
+		pcmdbuf = (__le32 *)pcmdpriv->cmd_buf;
 		pdesc = (struct tx_desc *)pcmdbuf;
 		memset(pdesc, 0, TXDESC_SIZE);
 		pcmd = cmd_hdl_filter(padapter, pcmd);
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.h b/drivers/staging/rtl8712/rtl8712_xmit.h
index b50e7a1..02b1593 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.h
+++ b/drivers/staging/rtl8712/rtl8712_xmit.h
@@ -91,14 +91,14 @@
 
 struct tx_desc {
 	/*DWORD 0*/
-	unsigned int txdw0;
-	unsigned int txdw1;
-	unsigned int txdw2;
-	unsigned int txdw3;
-	unsigned int txdw4;
-	unsigned int txdw5;
-	unsigned int txdw6;
-	unsigned int txdw7;
+	__le32 txdw0;
+	__le32 txdw1;
+	__le32 txdw2;
+	__le32 txdw3;
+	__le32 txdw4;
+	__le32 txdw5;
+	__le32 txdw6;
+	__le32 txdw7;
 };
 
 
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] staging: rtl8712: Fixed sparse warnings Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 01/13] staging: rtl8712: changed struct members to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 12/13] staging: rtl8712: changed u16 to __be16 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 11/13] staging: rtl8712: changed cast to __le16 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 04/13] staging: rtl8712: casted variables to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 10/13] staging: rtl8712: changed u32 to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 13/13] staging: rtl8712: used a better macro Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 03/13] staging: rtl8712: changed function argument to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 08/13] staging: rtl8712: changed uint to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 09/13] staging: rtl8712: fixed little endian problem Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 05/13] staging: rtl8712: changed GetFrameSubType macro Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 02/13] staging: rtl8712: changed variables to __le32 Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100
  [PATCH 06/13] staging: rtl8712: changed typecast to __le Jannik Becher <becher.jannik@gmail.com> - 2016-12-20 19:10 +0100

csiph-web