Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver

2007-08-31 Thread Herbert Xu
Jesper Juhl [EMAIL PROTECTED] wrote: On 30/08/2007, Daniel Drake [EMAIL PROTECTED] wrote: Jesper Juhl wrote: Since kmalloc() returns a void pointer there is no reason to cast its return value. This patch also removes a pointless initialization of a variable. NAK: adds a sparse warning

Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver

2007-08-30 Thread Daniel Drake
Jesper Juhl wrote: Since kmalloc() returns a void pointer there is no reason to cast its return value. This patch also removes a pointless initialization of a variable. NAK: adds a sparse warning zd_chip.c:116:15: warning: implicit cast to nocast type Signed-off-by: Jesper Juhl [EMAIL

Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver

2007-08-30 Thread Jesper Juhl
On 30/08/2007, Daniel Drake [EMAIL PROTECTED] wrote: Jesper Juhl wrote: Since kmalloc() returns a void pointer there is no reason to cast its return value. This patch also removes a pointless initialization of a variable. NAK: adds a sparse warning zd_chip.c:116:15: warning: implicit

Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver

2007-08-30 Thread Joe Perches
On Thu, 2007-08-30 at 22:20 +0200, Jesper Juhl wrote: Ok, I must admit I didn't check with sparse since it seemed pointless - we usually never cast void pointers to other pointer types, specifically because the C language nicely guarantees that the right thing will happen without the cast.

[PATCH] Don't needlessly initialize variable to NULL in zd_chip (was: Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver)

2007-08-30 Thread Jesper Juhl
On Friday 31 August 2007 00:19:53 Joe Perches wrote: On Thu, 2007-08-30 at 22:20 +0200, Jesper Juhl wrote: Ok, I must admit I didn't check with sparse since it seemed pointless - we usually never cast void pointers to other pointer types, specifically because the C language nicely

Re: [PATCH] Don't needlessly initialize variable to NULL in zd_chip (was: Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver)

2007-08-30 Thread Jesper Juhl
On 31/08/2007, Randy Dunlap [EMAIL PROTECTED] wrote: ... BTW: http://marc.info/?l=linux-wirelessm=118831813500769w=2 ... Heh, thanks Randy. All too often patches get missed since I don't happen to include the right magic person to Cc. So I generally take a better to have one Cc too many than

Re: [PATCH 13/30] net: Don't do pointless kmalloc return value casts in zd1211 driver

2007-08-30 Thread Daniel Drake
Jesper Juhl wrote: What would be wrong in applying my patch that removes the cast of the kmalloc() return value and then also remove the __nocast here? We use it as a safety measure when coding. For example the write register function takes an address and a value. We got one of these the