summaryrefslogtreecommitdiffstats
path: root/sound/pci/mixart/mixart_hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-25 23:24:05 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-27 09:06:03 +0200
commit0e7ca66a97c3bbf0b7665010d1b1d6a8c8e3811e (patch)
tree53c3a4c66724321a65392f8a776e3ba502390a24 /sound/pci/mixart/mixart_hwdep.c
parentbe05e3de3a933156d472127f659d4473c461dcc5 (diff)
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.c')
-rw-r--r--sound/pci/mixart/mixart_hwdep.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c
index 5bfd3ac80db5..bc92758de82c 100644
--- a/sound/pci/mixart/mixart_hwdep.c
+++ b/sound/pci/mixart/mixart_hwdep.c
@@ -73,30 +73,30 @@ static int mixart_wait_nice_for_register_value(struct mixart_mgr *mgr,
*/
struct snd_mixart_elf32_ehdr {
u8 e_ident[16];
- u16 e_type;
- u16 e_machine;
- u32 e_version;
- u32 e_entry;
- u32 e_phoff;
- u32 e_shoff;
- u32 e_flags;
- u16 e_ehsize;
- u16 e_phentsize;
- u16 e_phnum;
- u16 e_shentsize;
- u16 e_shnum;
- u16 e_shstrndx;
+ __be16 e_type;
+ __be16 e_machine;
+ __be32 e_version;
+ __be32 e_entry;
+ __be32 e_phoff;
+ __be32 e_shoff;
+ __be32 e_flags;
+ __be16 e_ehsize;
+ __be16 e_phentsize;
+ __be16 e_phnum;
+ __be16 e_shentsize;
+ __be16 e_shnum;
+ __be16 e_shstrndx;
};
struct snd_mixart_elf32_phdr {
- u32 p_type;
- u32 p_offset;
- u32 p_vaddr;
- u32 p_paddr;
- u32 p_filesz;
- u32 p_memsz;
- u32 p_flags;
- u32 p_align;
+ __be32 p_type;
+ __be32 p_offset;
+ __be32 p_vaddr;
+ __be32 p_paddr;
+ __be32 p_filesz;
+ __be32 p_memsz;
+ __be32 p_flags;
+ __be32 p_align;
};
static int mixart_load_elf(struct mixart_mgr *mgr, const struct firmware *dsp )