From patchwork Fri Jul 10 17:44:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 6767591 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3ADE89F380 for ; Fri, 10 Jul 2015 17:45:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B8A42060B for ; Fri, 10 Jul 2015 17:45:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 505772017D for ; Fri, 10 Jul 2015 17:45:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbbGJRpN (ORCPT ); Fri, 10 Jul 2015 13:45:13 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:36456 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933245AbbGJRot (ORCPT ); Fri, 10 Jul 2015 13:44:49 -0400 Received: by lbbpo10 with SMTP id po10so96563995lbb.3 for ; Fri, 10 Jul 2015 10:44:46 -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=QmU4qXm4L+mucuDXWpmq6Wy/V8zLQbZnchcThibBYzE=; b=cM9cqSgxBDBO7cFjWdnO3xseK2hqnNK0bVRnjmMhCAML1kCcO0I9HBbqvxx1qbIohX hmU4t0c5vngqZiiWICrazxFMxelxJmyV4fSG/Rz8a2usvm7GHVO3QfLOfxk80ubGxXPV r26fFmbAcRGZgXWVZgbYxD3m80SsK0Or46f96GcNASYwWeia2WT/FMm9HAJH2ae2FIcF VLu3oJr/RHigob/HQHdl1fWywnS3+MMehDN4UT59bdjKtD3DMzEuAyOd5zm9hEHZEX+O rGB7mA+ED1ov3xKRIzoqkxyOMavrWSVv2Owaw4BsFDByfciygFN+k3mpzUrcZGrAoZO9 jHaQ== X-Gm-Message-State: ALoCoQmJb7GJD2n9iD0iT2mNjBpmEBZ6dOhOmtBjUTPtWvDDt1UDWE4AtWeXcz/NRDMGgXjVHNAE X-Received: by 10.112.55.207 with SMTP id u15mr20832498lbp.88.1436550286295; Fri, 10 Jul 2015 10:44:46 -0700 (PDT) Received: from wasted.cogentembedded.com (ppp18-120.pppoe.mtu-net.ru. [81.195.18.120]) by smtp.gmail.com with ESMTPSA id ew11sm2473135lac.31.2015.07.10.10.44.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 10:44:45 -0700 (PDT) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH] ravb: kill usless initializers Date: Fri, 10 Jul 2015 20:44:39 +0300 Message-ID: <6091630.MmiAo8Envs@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. 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;