blob: 2be0c21b6388c7a8d9bd440b4e517410969e5b69 [file] [log] [blame]
From 90a6bb909b4bea327567711a7655b15d23ed0270 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <>
Date: Sun, 5 Jan 2020 15:48:23 +0100
Subject: [PATCH] ALSA: sh: Fix compile warning wrt const
commit f1dd4795b1523fbca7ab4344dd5a8bb439cc770d upstream.
A long-standing compile warning was seen during build test:
sound/sh/aica.c: In function 'load_aica_firmware':
sound/sh/aica.c:521:25: warning: passing argument 2 of 'spu_memload' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
Fixes: 198de43d758c ("[ALSA] Add ALSA support for the SEGA Dreamcast PCM device")
Signed-off-by: Takashi Iwai <>
Signed-off-by: Paul Gortmaker <>
diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index 52e9cfb4f819..8421b2f9c9f3 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -101,10 +101,10 @@ static void spu_memset(u32 toi, u32 what, int length)
/* spu_memload - write to SPU address space */
-static void spu_memload(u32 toi, void *from, int length)
+static void spu_memload(u32 toi, const void *from, int length)
unsigned long flags;
- u32 *froml = from;
+ const u32 *froml = from;
u32 __iomem *to = (u32 __iomem *) (SPU_MEMORY_BASE + toi);
int i;
u32 val;