On Friday 24 August 2007 02:20:04 Jesper Juhl wrote:
> Since kzalloc() returns a void pointer, we don't need to cast the
> return value in drivers/media/video/ivtv/ivtv-queue.c
>
> Signed-off-by: Jesper Juhl <[email protected]>
Jesper,
Thanks for the patch. I've applied it to my latest tree and will ask
Mauro to pull from it. The latest source is a bit different and has in
fact a third cast which I've also removed.
Thanks,
Hans
> ---
> drivers/media/video/ivtv/ivtv-queue.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/video/ivtv/ivtv-queue.c
> b/drivers/media/video/ivtv/ivtv-queue.c index a04f938..45825b8 100644
> --- a/drivers/media/video/ivtv/ivtv-queue.c
> +++ b/drivers/media/video/ivtv/ivtv-queue.c
> @@ -196,7 +196,7 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
> s->name, s->buffers, s->buf_size, s->buffers * s->buf_size /
> 1024);
>
> if (ivtv_might_use_pio(s)) {
> - s->PIOarray = (struct ivtv_SG_element *)kzalloc(SGsize,
> GFP_KERNEL); + s->PIOarray = kzalloc(SGsize, GFP_KERNEL);
> if (s->PIOarray == NULL) {
> IVTV_ERR("Could not allocate PIOarray for %s stream\n", s->name);
> return -ENOMEM;
> @@ -204,7 +204,7 @@ int ivtv_stream_alloc(struct ivtv_stream *s)
> }
>
> /* Allocate DMA SG Arrays */
> - s->SGarray = (struct ivtv_SG_element *)kzalloc(SGsize, GFP_KERNEL);
> + s->SGarray = kzalloc(SGsize, GFP_KERNEL);
> if (s->SGarray == NULL) {
> IVTV_ERR("Could not allocate SGarray for %s stream\n", s->name);
> if (ivtv_might_use_pio(s)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]