From patchwork Fri Aug 14 03:57:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Davidlohr Bueso X-Patchwork-Id: 31372 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 02EF7B7067 for ; Fri, 14 Aug 2009 13:58:14 +1000 (EST) Received: by ozlabs.org (Postfix) id EC24EDDD04; Fri, 14 Aug 2009 13:58:13 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 7C9C2DDD01 for ; Fri, 14 Aug 2009 13:58:13 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755753AbZHND5e (ORCPT ); Thu, 13 Aug 2009 23:57:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755689AbZHND5e (ORCPT ); Thu, 13 Aug 2009 23:57:34 -0400 Received: from fencepost.gnu.org ([140.186.70.10]:59027 "EHLO fencepost.gnu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754520AbZHND5d (ORCPT ); Thu, 13 Aug 2009 23:57:33 -0400 Received: from dave by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Mbnv3-0007r3-IT; Thu, 13 Aug 2009 23:57:33 -0400 Date: Thu, 13 Aug 2009 23:57:33 -0400 From: Davidlohr Bueso To: David Miller Cc: ram.vepa@neterion.com, santosh.rastapur@neterion.com, sivakumar.subramani@neterion.com, sreenivasa.honnur@neterion.com, anil.murthy@neterion.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] s2io: Remove unnecessary casts Message-ID: <20090814035733.GA29707@fencepost.gnu.org> References: <20090814020328.GA21588@fencepost.gnu.org> <20090813.201452.21119996.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090813.201452.21119996.davem@davemloft.net> User-Agent: Mutt/1.5.11 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Aug 13, 2009 at 08:14:52PM -0700, David Miller wrote: > From: Davidlohr Bueso > Date: Thu, 13 Aug 2009 22:03:28 -0400 > > > > > No need to cast kmalloc. > > > > Signed-off-by: Davidlohr Bueso > > Yeah but: > > > > > - ba->ba_0_org = (void *) kmalloc > > - (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL); > > + ba->ba_0_org = kmalloc(BUF0_LEN + ALIGN_SIZE, GFP_KERNEL); > > Now the code line extends way over 80 columns. Ok, resubmitting and verified by checkpatch.pl Thanks. Signed-off-by: Davidlohr Bueso --- drivers/net/s2io.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 458daa0..2bc62d3 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -870,8 +870,10 @@ static int init_shared_mem(struct s2io_nic *nic) while (k != rxd_count[nic->rxd_mode]) { ba = &mac_control->rings[i].ba[j][k]; - ba->ba_0_org = (void *) kmalloc - (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL); + ba->ba_0_org = kmalloc + (BUF0_LEN + ALIGN_SIZE, + GFP_KERNEL); + if (!ba->ba_0_org) return -ENOMEM; mem_allocated += @@ -881,8 +883,10 @@ static int init_shared_mem(struct s2io_nic *nic) tmp &= ~((unsigned long) ALIGN_SIZE); ba->ba_0 = (void *) tmp; - ba->ba_1_org = (void *) kmalloc - (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL); + ba->ba_1_org = kmalloc + (BUF1_LEN + ALIGN_SIZE, + GFP_KERNEL); + if (!ba->ba_1_org) return -ENOMEM; mem_allocated