Skip to contentSkip to conversation

ath9k: fix ito64

PATCH New tom.leiming at gmail.com 1 participant 1 message Dec 29, 2009 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: fix ito64

From: Ming Lei <[email protected]>

The unit of sizeof() is byte instead of bit, so fix it. The patch can fix debug output of some dma_addr_t variables.

---
 drivers/net/wireless/ath/ath9k/ath9k.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +3 -3
index e2cef2f..1597a42 100644
@@ -33,11 +33,11 @@ struct ath_node;
 
 /* Macro to expand scalars to 64-bit objects */
 
-#define	ito64(x) (sizeof(x) == 8) ?			\
+#define	ito64(x) (sizeof(x) == 1) ?			\
 	(((unsigned long long int)(x)) & (0xff)) :	\
-	(sizeof(x) == 16) ?				\
+	(sizeof(x) == 2) ?				\
 	(((unsigned long long int)(x)) & 0xffff) :	\
-	((sizeof(x) == 32) ?				\
+	((sizeof(x) == 4) ?				\
 	 (((unsigned long long int)(x)) & 0xffffffff) : \
 	 (unsigned long long int)(x))
 
Signature · 1 line
1.6.2.5