Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5357
b: refs/heads/master
c: 5a0f217
h: refs/heads/master
i:
  5355: 382775b
v: v3
  • Loading branch information
Victor Fusco authored and Jaroslav Kysela committed Jul 28, 2005
1 parent 0eb406c commit 9bbbef3
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 854af9578cb84e4ca3cb1551a6be40c4e81bb455
refs/heads/master: 5a0f217d96656068f0f1e5cda16c35945f979b16
6 changes: 3 additions & 3 deletions trunk/include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ void snd_memory_init(void);
void snd_memory_done(void);
int snd_memory_info_init(void);
int snd_memory_info_done(void);
void *snd_hidden_kmalloc(size_t size, int flags);
void *snd_hidden_kcalloc(size_t n, size_t size, int flags);
void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags);
void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags);
void snd_hidden_kfree(const void *obj);
void *snd_hidden_vmalloc(unsigned long size);
void snd_hidden_vfree(void *obj);
char *snd_hidden_kstrdup(const char *s, int flags);
char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags);
#define kmalloc(size, flags) snd_hidden_kmalloc(size, flags)
#define kcalloc(n, size, flags) snd_hidden_kcalloc(n, size, flags)
#define kfree(obj) snd_hidden_kfree(obj)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/sound/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#ifdef CONFIG_SND_DEBUG_MEMORY
#include <linux/slab.h>
#include <linux/vmalloc.h>
void *snd_wrapper_kmalloc(size_t, int);
void *snd_wrapper_kmalloc(size_t, unsigned int __nocast);
#undef kmalloc
void snd_wrapper_kfree(const void *);
#undef kfree
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/core/memalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ struct snd_mem_list {
*/

static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, int flags)
dma_addr_t *dma_handle,
unsigned int __nocast flags)
{
void *ret;
u64 dma_mask, coherent_dma_mask;
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/core/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void snd_memory_done(void)
}
}

static void *__snd_kmalloc(size_t size, int flags, void *caller)
static void *__snd_kmalloc(size_t size, unsigned int __nocast flags, void *caller)
{
unsigned long cpu_flags;
struct snd_alloc_track *t;
Expand All @@ -111,12 +111,12 @@ static void *__snd_kmalloc(size_t size, int flags, void *caller)
}

#define _snd_kmalloc(size, flags) __snd_kmalloc((size), (flags), __builtin_return_address(0));
void *snd_hidden_kmalloc(size_t size, int flags)
void *snd_hidden_kmalloc(size_t size, unsigned int __nocast flags)
{
return _snd_kmalloc(size, flags);
}

void *snd_hidden_kcalloc(size_t n, size_t size, int flags)
void *snd_hidden_kcalloc(size_t n, size_t size, unsigned int __nocast flags)
{
void *ret = NULL;
if (n != 0 && size > INT_MAX / n)
Expand Down Expand Up @@ -184,7 +184,7 @@ void snd_hidden_vfree(void *obj)
snd_wrapper_vfree(obj);
}

char *snd_hidden_kstrdup(const char *s, int flags)
char *snd_hidden_kstrdup(const char *s, unsigned int __nocast flags)
{
int len;
char *buf;
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/core/seq/instr/ainstr_gf1.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
{
gf1_wave_t *wp, *prev;
gf1_xwave_t xp;
int err, gfp_mask;
int err;
unsigned int gfp_mask;
unsigned int real_size;

gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
Expand Down
8 changes: 5 additions & 3 deletions trunk/sound/core/seq/instr/ainstr_iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
iwffff_xenv_t *ex,
char __user **data,
long *len,
int gfp_mask)
unsigned int __nocast gfp_mask)
{
__u32 stype;
iwffff_env_record_t *rp, *rp_last;
Expand Down Expand Up @@ -128,7 +128,8 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
{
iwffff_wave_t *wp, *prev;
iwffff_xwave_t xp;
int err, gfp_mask;
int err;
unsigned int gfp_mask;
unsigned int real_size;

gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;
Expand Down Expand Up @@ -234,7 +235,8 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
iwffff_xinstrument_t ix;
iwffff_layer_t *lp, *prev_lp;
iwffff_xlayer_t lx;
int err, gfp_mask;
int err;
unsigned int gfp_mask;

if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/core/wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <linux/fs.h>

#ifdef CONFIG_SND_DEBUG_MEMORY
void *snd_wrapper_kmalloc(size_t size, int flags)
void *snd_wrapper_kmalloc(size_t size, unsigned int __nocast flags)
{
return kmalloc(size, flags);
}
Expand Down

0 comments on commit 9bbbef3

Please sign in to comment.