* [PATCH] oss: Remove void casts
@ 2009-05-22 13:27 André Lopes
2009-05-26 0:20 ` Mark Asselstine
0 siblings, 1 reply; 2+ messages in thread
From: André Lopes @ 2009-05-22 13:27 UTC (permalink / raw)
To: kernel-janitors, linux-kernel, askulysh
This trivial patch just remove void cats from sound/oss/sh_dac_audio.c
Signed-off-by: André Lopes <andre.neo.net@gmail.com>
---
sound/oss/sh_dac_audio.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 78cfb66..7247ea1 100755
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -200,21 +200,21 @@ static ssize_t dac_audio_write(struct file
*file, const char *buf, size_t count,
if (count > free)
count = free;
if (buffer_begin > buffer_end) {
- if (copy_from_user((void *)buffer_end, buf, count))
+ if (copy_from_user(buffer_end, buf, count))
return -EFAULT;
buffer_end += count;
} else {
nbytes = data_buffer + BUFFER_SIZE - buffer_end;
if (nbytes > count) {
- if (copy_from_user((void *)buffer_end, buf, count))
+ if (copy_from_user(buffer_end, buf, count))
return -EFAULT;
buffer_end += count;
} else {
- if (copy_from_user((void *)buffer_end, buf, nbytes))
+ if (copy_from_user(buffer_end, buf, nbytes))
return -EFAULT;
if (copy_from_user
- ((void *)data_buffer, buf + nbytes, count - nbytes))
+ (data_buffer, buf + nbytes, count - nbytes))
return -EFAULT;
buffer_end = data_buffer + count - nbytes;
}
@@ -322,7 +322,7 @@ static void __exit dac_audio_exit(void)
free_irq(TIMER1_IRQ, 0);
unregister_sound_dsp(device_major);
- kfree((void *)data_buffer);
+ kfree(data_buffer);
}
module_init(dac_audio_init);
--
1.5.6.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] oss: Remove void casts
2009-05-22 13:27 [PATCH] oss: Remove void casts André Lopes
@ 2009-05-26 0:20 ` Mark Asselstine
0 siblings, 0 replies; 2+ messages in thread
From: Mark Asselstine @ 2009-05-26 0:20 UTC (permalink / raw)
To: André Lopes; +Cc: kernel-janitors, linux-kernel, askulysh
2009/5/22 André Lopes <andre.neo.net@gmail.com>:
> This trivial patch just remove void cats from sound/oss/sh_dac_audio.c
darn cats got out again :P
s/void cats/void pointer casts/
Regards,
Mark
>
> Signed-off-by: André Lopes <andre.neo.net@gmail.com>
>
> ---
> sound/oss/sh_dac_audio.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
> index 78cfb66..7247ea1 100755
> --- a/sound/oss/sh_dac_audio.c
> +++ b/sound/oss/sh_dac_audio.c
> @@ -200,21 +200,21 @@ static ssize_t dac_audio_write(struct file
> *file, const char *buf, size_t count,
> if (count > free)
> count = free;
> if (buffer_begin > buffer_end) {
> - if (copy_from_user((void *)buffer_end, buf, count))
> + if (copy_from_user(buffer_end, buf, count))
> return -EFAULT;
>
> buffer_end += count;
> } else {
> nbytes = data_buffer + BUFFER_SIZE - buffer_end;
> if (nbytes > count) {
> - if (copy_from_user((void *)buffer_end, buf, count))
> + if (copy_from_user(buffer_end, buf, count))
> return -EFAULT;
> buffer_end += count;
> } else {
> - if (copy_from_user((void *)buffer_end, buf, nbytes))
> + if (copy_from_user(buffer_end, buf, nbytes))
> return -EFAULT;
> if (copy_from_user
> - ((void *)data_buffer, buf + nbytes, count - nbytes))
> + (data_buffer, buf + nbytes, count - nbytes))
> return -EFAULT;
> buffer_end = data_buffer + count - nbytes;
> }
> @@ -322,7 +322,7 @@ static void __exit dac_audio_exit(void)
> free_irq(TIMER1_IRQ, 0);
>
> unregister_sound_dsp(device_major);
> - kfree((void *)data_buffer);
> + kfree(data_buffer);
> }
>
> module_init(dac_audio_init);
> --
> 1.5.6.5
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-26 0:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-22 13:27 [PATCH] oss: Remove void casts André Lopes
2009-05-26 0:20 ` Mark Asselstine
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®