mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
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>
This commit is contained in:
parent
f724bd240a
commit
ea7dd25125
@ -178,7 +178,7 @@ int MIDIbuf_open(int dev, struct file *file)
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
parms[dev].prech_timeout = MAX_SCHEDULE_TIMEOUT;
|
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)
|
if (midi_in_buf[dev] == NULL)
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ int MIDIbuf_open(int dev, struct file *file)
|
|||||||
}
|
}
|
||||||
midi_in_buf[dev]->len = midi_in_buf[dev]->head = midi_in_buf[dev]->tail = 0;
|
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)
|
if (midi_out_buf[dev] == NULL)
|
||||||
{
|
{
|
||||||
|
@ -859,7 +859,7 @@ static int pss_coproc_ioctl(void *dev_info, unsigned int cmd, void __user *arg,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case SNDCTL_COPR_LOAD:
|
case SNDCTL_COPR_LOAD:
|
||||||
buf = (copr_buffer *) vmalloc(sizeof(copr_buffer));
|
buf = vmalloc(sizeof(copr_buffer));
|
||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
if (copy_from_user(buf, arg, sizeof(copr_buffer))) {
|
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,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
case SNDCTL_COPR_SENDMSG:
|
case SNDCTL_COPR_SENDMSG:
|
||||||
mbuf = (copr_msg *)vmalloc(sizeof(copr_msg));
|
mbuf = vmalloc(sizeof(copr_msg));
|
||||||
if (mbuf == NULL)
|
if (mbuf == NULL)
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
if (copy_from_user(mbuf, arg, sizeof(copr_msg))) {
|
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,
|
|||||||
|
|
||||||
case SNDCTL_COPR_RCVMSG:
|
case SNDCTL_COPR_RCVMSG:
|
||||||
err = 0;
|
err = 0;
|
||||||
mbuf = (copr_msg *)vmalloc(sizeof(copr_msg));
|
mbuf = vmalloc(sizeof(copr_msg));
|
||||||
if (mbuf == NULL)
|
if (mbuf == NULL)
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
data = (unsigned short *)mbuf->data;
|
data = (unsigned short *)mbuf->data;
|
||||||
|
@ -1646,13 +1646,13 @@ void sequencer_init(void)
|
|||||||
{
|
{
|
||||||
if (sequencer_ok)
|
if (sequencer_ok)
|
||||||
return;
|
return;
|
||||||
queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ);
|
queue = vmalloc(SEQ_MAX_QUEUE * EV_SZ);
|
||||||
if (queue == NULL)
|
if (queue == NULL)
|
||||||
{
|
{
|
||||||
printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n");
|
printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
iqueue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * IEV_SZ);
|
iqueue = vmalloc(SEQ_MAX_QUEUE * IEV_SZ);
|
||||||
if (iqueue == NULL)
|
if (iqueue == NULL)
|
||||||
{
|
{
|
||||||
printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n");
|
printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user