Fix compiler warning on some big-endian systems
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Fri, 26 Jun 2009 01:31:05 +0000 (01:31 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Fri, 26 Jun 2009 01:31:05 +0000 (01:31 +0000)
Don't assume that both iowrite32() and iowrite32be() return values in
the _OS_REG_WRITE definition.  _OS_REG_WRITE discards the value anyway.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4061 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath_hal/ah_osdep.h

index d7027516f4289194fcd552793682ec47a3ccb7a3..d515a872e3c3ca678b5dc561de00d1b19ab195fa 100644 (file)
@@ -184,8 +184,9 @@ struct ath_hal_rf *const *ah_rfs_ptrs[] = {                 \
                           (0x7000 <= (__reg) && (__reg) < 0x8000))
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
 #  define _OS_REG_WRITE(_ah, _reg, _val) do {                  \
-        is_reg_le(_reg) ?                                      \
-         iowrite32((_val), (_ah)->ah_sh + (_reg)) :            \
+        if (is_reg_le(_reg))                                   \
+         iowrite32((_val), (_ah)->ah_sh + (_reg));             \
+        else                                                   \
          iowrite32be((_val), (_ah)->ah_sh + (_reg));           \
        } while (0)
 #  define _OS_REG_READ(_ah, _reg)                              \