From patchwork Fri Feb 1 09:07:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianhua Xie X-Patchwork-Id: 217387 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id AD0662C03B6 for ; Fri, 1 Feb 2013 20:08:02 +1100 (EST) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe003.messaging.microsoft.com [65.55.88.13]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "Microsoft Secure Server Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id D599A2C0086 for ; Fri, 1 Feb 2013 20:07:35 +1100 (EST) Received: from mail42-tx2-R.bigfish.com (10.9.14.250) by TX2EHSOBE001.bigfish.com (10.9.40.21) with Microsoft SMTP Server id 14.1.225.23; Fri, 1 Feb 2013 09:07:31 +0000 Received: from mail42-tx2 (localhost [127.0.0.1]) by mail42-tx2-R.bigfish.com (Postfix) with ESMTP id 9A08A4402AB; Fri, 1 Feb 2013 09:07:31 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h1155h) Received: from mail42-tx2 (localhost.localdomain [127.0.0.1]) by mail42-tx2 (MessageSwitch) id 135970965069219_12536; Fri, 1 Feb 2013 09:07:30 +0000 (UTC) Received: from TX2EHSMHS027.bigfish.com (unknown [10.9.14.254]) by mail42-tx2.bigfish.com (Postfix) with ESMTP id 0B76224008D; Fri, 1 Feb 2013 09:07:30 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS027.bigfish.com (10.9.99.127) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 1 Feb 2013 09:07:29 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.318.3; Fri, 1 Feb 2013 09:07:29 +0000 Received: from xjhlab.ap.freescale.net (xjhlab.ap.freescale.net [10.192.208.221]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r1197Moq009006; Fri, 1 Feb 2013 02:07:23 -0700 From: Jianhua Xie To: , Subject: [PATCH 1/2] gianfar: Clean up an unnecessary function gfar_new_skb Date: Fri, 1 Feb 2013 17:07:07 +0800 Message-ID: <1359709627-18223-1-git-send-email-jianhua.xie@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Jianhua Xie , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Clean up an unnecessary function gfar_new_skb, since gfar_new_skb() has the same parameters, return value and function as gfar_alloc_skb(), should be cleaned up. Signed-off-by: Jianhua Xie --- drivers/net/ethernet/freescale/gianfar.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index bffb2ed..94d36ac 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -110,7 +110,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev); static void gfar_reset_task(struct work_struct *work); static void gfar_timeout(struct net_device *dev); static int gfar_close(struct net_device *dev); -struct sk_buff *gfar_new_skb(struct net_device *dev); +static struct sk_buff *gfar_alloc_skb(struct net_device *dev); static void gfar_new_rxbdp(struct gfar_priv_rx_q *rx_queue, struct rxbd8 *bdp, struct sk_buff *skb); static int gfar_set_mac_address(struct net_device *dev); @@ -207,7 +207,7 @@ static int gfar_init_bds(struct net_device *ndev) gfar_init_rxbdp(rx_queue, rxbdp, rxbdp->bufPtr); } else { - skb = gfar_new_skb(ndev); + skb = gfar_alloc_skb(ndev); if (!skb) { netdev_err(ndev, "Can't allocate RX buffers\n"); return -ENOMEM; @@ -2612,11 +2612,6 @@ static struct sk_buff *gfar_alloc_skb(struct net_device *dev) return skb; } -struct sk_buff *gfar_new_skb(struct net_device *dev) -{ - return gfar_alloc_skb(dev); -} - static inline void count_errors(unsigned short status, struct net_device *dev) { struct gfar_private *priv = netdev_priv(dev); @@ -2754,7 +2749,7 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit) rmb(); /* Add another skb for the future */ - newskb = gfar_new_skb(dev); + newskb = gfar_alloc_skb(dev); skb = rx_queue->rx_skbuff[rx_queue->skb_currx];