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


Groups > linux.kernel > #1545345

[PATCH 09/13] staging: rtl8712: fixed little endian problem

From Jannik Becher <becher.jannik@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 09/13] staging: rtl8712: fixed little endian problem
Date 2016-12-20 19:10 +0100
Message-ID <sQx1p-ys-47@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 a sparse warning.
Using function le16_to_cpus() to avoid double assignment.

Signed-off-by: Jannik Becher <becher.jannik@gmail.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 590acb5..3518f1f 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -199,7 +199,7 @@ static noinline_for_stack char *translate_scan(struct _adapter *padapter,
 	iwe.cmd = SIOCGIWMODE;
 	memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs),
 		2);
-	cap = le16_to_cpu(cap);
+	le16_to_cpus(&cap);
 	if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
 		if (cap & WLAN_CAPABILITY_BSS)
 			iwe.u.mode = (u32)IW_MODE_MASTER;
-- 
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