From patchwork Fri May 11 08:38:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 158460 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 152FDB6FF8 for ; Fri, 11 May 2012 18:38:41 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757957Ab2EKIif (ORCPT ); Fri, 11 May 2012 04:38:35 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:63147 "EHLO relmlor4.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758075Ab2EKIiT (ORCPT ); Fri, 11 May 2012 04:38:19 -0400 Received: from relmlir4.idc.renesas.com ([10.200.68.154]) by relmlor4.idc.renesas.com ( SJSMS) with ESMTP id <0M3U00C88NZTL8C0@relmlor4.idc.renesas.com>; Fri, 11 May 2012 17:38:17 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir4.idc.renesas.com ( SJSMS) with ESMTP id <0M3U00B0WNZTQ200@relmlir4.idc.renesas.com>; Fri, 11 May 2012 17:38:17 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 961E8480A4; Fri, 11 May 2012 17:38:17 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 8B5B048097; Fri, 11 May 2012 17:38:17 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id TAE18331; Fri, 11 May 2012 17:38:17 +0900 X-IronPort-AV: E=Sophos; i="4.75,570,1330873200"; d="scan'208"; a="80693705" Received: from unknown (HELO [172.30.8.157]) ([172.30.8.157]) by relmlii1.idc.renesas.com with ESMTP; Fri, 11 May 2012 17:38:17 +0900 Message-id: <4FACCFF9.2040002@renesas.com> Date: Fri, 11 May 2012 17:38:17 +0900 From: "Shimoda, Yoshihiro" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-version: 1.0 To: netdev Cc: SH-Linux Subject: [PATCH v2 1/5] net: sh_eth: remove unnecessary function Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The sh_eth_timer() called mod_timer() for itself. So, this patch removes the function. Signed-off-by: Yoshihiro Shimoda --- about v2: - rebase the latest net-next.git drivers/net/ethernet/renesas/sh_eth.c | 22 ---------------------- drivers/net/ethernet/renesas/sh_eth.h | 1 - 2 files changed, 0 insertions(+), 23 deletions(-) diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index be3c221..c35084a 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -1289,14 +1289,6 @@ other_irq: return ret; } -static void sh_eth_timer(unsigned long data) -{ - struct net_device *ndev = (struct net_device *)data; - struct sh_eth_private *mdp = netdev_priv(ndev); - - mod_timer(&mdp->timer, jiffies + (10 * HZ)); -} - /* PHY state control function */ static void sh_eth_adjust_link(struct net_device *ndev) { @@ -1544,11 +1536,6 @@ static int sh_eth_open(struct net_device *ndev) if (ret) goto out_free_irq; - /* Set the timer to check for link beat. */ - init_timer(&mdp->timer); - mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */ - setup_timer(&mdp->timer, sh_eth_timer, (unsigned long)ndev); - return ret; out_free_irq: @@ -1573,9 +1560,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev) /* tx_errors count up */ ndev->stats.tx_errors++; - /* timer off */ - del_timer_sync(&mdp->timer); - /* Free all the skbuffs in the Rx queue. */ for (i = 0; i < RX_RING_SIZE; i++) { rxdesc = &mdp->rx_ring[i]; @@ -1593,10 +1577,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev) /* device init */ sh_eth_dev_init(ndev); - - /* timer on */ - mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */ - add_timer(&mdp->timer); } /* Packet transmit function */ @@ -1669,8 +1649,6 @@ static int sh_eth_close(struct net_device *ndev) free_irq(ndev->irq, ndev); - del_timer_sync(&mdp->timer); - /* Free all the skbuffs in the Rx queue. */ sh_eth_ring_free(ndev); diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h index 57b8e1f..9e8e4d5 100644 --- a/drivers/net/ethernet/renesas/sh_eth.h +++ b/drivers/net/ethernet/renesas/sh_eth.h @@ -771,7 +771,6 @@ struct sh_eth_private { struct sh_eth_txdesc *tx_ring; struct sk_buff **rx_skbuff; struct sk_buff **tx_skbuff; - struct timer_list timer; spinlock_t lock; u32 cur_rx, dirty_rx; /* Producer/consumer ring indices */ u32 cur_tx, dirty_tx;