aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/core.h6
-rw-r--r--include/sound/driver.h2
-rw-r--r--sound/core/memalloc.c3
-rw-r--r--sound/core/memory.c8
-rw-r--r--sound/core/seq/instr/ainstr_gf1.c3
-rw-r--r--sound/core/seq/instr/ainstr_iw.c8
-rw-r--r--sound/core/wrappers.c2
7 files changed, 18 insertions, 14 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 52fcc2f62b9f..38b357fc8958 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -290,12 +290,12 @@ void snd_memory_init(void);
290void snd_memory_done(void); 290void snd_memory_done(void);
291int snd_memory_info_init(void); 291int snd_memory_info_init(void);
292int snd_memory_info_done(void); 292int snd_memory_info_done(void);
293void *snd_hidden_kmalloc(size_t size, int flags); 293void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags);
294void *snd_hidden_kcalloc(size_t n, size_t size, int flags); 294void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags);
295void snd_hidden_kfree(const void *obj); 295void snd_hidden_kfree(const void *obj);
296void *snd_hidden_vmalloc(unsigned long size); 296void *snd_hidden_vmalloc(unsigned long size);
297void snd_hidden_vfree(void *obj); 297void snd_hidden_vfree(void *obj);
298char *snd_hidden_kstrdup(const char *s, int flags); 298char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags);
299#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags) 299#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
300#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags) 300#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
301#define kfree(obj) snd_hidden_kfree(obj) 301#define kfree(obj) snd_hidden_kfree(obj)
diff --git a/include/sound/driver.h b/include/sound/driver.h
index 948e9a1aebef..0d12456ec3ae 100644
--- a/include/sound/driver.h
+++ b/include/sound/driver.h
@@ -51,7 +51,7 @@
51#ifdef CONFIG_SND_DEBUG_MEMORY 51#ifdef CONFIG_SND_DEBUG_MEMORY
52#include <linux/slab.h> 52#include <linux/slab.h>
53#include <linux/vmalloc.h> 53#include <linux/vmalloc.h>
54void *snd_wrapper_kmalloc(size_t, int); 54void *snd_wrapper_kmalloc(size_t, unsigned int __nocast);
55#undef kmalloc 55#undef kmalloc
56void snd_wrapper_kfree(const void *); 56void snd_wrapper_kfree(const void *);
57#undef kfree 57#undef kfree
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index dbc23e35fa06..02132561c3f8 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -105,7 +105,8 @@ struct snd_mem_list {
105 */ 105 */
106 106
107static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size, 107static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
108 dma_addr_t *dma_handle, int flags) 108 dma_addr_t *dma_handle,
109 unsigned int __nocast flags)
109{ 110{
110 void *ret; 111 void *ret;
111 u64 dma_mask, coherent_dma_mask; 112 u64 dma_mask, coherent_dma_mask;
diff --git a/sound/core/memory.c b/sound/core/memory.c
index c1fb28e84330..f6895577bf86 100644
--- a/sound/core/memory.c
+++ b/sound/core/memory.c
@@ -89,7 +89,7 @@ void snd_memory_done(void)
89 } 89 }
90} 90}
91 91
92static void *__snd_kmalloc(size_t size, int flags, void *caller) 92static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *caller)
93{ 93{
94 unsigned long cpu_flags; 94 unsigned long cpu_flags;
95 struct snd_alloc_track *t; 95 struct snd_alloc_track *t;
@@ -111,12 +111,12 @@ static void *__snd_kmalloc(size_t size, int flags, void *caller)
111} 111}
112 112
113#define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0)); 113#define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0));
114void *snd_hidden_kmalloc(size_t size, int flags) 114void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags)
115{ 115{
116 return _snd_kmalloc(size, flags); 116 return _snd_kmalloc(size, flags);
117} 117}
118 118
119void *snd_hidden_kcalloc(size_t n, size_t size, int flags) 119void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags)
120{ 120{
121 void *ret = NULL; 121 void *ret = NULL;
122 if (n != 0 && size > INT_MAX / n) 122 if (n != 0 && size > INT_MAX / n)
@@ -184,7 +184,7 @@ void snd_hidden_vfree(void *obj)
184 snd_wrapper_vfree(obj); 184 snd_wrapper_vfree(obj);
185} 185}
186 186
187char *snd_hidden_kstrdup(const char *s, int flags) 187char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags)
188{ 188{
189 int len; 189 int len;
190 char *buf; 190 char *buf;
diff --git a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c
index 0779c41ca037..32e91c6b25fe 100644
--- a/sound/core/seq/instr/ainstr_gf1.c
+++ b/sound/core/seq/instr/ainstr_gf1.c
@@ -50,7 +50,8 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
50{ 50{
51 gf1_wave_t *wp, *prev; 51 gf1_wave_t *wp, *prev;
52 gf1_xwave_t xp; 52 gf1_xwave_t xp;
53 int err, gfp_mask; 53 int err;
54 unsigned int gfp_mask;
54 unsigned int real_size; 55 unsigned int real_size;
55 56
56 gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; 57 gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
diff --git a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c
index 39ff72b2aab3..2622b8679ca7 100644
--- a/sound/core/seq/instr/ainstr_iw.c
+++ b/sound/core/seq/instr/ainstr_iw.c
@@ -58,7 +58,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
58 iwffff_xenv_t *ex, 58 iwffff_xenv_t *ex,
59 char __user **data, 59 char __user **data,
60 long *len, 60 long *len,
61 int gfp_mask) 61 unsigned int __nocast gfp_mask)
62{ 62{
63 __u32 stype; 63 __u32 stype;
64 iwffff_env_record_t *rp, *rp_last; 64 iwffff_env_record_t *rp, *rp_last;
@@ -128,7 +128,8 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
128{ 128{
129 iwffff_wave_t *wp, *prev; 129 iwffff_wave_t *wp, *prev;
130 iwffff_xwave_t xp; 130 iwffff_xwave_t xp;
131 int err, gfp_mask; 131 int err;
132 unsigned int gfp_mask;
132 unsigned int real_size; 133 unsigned int real_size;
133 134
134 gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL; 135 gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
@@ -234,7 +235,8 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
234 iwffff_xinstrument_t ix; 235 iwffff_xinstrument_t ix;
235 iwffff_layer_t *lp, *prev_lp; 236 iwffff_layer_t *lp, *prev_lp;
236 iwffff_xlayer_t lx; 237 iwffff_xlayer_t lx;
237 int err, gfp_mask; 238 int err;
239 unsigned int gfp_mask;
238 240
239 if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) 241 if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
240 return -EINVAL; 242 return -EINVAL;
diff --git a/sound/core/wrappers.c b/sound/core/wrappers.c
index 9f393023c327..508e6d67ee19 100644
--- a/sound/core/wrappers.c
+++ b/sound/core/wrappers.c
@@ -27,7 +27,7 @@
27#include <linux/fs.h> 27#include <linux/fs.h>
28 28
29#ifdef CONFIG_SND_DEBUG_MEMORY 29#ifdef CONFIG_SND_DEBUG_MEMORY
30void *snd_wrapper_kmalloc(size_t size, int flags) 30void *snd_wrapper_kmalloc(size_t size, unsigned int __nocast flags)
31{ 31{
32 return kmalloc(size, flags); 32 return kmalloc(size, flags);
33} 33}