aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2010-11-08 18:11:03 -0500
committerTakashi Iwai <tiwai@suse.de>2010-11-10 19:59:04 -0500
commitea7dd251251a8d4694e9929104209dcc06220630 (patch)
tree3f689266a5591a94caf4c39243f6a100807e4a47 /sound
parentf724bd240adef304e222590826cb0c17d6168b68 (diff)
sound/oss: Remove unnecessary casts of void ptr
The [vk][cmz]alloc(_node) family of functions return void pointers which it's completely unnecessary/pointless to cast to other pointer types since that happens implicitly. This patch removes such casts from sound/oss/ Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/midibuf.c4
-rw-r--r--sound/oss/pss.c6
-rw-r--r--sound/oss/sequencer.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/sound/oss/midibuf.c b/sound/oss/midibuf.c
index 782b3b84dac..ceedb1eff20 100644
--- a/sound/oss/midibuf.c
+++ b/sound/oss/midibuf.c
@@ -178,7 +178,7 @@ int MIDIbuf_open(int dev, struct file *file)
178 return err; 178 return err;
179 179
180 parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT; 180 parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT;
181 midi_in_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); 181 midi_in_buf[dev] = vmalloc(sizeof(struct midi_buf));
182 182
183 if (midi_in_buf[dev] == NULL) 183 if (midi_in_buf[dev] == NULL)
184 { 184 {
@@ -188,7 +188,7 @@ int MIDIbuf_open(int dev, struct file *file)
188 } 188 }
189 midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0; 189 midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0;
190 190
191 midi_out_buf[dev] = (struct midi_buf *) vmalloc(sizeof(struct midi_buf)); 191 midi_out_buf[dev] = vmalloc(sizeof(struct midi_buf));
192 192
193 if (midi_out_buf[dev] == NULL) 193 if (midi_out_buf[dev] == NULL)
194 { 194 {
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index e19dd5dcc2d..9b800ce5100 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -859,7 +859,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg,
859 return 0; 859 return 0;
860 860
861 case SNDCTL_COPR_LOAD: 861 case SNDCTL_COPR_LOAD:
862 buf = (copr_buffer *) vmalloc(sizeof(copr_buffer)); 862 buf = vmalloc(sizeof(copr_buffer));
863 if (buf == NULL) 863 if (buf == NULL)
864 return -ENOSPC; 864 return -ENOSPC;
865 if (copy_from_user(buf, arg, sizeof(copr_buffer))) { 865 if (copy_from_user(buf, arg, sizeof(copr_buffer))) {
@@ -871,7 +871,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg,
871 return err; 871 return err;
872 872
873 case SNDCTL_COPR_SENDMSG: 873 case SNDCTL_COPR_SENDMSG:
874 mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); 874 mbuf = vmalloc(sizeof(copr_msg));
875 if (mbuf == NULL) 875 if (mbuf == NULL)
876 return -ENOSPC; 876 return -ENOSPC;
877 if (copy_from_user(mbuf, arg, sizeof(copr_msg))) { 877 if (copy_from_user(mbuf, arg, sizeof(copr_msg))) {
@@ -895,7 +895,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg,
895 895
896 case SNDCTL_COPR_RCVMSG: 896 case SNDCTL_COPR_RCVMSG:
897 err = 0; 897 err = 0;
898 mbuf = (copr_msg *)vmalloc(sizeof(copr_msg)); 898 mbuf = vmalloc(sizeof(copr_msg));
899 if (mbuf == NULL) 899 if (mbuf == NULL)
900 return -ENOSPC; 900 return -ENOSPC;
901 data = (unsigned short *)mbuf->data; 901 data = (unsigned short *)mbuf->data;
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index e85789e5381..5ea1098ac42 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -1646,13 +1646,13 @@ void sequencer_init(void)
1646{ 1646{
1647 if (sequencer_ok) 1647 if (sequencer_ok)
1648 return; 1648 return;
1649 queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ); 1649 queue = vmalloc(SEQ_MAX_QUEUE * EV_SZ);
1650 if (queue == NULL) 1650 if (queue == NULL)
1651 { 1651 {
1652 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n"); 1652 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n");
1653 return; 1653 return;
1654 } 1654 }
1655 iqueue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * IEV_SZ); 1655 iqueue = vmalloc(SEQ_MAX_QUEUE * IEV_SZ);
1656 if (iqueue == NULL) 1656 if (iqueue == NULL)
1657 { 1657 {
1658 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n"); 1658 printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n");