Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp252674pxy; Wed, 28 Apr 2021 03:41:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxI/pQuSy6z39Kc1+8aqsU3ubpAMIf6wVaZ2FeQXgPm8TRgBrDaB9J9/8okZUiLLIi5zk4 X-Received: by 2002:a17:902:a614:b029:ed:3d5f:768 with SMTP id u20-20020a170902a614b02900ed3d5f0768mr13156152plq.18.1619606501845; Wed, 28 Apr 2021 03:41:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619606501; cv=none; d=google.com; s=arc-20160816; b=quCoNJBuEu9I2NDSHqjgw//GIT+LIsgbNY5qn52HJt72Ju5y3zzyL6Fv0uc4EgbUTg ZLO2CBGxiBc0lg5yg766IMgL8n/3V/6b5ToH6X293NRcM/JVr/rAJP93SdRk9EnDRAXJ ujFu8Or26TfCdHNwp6jYf0rMfQyXTcXly5VKFIKHzc8mMHxCXdwX7GESatAUyjveVr57 Eqwtv/3g2o1T21Z/Oque74dv7zKcYd24PvAmWqt0nn2xS06leYtVTUZu4LSDP01osbWO g0nC9xAz4twKuzZ5jg8V8oMVfdPnWQ40TFk7J5YPFtFbXVETy6N7XTL1lrqGF3Pnp9tx KtWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=iHNds3wu7oIQ7F6Ww8Y61vlt4igtp+kTbZ2D7hvfhGQ=; b=EYHWkrM97a4RYpPtzn9m2hZw1dtBcacQbY/xHi14inAaIsO/SNLU6OZaeok+83yTAr 7sK/B4/z/Pm8W8RasQTZVXfbNX81JJLIJhs9Kki/qk/Wc9T9SbtrnF9bRnnZNjUDziWi p1g91KEfpa8izFIU8IwpIYTSlwwcXc6dXT0Tez930kBrthlHESJVt2dbjfg3uW4PkSK1 h9jzkVk+JZy3cLBeHTZXN3tR6fgV4kc2gvfDtW82p44lI+i9RQFoBBMCltdAnVsPSLgW 0N6lGmusyCbtMWcA+6959q/ZRjEF2ZgS8BTKUXyuYTv+SVombDEVs1RH/MV57fq+0hZ4 u42w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 2si6726327pjr.77.2021.04.28.03.41.14; Wed, 28 Apr 2021 03:41:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238885AbhD1KBo (ORCPT + 99 others); Wed, 28 Apr 2021 06:01:44 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:49750 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238658AbhD1KBf (ORCPT ); Wed, 28 Apr 2021 06:01:35 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R931e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UX3G0f2_1619604047; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX3G0f2_1619604047) by smtp.aliyun-inc.com(127.0.0.1); Wed, 28 Apr 2021 18:00:48 +0800 From: Yang Li To: davem@davemloft.net Cc: kuba@kernel.org, nathan@kernel.org, ndesaulniers@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] llc2: Remove redundant assignment to rc Date: Wed, 28 Apr 2021 18:00:46 +0800 Message-Id: <1619604046-118132-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Variable 'rc' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/llc/llc_station.c:54:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores] net/llc/llc_station.c:83:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- net/llc/llc_station.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index c29170e..05c6ae0 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c @@ -54,7 +54,6 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb) if (!nskb) goto out; - rc = 0; llc_pdu_decode_sa(skb, mac_da); llc_pdu_decode_ssap(skb, &dsap); llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); @@ -83,7 +82,6 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb) if (!nskb) goto out; - rc = 0; llc_pdu_decode_sa(skb, mac_da); llc_pdu_decode_ssap(skb, &dsap); llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); -- 1.8.3.1