Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2763770pxy; Sun, 25 Apr 2021 03:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH4kIO0qeqeM/c5afU2JYtVv/WMv91in4v0UIpVfui1DJfQJYCg6nM2x/vsDC/m3gM3FbV X-Received: by 2002:a65:5c0a:: with SMTP id u10mr11658872pgr.332.1619346406551; Sun, 25 Apr 2021 03:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619346406; cv=none; d=google.com; s=arc-20160816; b=FfTEJdLYNs571bG8H80rvPrJ8l81wbxtMpnda5AKG1qfIvOwEi18EaDp8TTT+PFphi Nbke7J2xVgXRnlLqA6Rw3+E9QZ5QXKFi848yOFi5URe7juVLHBT0pSI23DhhfL0Bxq7o MoxyEHb/6GvsVy17RLkxBn+Iq8VZZpf51FT8Y94tVkSVzGwKtovoAZ9vBuhyHEZcelvI SblksUXmMXc+SXl9RVzVthtM4R5+094kl7a5xazqf3nrMKF0l5m/OL/CN7VPeAtiBZFL 5ObXLx/bsZB0d4M+RVzviddZWc46z+ZkK7ywujvUnHicuTLBXDon1C9EoDW8SKKAwBZp 8tBg== 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=aDoj14P0KbrFuGjqmGwy9kTc1MKEPXCSTAp42NoRk9k=; b=t6VQPPgwcUiML5bbvbkuM9e+sgXCYHCoRbVW2ppQWzq9yzFppgYknZ1UF5ImIv5xgr FgpeNrH3TwH0XB7HVWChUQxnIpbJGEr1dV/wXlCE3zdOUMmn90EJbbnCUyI/EirzA3Ft tei6n4E69O5jgFd5PuozIKCOsymoATDSNn1jmkMHu0PU16mbplmGxd42uzqVvZUBs80P /lnhntf/RD0cEHXMAIqdIF0FE/Iyuu1DLaDL0/2xPTS4JDW+VD57bxONo9/oDlPvscwt AueqUH3kK9ICzI20j9Vrpp9GnoVpU8tsd3nmemc6JL2Ak+NtvutH7v33HGD4NP6ICrgl RZww== 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 c7si12949159pfn.207.2021.04.25.03.26.33; Sun, 25 Apr 2021 03:26:46 -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 S229911AbhDYKZr (ORCPT + 99 others); Sun, 25 Apr 2021 06:25:47 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:50800 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229466AbhDYKZq (ORCPT ); Sun, 25 Apr 2021 06:25:46 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UWg2IQf_1619346303; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UWg2IQf_1619346303) by smtp.aliyun-inc.com(127.0.0.1); Sun, 25 Apr 2021 18:25:04 +0800 From: Yang Li To: alex.aring@gmail.com Cc: stefan@datenfreihafen.org, davem@davemloft.net, kuba@kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH] net/ieee802154: drop unneeded assignment in llsec_iter_devkeys() Date: Sun, 25 Apr 2021 18:24:59 +0800 Message-Id: <1619346299-40237-1-git-send-email-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=n Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In order to keep the code style consistency of the whole file, redundant return value ‘rc’ and its assignments should be deleted The clang_analyzer complains as follows: net/ieee802154/nl-mac.c:1203:12: warning: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' No functional change, only more efficient. Reported-by: Abaci Robot Signed-off-by: Yang Li --- net/ieee802154/nl-mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c index 0c1b077..a6a8cf6 100644 --- a/net/ieee802154/nl-mac.c +++ b/net/ieee802154/nl-mac.c @@ -1184,7 +1184,7 @@ static int llsec_iter_devkeys(struct llsec_dump_data *data) { struct ieee802154_llsec_device *dpos; struct ieee802154_llsec_device_key *kpos; - int rc = 0, idx = 0, idx2; + int idx = 0, idx2; list_for_each_entry(dpos, &data->table->devices, list) { if (idx++ < data->s_idx) @@ -1200,7 +1200,7 @@ static int llsec_iter_devkeys(struct llsec_dump_data *data) data->nlmsg_seq, dpos->hwaddr, kpos, data->dev)) { - return rc = -EMSGSIZE; + return -EMSGSIZE; } data->s_idx2++; @@ -1209,7 +1209,7 @@ static int llsec_iter_devkeys(struct llsec_dump_data *data) data->s_idx++; } - return rc; + return 0; } int ieee802154_llsec_dump_devkeys(struct sk_buff *skb, -- 1.8.3.1