ath9k: fix ito64
authorMing Lei <tom.leiming@gmail.com>
Tue, 29 Dec 2009 14:57:28 +0000 (22:57 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Jan 2010 21:09:47 +0000 (16:09 -0500)
The unit of sizeof() is byte instead of bit, so fix it.
The patch can fix debug output of some dma_addr_t variables.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h

index e2cef2f..1597a42 100644 (file)
@@ -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))