Skip to content

Commit

Permalink
ath9k: fix ito64
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ming Lei authored and John W. Linville committed Jan 4, 2010
1 parent 4ef2501 commit 13bda12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 13bda12

Please sign in to comment.