Message ID | 20221115093137.144002-1-colin.i.king@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2612790wru; Tue, 15 Nov 2022 01:37:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf5Fbuv8UJRA4GFPxb38bYEC/qCHXgMQNEWHHmqD7+9eEW2gqYjAF3coG3wxmwO3/eY3CxVe X-Received: by 2002:a17:902:a5c6:b0:179:e1f6:d24d with SMTP id t6-20020a170902a5c600b00179e1f6d24dmr3187068plq.91.1668505046025; Tue, 15 Nov 2022 01:37:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668505046; cv=none; d=google.com; s=arc-20160816; b=VL0d2EwQ7sv3/cXtAqbWfi++QaMkgjC/GrA2TJLF7dKL6CyDrQ4uZSXHWLaetwuRBx RprRDylNdldMxzi5xti/ViqnYq4ob0zKABlrY0XL7ZNUSurCg71Lbn52TV9IGqXE1ryc vmePeXbuzL0kWcnSDuKyUn96CW47AkSdKXe5NlDB5gL5wdSG9u03yNMrq7i4abO9qXdY I50uau1iqsXIM8zvmIIMJpcEMtuJQY9r5aCsps5/H+2dU0w1lLsrY2DErx2xYezJA3wK xTUjIJz7mQtsI7NY/pjC1i6v93h5ST5oVzgDBPYeeE3s4yP1xM7CSo93ZCWXO+TzaKFI FU+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xxOYorO+qp/Ux5uO45kQPwW5Xbfxtuq7/VNLX14n8IY=; b=hpPjunVZAftqvDmce2HuLVi5HoEkhbKp/JYg1t0xtcpvzLuHdw4bif8XJg+3P0pOpH xRE2eDp97zPjAsDqqPYxD/45fHpmn0aslVOFDB5UWf+IXoyJ2vltSrbZ2KkKy6NBHi4K L3tSV3SQ4vvT2QwExcL3dyHOe7pPdmzGekC1rpcRZ68qnnXg6uklpHtXFMGeSwbkXlLu jCFGe/ZZs3BWDiGZlvKS6ZPTLuTW+n1xQLcoWiYePVkIudUMwt5tYurfJplJj3JDCkhG 9DzOvdHZAziOfuWng0OCpGX6wsUVJF4fSemXtx50PHR5+P68cD0oSpkI/l3kabkQF6xM dDEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lq9j8Yo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id na16-20020a17090b4c1000b00213959f5a91si19347063pjb.2.2022.11.15.01.37.12; Tue, 15 Nov 2022 01:37:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lq9j8Yo+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236173AbiKOJbo (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Tue, 15 Nov 2022 04:31:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232439AbiKOJbl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 15 Nov 2022 04:31:41 -0500 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E8D0EE39; Tue, 15 Nov 2022 01:31:40 -0800 (PST) Received: by mail-wm1-x333.google.com with SMTP id ja4-20020a05600c556400b003cf6e77f89cso870810wmb.0; Tue, 15 Nov 2022 01:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xxOYorO+qp/Ux5uO45kQPwW5Xbfxtuq7/VNLX14n8IY=; b=lq9j8Yo+iYN2nBfXTbuHNwdedR1am7ZrPm1ovFLALugOLW9NFNvXFyvRydDoqouGce QOOCE09OddSjazJ1JNfegaB91Si+aYbqsrGXTJ+dWXX2PNIk/Rt2OpWXyRZ+9RiZtzYh +rGawEVIZ3s6XFJhbCvjyUQSdPJKQ3+kcbhL2rujjCIXNjjvOLrQe0Jdw4YA7OkEjXlj p4aghaBrIUAqhG7c6ymUY98504BQyOWAoFCQ1GKuichT1LJ7B6GNyIV4ZlzWxUjEbxgK nFjoKSMTjR79gGeCXPRSyHVUzwQg13tG6so38xlKsjRE5w2rSaNP4t2lPQAHDtaMU3ys CINQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xxOYorO+qp/Ux5uO45kQPwW5Xbfxtuq7/VNLX14n8IY=; b=3qLnioxfFtYikY0QiV48rUt7pprV54lxnE7flaHqYCOjZNsuvZRCVtg27OA6Slgy3w x4cE+9Lhg07QbMfCJVDYSl2n6l1BkkpLlqlsUzd/iUFEcHnwy+nb6/t93OhqIXYP/BVz kHyGd11UKsGyCM43l7zq53PXYXdneBUihlIBYGziOvoRa/vR3WSJBPvtQky7tMq1KVSX rPowzZNpujv2VeFZfbQuJgvB40toE8RwmsIepdj3AT18Mrr8548CxYBntdhJM6GucPm6 y/z86xl3vwL/bldIPomA3a5yha61MUNMDyOlgvablF76UC3jxo5Ja4KURXcOz/LR86qV G0/A== X-Gm-Message-State: ANoB5pkco1rBGT83JT3BN6FogR9ZY3b/6rlZ0+ufdjPYM1wLHunOEupv Csbd/jUTCtyDDmOH7PAk+Fk= X-Received: by 2002:a05:600c:a0d:b0:3cf:77a6:2c2e with SMTP id z13-20020a05600c0a0d00b003cf77a62c2emr408664wmp.179.1668504699067; Tue, 15 Nov 2022 01:31:39 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id g13-20020a5d554d000000b002366e3f1497sm12078215wrw.6.2022.11.15.01.31.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 01:31:38 -0800 (PST) From: Colin Ian King <colin.i.king@gmail.com> To: Denis Kirjanov <kda@linux-powerpc.org>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next][V2]: sundance: remove unused variable cnt Date: Tue, 15 Nov 2022 09:31:37 +0000 Message-Id: <20221115093137.144002-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749554347585197494?= X-GMAIL-MSGID: =?utf-8?q?1749554347585197494?= |
Series |
[net-next,V2] : sundance: remove unused variable cnt
|
|
Commit Message
Colin Ian King
Nov. 15, 2022, 9:31 a.m. UTC
Variable cnt is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
V2: Use the correct net-next convention. I do hope I've got this correct,
apologies for being consistently incorrect in the past.
---
drivers/net/ethernet/dlink/sundance.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Tue, Nov 15, 2022 at 09:31:37AM +0000, Colin Ian King wrote: > Variable cnt is just being incremented and it's never used > anywhere else. The variable and the increment are redundant so > remove it. > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> > --- > > V2: Use the correct net-next convention. I do hope I've got this correct, > apologies for being consistently incorrect in the past. Almost :) [PATCH net-next][V2] -> [PATCH net-next V2] Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Hello: This patch was applied to netdev/net-next.git (master) by Paolo Abeni <pabeni@redhat.com>: On Tue, 15 Nov 2022 09:31:37 +0000 you wrote: > Variable cnt is just being incremented and it's never used > anywhere else. The variable and the increment are redundant so > remove it. > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com> > --- > > [...] Here is the summary with links: - [net-next,V2] : sundance: remove unused variable cnt https://git.kernel.org/netdev/net-next/c/710cfc6ab4b8 You are awesome, thank you!
diff --git a/drivers/net/ethernet/dlink/sundance.c b/drivers/net/ethernet/dlink/sundance.c index 43def191f26f..aaf0eda96292 100644 --- a/drivers/net/ethernet/dlink/sundance.c +++ b/drivers/net/ethernet/dlink/sundance.c @@ -1414,7 +1414,6 @@ static void refill_rx (struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); int entry; - int cnt = 0; /* Refill the Rx ring buffers. */ for (;(np->cur_rx - np->dirty_rx + RX_RING_SIZE) % RX_RING_SIZE > 0; @@ -1441,7 +1440,6 @@ static void refill_rx (struct net_device *dev) np->rx_ring[entry].frag.length = cpu_to_le32(np->rx_buf_sz | LastFrag); np->rx_ring[entry].status = 0; - cnt++; } } static void netdev_error(struct net_device *dev, int intr_status)