From patchwork Fri Jul 10 18:10:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 6767881 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 45D13C05AC for ; Fri, 10 Jul 2015 18:10:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 696D02051C for ; Fri, 10 Jul 2015 18:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C85A20787 for ; Fri, 10 Jul 2015 18:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933167AbbGJSKP (ORCPT ); Fri, 10 Jul 2015 14:10:15 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:34709 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932841AbbGJSKO (ORCPT ); Fri, 10 Jul 2015 14:10:14 -0400 Received: by lagx9 with SMTP id x9so269788046lag.1 for ; Fri, 10 Jul 2015 11:10:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:mime-version:content-transfer-encoding:content-type; bh=6htUtFSdUYpCs3DqzgJnraSezLNVRX109lhVb0geeUE=; b=CWDelhNGzQXdXPkM6bhRcb6FRx6wsbHrwjiMhQ5v48itWwRS54vAOXVpOqHQx5YX94 MiDjpbWv8A5pVV9KC2BWM/E2/WRqzha3or7h18aU04rHpvStFqiyM4QZYwIUxOs8qlOj 9N5iV1hEmxiA4VZ/oTmHRRLKNfE1pp8q1IyPHxkDD1iQ2RS+Aylxr3+xvYuadztqp+9t TSm7ENB8XVbCb/u7O9sFGvM8ZdyBsqWV2kUEPflisa679nhLvjEqLnO67PgQzhhsSduw cPFOckCKSK4I0jpsazJHQ5jUwwlcS8eriMuauKr7AWkK5Km/SxRDKF+y2g+j3HQZXOdd S9SA== X-Gm-Message-State: ALoCoQlpjBFamC2GHQ2bNkr9SDmuY04bIrJ8u59WiXm3vZwhvjpKOrnL0DOtrKJ4jrQKcRFK00ns X-Received: by 10.152.1.227 with SMTP id 3mr20784240lap.61.1436551812459; Fri, 10 Jul 2015 11:10:12 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp18-120.pppoe.mtu-net.ru. [81.195.18.120]) by smtp.gmail.com with ESMTPSA id h3sm2588443lbj.19.2015.07.10.11.10.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 11:10:11 -0700 (PDT) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] ravb: kill useless initializers Date: Fri, 10 Jul 2015 21:10:10 +0300 Message-ID: <3087282.SVZhuJYtXK@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.9 (Linux/4.0.6-200.fc21.x86_64; KDE/4.14.9; x86_64; ; ) MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some of the local variable intializers in the driver turned out to be pointless, kill them. Signed-off-by: Sergei Shtylyov --- The patch is against the Dave Miller's 'net-next.git' repo. Changes in version 2: - fixed typo in the subject. drivers/net/ethernet/renesas/ravb_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net-next/drivers/net/ethernet/renesas/ravb_main.c =================================================================== --- net-next.orig/drivers/net/ethernet/renesas/ravb_main.c +++ net-next/drivers/net/ethernet/renesas/ravb_main.c @@ -223,9 +223,9 @@ static void ravb_ring_free(struct net_de static void ravb_ring_format(struct net_device *ndev, int q) { struct ravb_private *priv = netdev_priv(ndev); - struct ravb_ex_rx_desc *rx_desc = NULL; - struct ravb_tx_desc *tx_desc = NULL; - struct ravb_desc *desc = NULL; + struct ravb_ex_rx_desc *rx_desc; + struct ravb_tx_desc *tx_desc; + struct ravb_desc *desc; int rx_ring_size = sizeof(*rx_desc) * priv->num_rx_ring[q]; int tx_ring_size = sizeof(*tx_desc) * priv->num_tx_ring[q]; struct sk_buff *skb; @@ -435,7 +435,7 @@ static int ravb_tx_free(struct net_devic struct net_device_stats *stats = &priv->stats[q]; struct ravb_tx_desc *desc; int free_num = 0; - int entry = 0; + int entry; u32 size; for (; priv->cur_tx[q] - priv->dirty_tx[q] > 0; priv->dirty_tx[q]++) { @@ -508,8 +508,8 @@ static bool ravb_rx(struct net_device *n struct sk_buff *skb; dma_addr_t dma_addr; struct timespec64 ts; - u16 pkt_len = 0; u8 desc_status; + u16 pkt_len; int limit; boguscnt = min(boguscnt, *quota); @@ -1272,8 +1272,8 @@ static void ravb_tx_timeout_work(struct static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev) { struct ravb_private *priv = netdev_priv(ndev); - struct ravb_tstamp_skb *ts_skb = NULL; u16 q = skb_get_queue_mapping(skb); + struct ravb_tstamp_skb *ts_skb; struct ravb_tx_desc *desc; unsigned long flags; u32 dma_addr;