diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-07-25 23:24:05 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-07-27 09:06:03 +0200 |
commit | 0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e (patch) | |
tree | 53c3a4c66724321a65392f8a776e3ba502390a24 /sound/pci/mixart/mixart_hwdep.h | |
parent | ALSA: riptide: Properly endian notations (diff) | |
download | linux-0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e.tar.xz linux-0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e.zip |
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.h | 8 |
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)) |