All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 05/17][trivial] drivers/message/, i2o: Remove unnecessary casts of void ptr returning alloc function return values
@ 2010-11-08 23:08 Jesper Juhl
  2011-01-19 14:25 ` Jiri Kosina
  0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2010-11-08 23:08 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial, Andrew Morton

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/message/


Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 i2o_config.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 7d3cc57..098de2b 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -1044,8 +1044,7 @@ static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
 
 static int cfg_open(struct inode *inode, struct file *file)
 {
-	struct i2o_cfg_info *tmp =
-	    (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info),
+	struct i2o_cfg_info *tmp = kmalloc(sizeof(struct i2o_cfg_info),
 					   GFP_KERNEL);
 	unsigned long flags;
 


-- 
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.


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 05/17][trivial] drivers/message/, i2o: Remove unnecessary casts of void ptr returning alloc function return values
  2010-11-08 23:08 [PATCH 05/17][trivial] drivers/message/, i2o: Remove unnecessary casts of void ptr returning alloc function return values Jesper Juhl
@ 2011-01-19 14:25 ` Jiri Kosina
  0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2011-01-19 14:25 UTC (permalink / raw)
  To: Jesper Juhl; +Cc: linux-kernel, Andrew Morton

On Tue, 9 Nov 2010, Jesper Juhl wrote:

> 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/message/
> 
> 
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
> ---
>  i2o_config.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
> index 7d3cc57..098de2b 100644
> --- a/drivers/message/i2o/i2o_config.c
> +++ b/drivers/message/i2o/i2o_config.c
> @@ -1044,8 +1044,7 @@ static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
>  
>  static int cfg_open(struct inode *inode, struct file *file)
>  {
> -	struct i2o_cfg_info *tmp =
> -	    (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info),
> +	struct i2o_cfg_info *tmp = kmalloc(sizeof(struct i2o_cfg_info),
>  					   GFP_KERNEL);
>  	unsigned long flags;

Not present in linux-next as of today. Applied, thanks Jesper.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-19 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-08 23:08 [PATCH 05/17][trivial] drivers/message/, i2o: Remove unnecessary casts of void ptr returning alloc function return values Jesper Juhl
2011-01-19 14:25 ` Jiri Kosina

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.