aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2016-06-21 14:18:32 -0400
committerTakashi Iwai <tiwai@suse.de>2016-06-22 09:19:10 -0400
commitc9058d43d99404986133112393be1d1a4daf1b69 (patch)
treefe48523f12cd18181fa3b39a1a5cdcd53b3b96f8 /sound/pci/hda
parent8198868f0a283eb23e264951632ce61ec2f82228 (diff)
ALSA: hda/tegra: iomem fixups for sparse warnings
The readl/writel are not being passed __iomem annotated variables, so fix the following sparse warnings by adding __iomem in: sound/pci/hda/hda_tegra.c:120:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:120:9: expected void volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:120:9: got unsigned int [usertype] *addr sound/pci/hda/hda_tegra.c:125:16: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:125:16: expected void const volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:125:16: got unsigned int [usertype] *addr sound/pci/hda/hda_tegra.c:134:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:134:13: expected void const volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:134:13: got void *dword_addr sound/pci/hda/hda_tegra.c:137:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:137:9: expected void volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:137:9: got void *dword_addr sound/pci/hda/hda_tegra.c:146:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:146:13: expected void const volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:146:13: got void *dword_addr sound/pci/hda/hda_tegra.c:156:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:156:13: expected void const volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:156:13: got void *dword_addr sound/pci/hda/hda_tegra.c:159:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:159:9: expected void volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:159:9: got void *dword_addr sound/pci/hda/hda_tegra.c:168:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:168:13: expected void const volatile [noderef] <asn:2>*addr sound/pci/hda/hda_tegra.c:168:13: got void *dword_addr sound/pci/hda/hda_tegra.c:173:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:173:23: expected void ( *reg_writel )( ... ) sound/pci/hda/hda_tegra.c:173:23: got void ( static [toplevel] *<noident> )( ... ) sound/pci/hda/hda_tegra.c:174:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:174:22: expected unsigned int ( *reg_readl )( ... ) sound/pci/hda/hda_tegra.c:174:22: got unsigned int ( static [toplevel] *<noident> )( ... ) sound/pci/hda/hda_tegra.c:175:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:175:23: expected void ( *reg_writew )( ... ) sound/pci/hda/hda_tegra.c:175:23: got void ( static [toplevel] *<noident> )( ... ) sound/pci/hda/hda_tegra.c:176:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:176:22: expected unsigned short ( *reg_readw )( ... ) sound/pci/hda/hda_tegra.c:176:22: got unsigned short ( static [toplevel] *<noident> )( ... ) sound/pci/hda/hda_tegra.c:177:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:177:23: expected void ( *reg_writeb )( ... ) sound/pci/hda/hda_tegra.c:177:23: got void ( static [toplevel] *<noident> )( ... ) sound/pci/hda/hda_tegra.c:178:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:178:22: expected unsigned char ( *reg_readb )( ... ) sound/pci/hda/hda_tegra.c:178:22: got unsigned char ( static [toplevel] *<noident> )( ... ) Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 17fd81736d3d..0621920f7617 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -115,20 +115,20 @@ static int substream_free_pages(struct azx *chip,
115/* 115/*
116 * Register access ops. Tegra HDA register access is DWORD only. 116 * Register access ops. Tegra HDA register access is DWORD only.
117 */ 117 */
118static void hda_tegra_writel(u32 value, u32 *addr) 118static void hda_tegra_writel(u32 value, u32 __iomem *addr)
119{ 119{
120 writel(value, addr); 120 writel(value, addr);
121} 121}
122 122
123static u32 hda_tegra_readl(u32 *addr) 123static u32 hda_tegra_readl(u32 __iomem *addr)
124{ 124{
125 return readl(addr); 125 return readl(addr);
126} 126}
127 127
128static void hda_tegra_writew(u16 value, u16 *addr) 128static void hda_tegra_writew(u16 value, u16 __iomem *addr)
129{ 129{
130 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3; 130 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
131 void *dword_addr = (void *)((unsigned long)(addr) & ~0x3); 131 void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
132 u32 v; 132 u32 v;
133 133
134 v = readl(dword_addr); 134 v = readl(dword_addr);
@@ -137,20 +137,20 @@ static void hda_tegra_writew(u16 value, u16 *addr)
137 writel(v, dword_addr); 137 writel(v, dword_addr);
138} 138}
139 139
140static u16 hda_tegra_readw(u16 *addr) 140static u16 hda_tegra_readw(u16 __iomem *addr)
141{ 141{
142 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3; 142 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
143 void *dword_addr = (void *)((unsigned long)(addr) & ~0x3); 143 void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
144 u32 v; 144 u32 v;
145 145
146 v = readl(dword_addr); 146 v = readl(dword_addr);
147 return (v >> shift) & 0xffff; 147 return (v >> shift) & 0xffff;
148} 148}
149 149
150static void hda_tegra_writeb(u8 value, u8 *addr) 150static void hda_tegra_writeb(u8 value, u8 __iomem *addr)
151{ 151{
152 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3; 152 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
153 void *dword_addr = (void *)((unsigned long)(addr) & ~0x3); 153 void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
154 u32 v; 154 u32 v;
155 155
156 v = readl(dword_addr); 156 v = readl(dword_addr);
@@ -159,10 +159,10 @@ static void hda_tegra_writeb(u8 value, u8 *addr)
159 writel(v, dword_addr); 159 writel(v, dword_addr);
160} 160}
161 161
162static u8 hda_tegra_readb(u8 *addr) 162static u8 hda_tegra_readb(u8 __iomem *addr)
163{ 163{
164 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3; 164 unsigned int shift = ((unsigned long)(addr) & 0x3) << 3;
165 void *dword_addr = (void *)((unsigned long)(addr) & ~0x3); 165 void __iomem *dword_addr = (void __iomem *)((unsigned long)(addr) & ~0x3);
166 u32 v; 166 u32 v;
167 167
168 v = readl(dword_addr); 168 v = readl(dword_addr);