sound: Removing useless casts
PATCH 2/4 sound: Removing useless casts
From: Panagiotis Issaris <[email protected]>
Removing useless casts
Signed-off-by Panagiotis Issaris <[email protected]>
--- sound/core/oss/mixer_oss.c | 2 +- sound/oss/gus_wave.c | 2 +- sound/oss/midibuf.c | 4 ++-- sound/oss/msnd.c | 2 +- sound/oss/pss.c | 6 +++--- sound/oss/sequencer.c | 4 ++-- sound/oss/sscape.c | 2 +- sound/pci/emu10k1/emu10k1_main.c | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-)
sound/core/oss/mixer_oss.c +1 -1
@@ -1023,7 +1023,7 @@ static int snd_mixer_oss_build_input(str }up_read (&mixer->card->controls_rwsem);if (slot.present !=0 ) { - pslot = (struct slot *)kmalloc (sizeof (slot),GFP_KERNEL ); + pslot =kmalloc (sizeof (slot),GFP_KERNEL );if (! pslot)return -ENOMEM ; *pslot = slot;
sound/oss/gus_wave.c +1 -1
@@ -3026,7 +3026,7 @@ #endif (int) gus_mem_size / 1024); - samples = (struct patch_info *)vmalloc ((MAX_SAMPLE +1 ) *sizeof (*samples)); + samples =vmalloc ((MAX_SAMPLE +1 ) *sizeof (*samples));if (samples ==NULL ) {printk (KERN_WARNING "gus_init: Cant allocate memory for instrument tables\n" );
sound/oss/midibuf.c +2 -2
@@ -177,7 +177,7 @@ int MIDIbuf_open(int dev, struct file *freturn err; parms[dev].prech_timeout =MAX_SCHEDULE_TIMEOUT ; - midi_in_buf[dev] = (struct midi_buf *)vmalloc (sizeof (struct midi_buf )); + midi_in_buf[dev] =vmalloc (sizeof (struct midi_buf ));if (midi_in_buf[dev] ==NULL ) {
@@ -187,7 +187,7 @@ int MIDIbuf_open(int dev, struct file *f } midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail =0 ; - midi_out_buf[dev] = (struct midi_buf *)vmalloc (sizeof (struct midi_buf )); + midi_out_buf[dev] =vmalloc (sizeof (struct midi_buf ));if (midi_out_buf[dev] ==NULL ) {
sound/oss/msnd.c +1 -1
@@ -102,7 +102,7 @@ void msnd_fifo_free(msnd_fifo *f)int msnd_fifo_alloc (msnd_fifo *f,size_t n) {msnd_fifo_free (f); - f->data = (char *)vmalloc (n); + f->data =vmalloc (n); f->n = n; f->tail =0 ; f->head =0 ;
sound/oss/pss.c +3 -3
@@ -872,7 +872,7 @@ static int pss_coproc_ioctl(void *dev_inreturn 0 ;case SNDCTL_COPR_LOAD : - buf = (copr_buffer *)vmalloc (sizeof (copr_buffer)); + buf =vmalloc (sizeof (*buf));if (buf ==NULL )return -ENOSPC ;if (copy_from_user (buf, arg,sizeof (copr_buffer))) {
@@ -884,7 +884,7 @@ static int pss_coproc_ioctl(void *dev_inreturn err;case SNDCTL_COPR_SENDMSG : - mbuf = (copr_msg *)vmalloc (sizeof (copr_msg)); + mbuf =vmalloc (sizeof (copr_msg));if (mbuf ==NULL )return -ENOSPC ;if (copy_from_user (mbuf, arg,sizeof (copr_msg))) {
@@ -908,7 +908,7 @@ static int pss_coproc_ioctl(void *dev_incase SNDCTL_COPR_RCVMSG : err =0 ; - mbuf = (copr_msg *)vmalloc (sizeof (copr_msg)); + mbuf =vmalloc (sizeof (copr_msg));if (mbuf ==NULL )return -ENOSPC ; data = (unsigned short *)mbuf->data;
sound/oss/sequencer.c +2 -2
@@ -1653,13 +1653,13 @@ void sequencer_init(void)if (sequencer_ok)return ;MIDIbuf_init (); - queue = (unsigned char *)vmalloc (SEQ_MAX_QUEUE *EV_SZ ); + queue =vmalloc (SEQ_MAX_QUEUE *EV_SZ );if (queue ==NULL ) {printk (KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n" );return ; } - iqueue = (unsigned char *)vmalloc (SEQ_MAX_QUEUE *IEV_SZ ); + iqueue =vmalloc (SEQ_MAX_QUEUE *IEV_SZ );if (iqueue ==NULL ) {printk (KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n" );
sound/oss/sscape.c +1 -1
@@ -572,7 +572,7 @@ static int sscape_coproc_ioctl(void *devreturn 0 ;case SNDCTL_COPR_LOAD : - buf = (copr_buffer *)vmalloc (sizeof (copr_buffer)); + buf =vmalloc (sizeof (*buf));if (buf ==NULL )return -ENOSPC ;if (copy_from_user (buf, arg,sizeof (copr_buffer)))
sound/pci/emu10k1/emu10k1_main.c +2 -2
@@ -1246,8 +1246,8 @@ int __devinit snd_emu10k1_create(struct goto error; } - emu->page_ptr_table = (void **)vmalloc (emu->max_cache_pages *sizeof (void *)); - emu->page_addr_table = (unsigned long *)vmalloc (emu->max_cache_pages *sizeof (unsigned long )); + emu->page_ptr_table =vmalloc (emu->max_cache_pages *sizeof (void *)); + emu->page_addr_table =vmalloc (emu->max_cache_pages *sizeof (unsigned long ));if (emu->page_ptr_table ==NULL || emu->page_addr_table ==NULL ) { err = -ENOMEM ; goto error;
Signature · 1 line
1.4.2.rc1.ge7a0-dirty