lkml.org 
[lkml]   [2013]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH staging] dgnc: remove useless cast on kzalloc()
On Thu, Sep 26, 2013 at 09:27:57AM -0700, Greg KH wrote:
> On Thu, Sep 26, 2013 at 10:12:23AM +0800, Fengguang Wu wrote:
> > drivers/staging/dgnc/dgnc_driver.c:510:3-7: WARNING: casting value returned by k[cmz]alloc to (char *) is useless.
> > drivers/staging/dgnc/dgnc_driver.c:502:2-19: WARNING: casting value returned by k[cmz]alloc to (struct dgnc_board *) is useless.
> >
> > Casting (void *) value returned by kmalloc is useless
> > as mentioned in Documentation/CodingStyle, Chap 14.
> >
> > Generated by: coccinelle/api/alloc/drop_kmalloc_cast.cocci
> >
> > CC: Lidza Louina <lidza.louina@gmail.com>
> > CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > ---
> >
> > drivers/staging/dgnc/dgnc_driver.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> As Jingoo sent this a few minutes before you did, and also cleaned up
> another cast that you missed, I've added your signed-off-by to his
> patch, as they were the same (although yours didn't apply and his
> did...)

That'd be good, thanks!

Regards,
Fengguang


\
 
 \ /
  Last update: 2013-09-27 07:21    [W:0.059 / U:55.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site