Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2125794rwb; Thu, 8 Dec 2022 20:48:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Fkq4JX8injNeTPXnIMoPK9QrSAkT025e7eIK3+mEw9KyfhO2FcNS+m0f2mVF/+TH8DiNN X-Received: by 2002:a17:906:194b:b0:7c0:cfb2:40bc with SMTP id b11-20020a170906194b00b007c0cfb240bcmr4004909eje.15.1670561285401; Thu, 08 Dec 2022 20:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670561285; cv=none; d=google.com; s=arc-20160816; b=VW/No5yxdeCKHCglPmjNsd8/YIu1eG7TnbxBSgvV0clh61japiCVMkcU4ihL8oHtse aVwDKD6Q/aBy50xwg4Y9A98Jc+J5zBnLdw7mVqarKoHMLYBAvWMWkZgxgNmt3K1TUNX/ XktjxNy/gHo6s30WhANWJazXA38bzr/1c/sca+LwuHJqOWpNI1lu72ubcaSqjJahwZJR lgR51zM/ynBI7HSgaJWtMqwJej861fMgREgpwDwaybPD7zKFhHlMQvllKyN+bI50MQlP xAR7/pb3henLIeNusr42LXNJ9S1t7TNtGBxXC21Ozteql7ZXI2RjHVDIg7HWSo+Fd+X0 f5ig== 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; bh=n54hlXNzRY5eFHLEYy7H+YEmZW2xRceIPSXwLr1pPo8=; b=Ep99r0eQBcYqPWKY4JMna8ttu8XhVI88ICiJLeF8yw9F/JRS4nsD6ajRTYcOM9bh61 eE2e7stPlRWctERFZ/GDrLyRY26IAapy9emxi/TOHXBOZyFxe8vQMrQ1xzlpLxa18kPI saUmvo7VJIYOW2Pd2UUWxzo+0DT7ZTcdphLDuHhGXnb/J0i2ojcWErYx4VVF+ILrvSSG LQYfoqQFClOvPqbPsxX7PGHyi0UBV6YjPjFCTI2U2QkJsb6LnEQgSqWaTYCBm7HMWe7a eiFEnxgovl6as0e4XQZduosBZtJ5c2oFFd6NYTBXfqYGaWzYaH4iXs7jmH1i2ThUkj00 k2Qw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020aa7df03000000b004687eebac58si481554edy.458.2022.12.08.20.47.47; Thu, 08 Dec 2022 20:48:05 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229791AbiLIEPX (ORCPT + 74 others); Thu, 8 Dec 2022 23:15:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiLIEPT (ORCPT ); Thu, 8 Dec 2022 23:15:19 -0500 Received: from out199-17.us.a.mail.aliyun.com (out199-17.us.a.mail.aliyun.com [47.90.199.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DAECACB37; Thu, 8 Dec 2022 20:14:46 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R861e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=jiapeng.chong@linux.alibaba.com;NM=0;PH=DS;RN=16;SR=0;TI=SMTPD_---0VWspzh3_1670557238; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VWspzh3_1670557238) by smtp.aliyun-inc.com; Fri, 09 Dec 2022 11:40:44 +0800 From: Jiapeng Chong To: wei.liu@kernel.org Cc: paul@xen.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, xen-devel@lists.xenproject.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] xen-netback: Remove set but unused variable 'pending_idx' Date: Fri, 9 Dec 2022 11:40:36 +0800 Message-Id: <20221209034036.37280-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org Variable pending_idx is not effectively used in the function, so delete it. drivers/net/xen-netback/netback.c:886:7: warning: variable ‘pending_idx’ set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3399 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/net/xen-netback/netback.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 054ac0e897f6..19d928389473 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -883,7 +883,6 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue, struct xen_netif_tx_request txfrags[XEN_NETBK_LEGACY_SLOTS_MAX]; struct xen_netif_extra_info extras[XEN_NETIF_EXTRA_TYPE_MAX-1]; unsigned int extra_count; - u16 pending_idx; RING_IDX idx; int work_to_do; unsigned int data_len; @@ -984,7 +983,6 @@ static void xenvif_tx_build_gops(struct xenvif_queue *queue, } index = pending_index(queue->pending_cons); - pending_idx = queue->pending_ring[index]; if (ret >= XEN_NETBK_LEGACY_SLOTS_MAX - 1 && data_len < txreq.size) data_len = txreq.size; -- 2.20.1.7.g153144c