Received: by 10.223.176.5 with SMTP id f5csp3019819wra; Thu, 1 Feb 2018 09:30:04 -0800 (PST) X-Google-Smtp-Source: AH8x227jTgquHuq6u1toVh6xbmllJJ2KO/wyfcjMv1S/SwE9oKg8T38uoEaGryvy66OJMxX3oTTA X-Received: by 10.101.86.73 with SMTP id m9mr29823518pgs.70.1517506204184; Thu, 01 Feb 2018 09:30:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517506204; cv=none; d=google.com; s=arc-20160816; b=L5mnyr1C/kEDOJ28CA4PWiSeAJlo0/PyyQd3CAmuAmuO4QLVZJjxBTNakMaYJI9mb9 qIqUep4U4YvJSHTW6w27YmyqBx6C25ugrAC5TEViSX+LRa/r6i2P/h12lY4jEK2F/A48 DM09yNU6mdPZU1bGvTgLMx1XMFE2rNUT/lMpJPKhclGSXhp2XT/WrqNo9B7ZxgNaD4RU UQ5+AFHCNuHaEBeJvj9i68dGQvJdvjsWUbC9MDqQbK2DCWtE4jFsd3QdjfxGnTYBdQ/w iUhCHclbF8QlVNVluz/69WAvANCsYurT5dzv8WZqHuDS1DIq5XthyM9SpDYJaYwI8XMj ikug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=yXyu0YAZOPwdKgevtktul1vo4ULYEkTO7TI71L/X28U=; b=Ix+Xl3VG66QPqUwgaq358uYC15Sn/R2vkKFcfMZfLoEFfXZe4uMgT+U/d3/4/U3HEF hAtxgLmeWt3GEYNRnf40Gaea4XF+rBmYoHO6ZuUGK/qYy7PiSdpDYbmrLDQebkcEUdCH A8msz9f+9402EJVi7/BznU6jb/H5Rg5gAlx+o/z6khxTWEglRfPlJZtf6ve8QFqKO8M+ ZD/ImfAJvEyMqW0ewGgF5Ammx9NTz8VsynAg3J3K/IW986VfxsGwgyCRGAiN8qoXGxEd zZwCgVovLlqa+mTrAUfW/kdXO8zmZLoJQEcsY+Y27aLkqaOLfGp+WHmBmUN6zbttRPkY 0XZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8-v6si41855plk.597.2018.02.01.09.29.49; Thu, 01 Feb 2018 09:30:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752671AbeBAR3Y (ORCPT + 99 others); Thu, 1 Feb 2018 12:29:24 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:47536 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751526AbeBAR3W (ORCPT ); Thu, 1 Feb 2018 12:29:22 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ehIfp-0005RV-F5; Thu, 01 Feb 2018 17:29:21 +0000 From: Colin King To: Shrikrishna Khare , pv-drivers@vmware.com, netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] vmxnet3: remove redundant initialization of pointer 'rq' Date: Thu, 1 Feb 2018 17:29:21 +0000 Message-Id: <20180201172921.22770-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Pointer rq is being initialized but this value is never read, it is being updated inside a for-loop. Remove the initialization and move it into the scope of the for-loop. Cleans up clang warning: drivers/net/vmxnet3/vmxnet3_drv.c:2763:27: warning: Value stored to 'rq' during its initialization is never read Signed-off-by: Colin Ian King --- drivers/net/vmxnet3/vmxnet3_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index cf95290b160c..8b39c160743d 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2760,9 +2760,6 @@ static void vmxnet3_adjust_rx_ring_size(struct vmxnet3_adapter *adapter) { size_t sz, i, ring0_size, ring1_size, comp_size; - struct vmxnet3_rx_queue *rq = &adapter->rx_queue[0]; - - if (adapter->netdev->mtu <= VMXNET3_MAX_SKB_BUF_SIZE - VMXNET3_MAX_ETH_HDR_SIZE) { adapter->skb_buf_size = adapter->netdev->mtu + @@ -2794,7 +2791,8 @@ vmxnet3_adjust_rx_ring_size(struct vmxnet3_adapter *adapter) comp_size = ring0_size + ring1_size; for (i = 0; i < adapter->num_rx_queues; i++) { - rq = &adapter->rx_queue[i]; + struct vmxnet3_rx_queue *rq = &adapter->rx_queue[i]; + rq->rx_ring[0].size = ring0_size; rq->rx_ring[1].size = ring1_size; rq->comp_ring.size = comp_size; -- 2.15.1