All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Juhl <jj@chaosbits.net>
To: linux-kernel@vger.kernel.org
Cc: trivial@kernel.org, linux-media@vger.kernel.org,
	Jelle Foks <jelle@foks.us>, Gerd Knorr <kraxel@bytesex.org>,
	Steven Toth <stoth@linuxtv.org>
Subject: [PATCH 04/17][trivial] drivers/media/, cx231xx-417: Remove unnecessary casts of void ptr returning alloc function return values
Date: Tue, 9 Nov 2010 00:08:41 +0100 (CET)	[thread overview]
Message-ID: <alpine.LNX.2.00.1011082318590.23697@swampdragon.chaosbits.net> (raw)

Hi,

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 drivers/media/


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 cx231xx-417.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index aab21f3..42075dc 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -941,14 +941,14 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
 	u16 _buffer_size = 4096;
 	u8 *p_buffer;
 
-	p_current_fw = (u32 *)vmalloc(1884180*4);
+	p_current_fw = vmalloc(1884180*4);
 	p_fw = p_current_fw;
 	if (p_current_fw == 0) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;
 	}
 
-	p_buffer = (u8 *)vmalloc(4096);
+	p_buffer = vmalloc(4096);
 	if (p_buffer == 0) {
 		dprintk(2, "FAIL!!!\n");
 		return -1;



-- 
Jesper Juhl <jj@chaosbits.net>             http://www.chaosbits.net/
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.


                 reply	other threads:[~2010-11-08 23:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LNX.2.00.1011082318590.23697@swampdragon.chaosbits.net \
    --to=jj@chaosbits.net \
    --cc=jelle@foks.us \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=stoth@linuxtv.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.