From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753879Ab3IZQ17 (ORCPT ); Thu, 26 Sep 2013 12:27:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58388 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752771Ab3IZQ16 (ORCPT ); Thu, 26 Sep 2013 12:27:58 -0400 Date: Thu, 26 Sep 2013 09:27:57 -0700 From: Greg Kroah-Hartman To: Fengguang Wu Cc: Lidza Louina , kbuild-all@01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH staging] dgnc: remove useless cast on kzalloc() Message-ID: <20130926162757.GA10468@kroah.com> References: <20130926021223.GB10435@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130926021223.GB10435@localhost> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > CC: Greg Kroah-Hartman > Signed-off-by: Fengguang Wu > --- > > 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...) thanks, greg k-h