All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wlan-ng: Fix sparse warnings about endianness
@ 2017-01-11  4:48 Eric Salem
  0 siblings, 0 replies; only message in thread
From: Eric Salem @ 2017-01-11  4:48 UTC (permalink / raw)
  To: gregkh, sergio.paracuellos, juliana.orod; +Cc: devel, linux-kernel

Fixed sparse warnings about endianness. E.g.:

warning: cast to restricted __le16

Signed-off-by: Eric Salem <ericsalem@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 60caf9c3..5f1851c 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -1388,13 +1388,13 @@ static inline int hfa384x_drvr_getconfig16(struct hfa384x *hw, u16 rid, void *va
 
 	result = hfa384x_drvr_getconfig(hw, rid, val, sizeof(u16));
 	if (result == 0)
-		*((u16 *)val) = le16_to_cpu(*((u16 *)val));
+		le16_to_cpus(val);
 	return result;
 }
 
 static inline int hfa384x_drvr_setconfig16(struct hfa384x *hw, u16 rid, u16 val)
 {
-	u16 value = cpu_to_le16(val);
+	__le16 value = cpu_to_le16(val);
 
 	return hfa384x_drvr_setconfig(hw, rid, &value, sizeof(value));
 }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-11  4:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-11  4:48 [PATCH] staging: wlan-ng: Fix sparse warnings about endianness Eric Salem

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.