summaryrefslogtreecommitdiff
path: root/sound/pci/mixart/mixart_hwdep.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-26 00:24:05 +0300
committerTakashi Iwai <tiwai@suse.de>2018-07-27 10:06:03 +0300
commit0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e (patch)
tree53c3a4c66724321a65392f8a776e3ba502390a24 /sound/pci/mixart/mixart_hwdep.h
parentbe05e3de3a933156d472127f659d4473c461dcc5 (diff)
downloadlinux-0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e.tar.xz
ALSA: mixart: Proper endian notations
The miXart driver deals with big-endian values as raw data, while it declares most of variables as u32. This leads to sparse warnings like sound/pci/mixart/mixart.c:1203:23: warning: cast to restricted __be32 Fix them by properly defining the structs and add the explicit cast to macros. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/mixart/mixart_hwdep.h')
-rw-r--r--sound/pci/mixart/mixart_hwdep.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/mixart/mixart_hwdep.h b/sound/pci/mixart/mixart_hwdep.h
index 812e288ef2e7..2794cd385b8e 100644
--- a/sound/pci/mixart/mixart_hwdep.h
+++ b/sound/pci/mixart/mixart_hwdep.h
@@ -26,19 +26,19 @@
#include <sound/hwdep.h>
#ifndef readl_be
-#define readl_be(x) be32_to_cpu(__raw_readl(x))
+#define readl_be(x) be32_to_cpu((__force __be32)__raw_readl(x))
#endif
#ifndef writel_be
-#define writel_be(data,addr) __raw_writel(cpu_to_be32(data),addr)
+#define writel_be(data,addr) __raw_writel((__force u32)cpu_to_be32(data),addr)
#endif
#ifndef readl_le
-#define readl_le(x) le32_to_cpu(__raw_readl(x))
+#define readl_le(x) le32_to_cpu((__force __le32)__raw_readl(x))
#endif
#ifndef writel_le
-#define writel_le(data,addr) __raw_writel(cpu_to_le32(data),addr)
+#define writel_le(data,addr) __raw_writel((__force u32)cpu_to_le32(data),addr)
#endif
#define MIXART_MEM(mgr,x) ((mgr)->mem[0].virt + (x))