diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-07-25 17:24:02 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-07-27 03:06:00 -0400 |
commit | 752089fea357b36ba9dd477db594bdc677110579 (patch) | |
tree | bbe0734748e3d30f9c8daf313bf3594de72e46ae /sound/pci/trident | |
parent | d3c637632da95d7646053c64b855641cd917960e (diff) |
ALSA: trident: Proper endian notations
The TLB entries in Trident driver are represented in little-endian,
hence they should be declared as __le32.
This patch fixes the sparse warnings like:
sound/pci/trident/trident_memory.c:226:17: warning: incorrect type in assignment (different base types)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/trident')
-rw-r--r-- | sound/pci/trident/trident.h | 2 | ||||
-rw-r--r-- | sound/pci/trident/trident_main.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/trident/trident.h b/sound/pci/trident/trident.h index 9624e5937719..2d62c1921255 100644 --- a/sound/pci/trident/trident.h +++ b/sound/pci/trident/trident.h | |||
@@ -264,7 +264,7 @@ struct snd_trident_memblk_arg { | |||
264 | }; | 264 | }; |
265 | 265 | ||
266 | struct snd_trident_tlb { | 266 | struct snd_trident_tlb { |
267 | unsigned int * entries; /* 16k-aligned TLB table */ | 267 | __le32 *entries; /* 16k-aligned TLB table */ |
268 | dma_addr_t entries_dmaaddr; /* 16k-aligned PCI address to TLB table */ | 268 | dma_addr_t entries_dmaaddr; /* 16k-aligned PCI address to TLB table */ |
269 | unsigned long * shadow_entries; /* shadow entries with virtual addresses */ | 269 | unsigned long * shadow_entries; /* shadow entries with virtual addresses */ |
270 | struct snd_dma_buffer buffer; | 270 | struct snd_dma_buffer buffer; |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 49c64fae3466..5523e193d556 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -3359,7 +3359,7 @@ static int snd_trident_tlb_alloc(struct snd_trident *trident) | |||
3359 | dev_err(trident->card->dev, "unable to allocate TLB buffer\n"); | 3359 | dev_err(trident->card->dev, "unable to allocate TLB buffer\n"); |
3360 | return -ENOMEM; | 3360 | return -ENOMEM; |
3361 | } | 3361 | } |
3362 | trident->tlb.entries = (unsigned int*)ALIGN((unsigned long)trident->tlb.buffer.area, SNDRV_TRIDENT_MAX_PAGES * 4); | 3362 | trident->tlb.entries = (__le32 *)ALIGN((unsigned long)trident->tlb.buffer.area, SNDRV_TRIDENT_MAX_PAGES * 4); |
3363 | trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4); | 3363 | trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4); |
3364 | /* allocate shadow TLB page table (virtual addresses) */ | 3364 | /* allocate shadow TLB page table (virtual addresses) */ |
3365 | trident->tlb.shadow_entries = | 3365 | trident->tlb.shadow_entries = |