Message ID | 20230331205545.1863496-1-trix@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp839415vqo; Fri, 31 Mar 2023 14:06:43 -0700 (PDT) X-Google-Smtp-Source: AKy350a4ZCisr7Q2UqVlT0OY26EFPqr67h9aW9PaJn6NykMGkJMLgQT89xbmSxcxbJxgYpJvwfPq X-Received: by 2002:aa7:c7d7:0:b0:500:29e3:ce with SMTP id o23-20020aa7c7d7000000b0050029e300cemr25077900eds.36.1680296803102; Fri, 31 Mar 2023 14:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680296803; cv=none; d=google.com; s=arc-20160816; b=c/HZjxbKaYOvSYEO0l0eC6JPRtfJN20CVXGYjj6GnK2rSagjVF9Ci6JFr0vCWPT832 Tr0LQYL0MgbzLJpXXGFNeCOX2ZYDTQaJbf4gMxxCig+QQ/3Iq58pFtZFlN8/X9xEz+Nc nTMhi6043CC6unotZbxELQlMTN6umD38bjR9lcIiODywYGBYxXoKTeZsQQ+g/BEMWru5 qsb4Pq085E3FOVZ4QN/Z51EeV8C8yeJDs1G3Zw0DF/JFYBoQ9swm/zlyzwHphNt/M5de 0RQD05+U7/l4OMH6jwLQzWxontC98voLu0+eY3STacQkOFP8bbLwR+LeZIZFwhj5C92v pMtA== 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=4iXEOFNILcUMsIjcydKfmGYblvwSUsIqK+R28wpgVSw=; b=JwjH8c01Mv9n2x1NR8C0r+67tyhdBwXXDRQwrR1ag4F7rY8FQwb+0t1KjeGLNRF6lK 0P3Tq+V7gxVR4u2aKKGDDVSnPTIbkn+Gzhxbic5LbKhhhvVktB33uuHfK7CuO40h8nNB R7APtPmtUZHhdFMxnX4zG30524cMeVRgf3MX1+05l91uJ1fphzmj2OSFDTlyU4bAW2AR pQLrm8VMvyfZfC+YqQdzbAgKDptSxN3ng8OBF5GAWU3hyI4xOWF5HBK4X1akVCZuFxuZ kzzxTBQmrQWFeajsJo/ru7Ea5GY0RcI57d6NU2ICVO0fR17E3cg1r8zEz83fSYW+L83G ORVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QvlhnNWd; 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=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a50ea8a000000b004fb1e94e874si2909519edo.361.2023.03.31.14.06.19; Fri, 31 Mar 2023 14:06:43 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=QvlhnNWd; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232017AbjCaU4m (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Fri, 31 Mar 2023 16:56:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbjCaU4j (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 31 Mar 2023 16:56:39 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1E36422C for <linux-kernel@vger.kernel.org>; Fri, 31 Mar 2023 13:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680296151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=4iXEOFNILcUMsIjcydKfmGYblvwSUsIqK+R28wpgVSw=; b=QvlhnNWdvR63emgQlVSCI0MMGQmbswSkfPKRjOy2joYUteSP9FktX8hMeLy+5D3a4s3MbQ ed/VqdQTjOEexlYQe7EbLiEQdlApHZdZZiCIdv406XCVdgpO0LH/6C1zCuypj+HQzECVIr nBYbdbr84ARtjDK18wJvjpPIFapq1+o= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-Z-irLgpsOsWstfv7RBHwxQ-1; Fri, 31 Mar 2023 16:55:49 -0400 X-MC-Unique: Z-irLgpsOsWstfv7RBHwxQ-1 Received: by mail-qk1-f199.google.com with SMTP id b34-20020a05620a272200b007460c05a463so11073426qkp.1 for <linux-kernel@vger.kernel.org>; Fri, 31 Mar 2023 13:55:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680296149; 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=4iXEOFNILcUMsIjcydKfmGYblvwSUsIqK+R28wpgVSw=; b=aCaqx8dNdrz9DS6ZcVWrl/Hga3d2g467+Sh5lN6kXfruQMwGLUEOxBMk4tobb/8D3K QouzLK4PgqZ+evH7aynTStLI6YqW1h0UiX5ocBPfxOQpnwnOUVsw/KhnywwQijJ7jdhK VQ5gLtkt3389EprmCos+NiSlRUYU33SqQbYVUKn6YYHzGGi+6eLBEb1e9bWODSwUc1PM qp9FrWQlsyF47yDa5uadUHErOH+C44WPpyTZ9xC/2FuKOjN8mh19pkanRlvQWhKTJiy+ EYc1iOgt3Z0ZlzTrGFnlRqYPSNq8RLTPAkhIZopfphHVW4ns3XDsek+AhhJSbRNRlC3P lJPQ== X-Gm-Message-State: AAQBX9ftPeq4rYPEGkVKpap3TRPh9GYizF/zmi227A+B5haq+bkrIK3X qdcF5xrEKdDKp/La3PQc0BT4oQ3KhdGpbisYYCar9gL0tU8g5JOxlkHhHLShCpNa2SykCR79him XaSNwonPbbTmdrC0o+bYZXXmW X-Received: by 2002:a05:6214:d83:b0:5df:3310:c1f9 with SMTP id e3-20020a0562140d8300b005df3310c1f9mr28014874qve.5.1680296149145; Fri, 31 Mar 2023 13:55:49 -0700 (PDT) X-Received: by 2002:a05:6214:d83:b0:5df:3310:c1f9 with SMTP id e3-20020a0562140d8300b005df3310c1f9mr28014849qve.5.1680296148838; Fri, 31 Mar 2023 13:55:48 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id o6-20020a0c9006000000b005e0cd3c21c8sm875543qvo.13.2023.03.31.13.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 13:55:48 -0700 (PDT) From: Tom Rix <trix@redhat.com> To: jes@trained-monkey.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, nathan@kernel.org, ndesaulniers@google.com Cc: linux-acenic@sunsite.dk, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix <trix@redhat.com> Subject: [PATCH] net: alteon: remove unused len variable Date: Fri, 31 Mar 2023 16:55:45 -0400 Message-Id: <20230331205545.1863496-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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?1761918900699185272?= X-GMAIL-MSGID: =?utf-8?q?1761918900699185272?= |
Series |
net: alteon: remove unused len variable
|
|
Commit Message
Tom Rix
March 31, 2023, 8:55 p.m. UTC
clang with W=1 reports
drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable
'len' set but not used [-Werror,-Wunused-but-set-variable]
int i, len = 0;
^
This variable is not used so remove it.
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/net/ethernet/alteon/acenic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Fri, Mar 31, 2023 at 04:55:45PM -0400, Tom Rix wrote: > clang with W=1 reports > drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable > 'len' set but not used [-Werror,-Wunused-but-set-variable] > int i, len = 0; > ^ > This variable is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Simon Horman <simon.horman@corigine.com>
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Fri, 31 Mar 2023 16:55:45 -0400 you wrote: > clang with W=1 reports > drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable > 'len' set but not used [-Werror,-Wunused-but-set-variable] > int i, len = 0; > ^ > This variable is not used so remove it. > > [...] Here is the summary with links: - net: alteon: remove unused len variable https://git.kernel.org/netdev/net-next/c/51aaa68222d6 You are awesome, thank you!
On 3/31/23 16:55, Tom Rix wrote: > clang with W=1 reports > drivers/net/ethernet/alteon/acenic.c:2438:10: error: variable > 'len' set but not used [-Werror,-Wunused-but-set-variable] > int i, len = 0; > ^ > This variable is not used so remove it. > > Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org> > --- > drivers/net/ethernet/alteon/acenic.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c > index d7762da8b2c0..eafef84fe3be 100644 > --- a/drivers/net/ethernet/alteon/acenic.c > +++ b/drivers/net/ethernet/alteon/acenic.c > @@ -2435,7 +2435,7 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb, > } else { > dma_addr_t mapping; > u32 vlan_tag = 0; > - int i, len = 0; > + int i; > > mapping = ace_map_tx_skb(ap, skb, NULL, idx); > flagsize = (skb_headlen(skb) << 16); > @@ -2454,7 +2454,6 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb, > const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; > struct tx_ring_info *info; > > - len += skb_frag_size(frag); > info = ap->skb->tx_skbuff + idx; > desc = ap->tx_ring + idx; >
diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c index d7762da8b2c0..eafef84fe3be 100644 --- a/drivers/net/ethernet/alteon/acenic.c +++ b/drivers/net/ethernet/alteon/acenic.c @@ -2435,7 +2435,7 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb, } else { dma_addr_t mapping; u32 vlan_tag = 0; - int i, len = 0; + int i; mapping = ace_map_tx_skb(ap, skb, NULL, idx); flagsize = (skb_headlen(skb) << 16); @@ -2454,7 +2454,6 @@ static netdev_tx_t ace_start_xmit(struct sk_buff *skb, const skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; struct tx_ring_info *info; - len += skb_frag_size(frag); info = ap->skb->tx_skbuff + idx; desc = ap->tx_ring + idx;