Skip to content

Commit 85cb905

Browse files
committed
ALSA: echoaduio: Drop superfluous volatile modifier
The dsp_registers field of struct echoaduio has the volatile modifier, but it's basically superfluous; the field is accessed only for the base pointer of readl() and writel(), hence marking with __iomem alone should suffice. OTOH, having the volatile prefix causes a compile warning like: sound/pci/echoaudio/echoaudio.c:1878:14: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] So it's better to drop this superfluous modifier. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 34dedd2 commit 85cb905

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

sound/pci/echoaudio/echoaudio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,8 +1950,7 @@ static int snd_echo_create(struct snd_card *card,
19501950
snd_echo_free(chip);
19511951
return -EBUSY;
19521952
}
1953-
chip->dsp_registers = (volatile u32 __iomem *)
1954-
ioremap(chip->dsp_registers_phys, sz);
1953+
chip->dsp_registers = ioremap(chip->dsp_registers_phys, sz);
19551954
if (!chip->dsp_registers) {
19561955
dev_err(chip->card->dev, "ioremap failed\n");
19571956
snd_echo_free(chip);

sound/pci/echoaudio/echoaudio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ struct echoaudio {
419419
short asic_code; /* Current ASIC code */
420420
u32 comm_page_phys; /* Physical address of the
421421
* memory seen by DSP */
422-
volatile u32 __iomem *dsp_registers; /* DSP's register base */
422+
u32 __iomem *dsp_registers; /* DSP's register base */
423423
u32 active_mask; /* Chs. active mask or
424424
* punks out */
425425
#ifdef CONFIG_PM_SLEEP

0 commit comments

Comments
 (0)