Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp92238pxj; Thu, 3 Jun 2021 01:30:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg3nT2tS4LIWlADWoBSRLS7Ag6ub8peob6SWzHPH/Gline0r2bAl/ezgMqX2A+IJuVcx/H X-Received: by 2002:a17:906:3b87:: with SMTP id u7mr4358233ejf.548.1622709008923; Thu, 03 Jun 2021 01:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622709008; cv=none; d=google.com; s=arc-20160816; b=Hg20ykIIUBtFDazV3zSL/8NEUgBWxLapUbqFzqgv7dBcAjg2RsSw8ARL3KdxMzEkGV qbPUGWHIAGkqrhep7PeodYtrlgua1FGmZKZhIMDTp+xNpF+WLWop/k6p832ucDroT6T3 tkKY9AAOCcuu4jRvc6bR/LECkIk8/imp24FOsIa5FPy5cy/AYJq9kAwG4YMG6qi04l3G Z6yNpbFY0fhI7dBrwv+9T86HubQq/FLBITnYW3G1v0YYQ7wyeisr4Od8QBCuwmXw8TNi GYb2oN4Ud/6y0iFkQt5QL4O0XqjGHNY+Qu45LR3nCPbQ80T5rJxMDMDHRYRyu0ZpESvn 757A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=HyQTFQMfdHTiufBAcnI9P/Wr2W6Ljpu4A2px9nIQ4KU=; b=wSPOLP2XmVwcJ5seP2ngV/dCtHg2Nf1bhdrqq6TBfsLV0WSeljlI0lRpHLvKfErcn0 gnbna9GQozDU95ob1Sxd+zw3opDEX7CBfA0WzMa51XeU6QX+DW+K82GuZcVNy3XKvywT 4bvSz2m8E3e6yp8x7gzjWwY3dohr1l5bCRm8k+fEHhqiVkMqhmgHLMYQo5idetGpuode 1OcIqOPya0Skhk/SVDZb4qqmGSBao4ii1AOLKhKUxLHvYy8dVzs3L7siQ73AyqJyLbnZ BUoAUfKz9VzA1qociixSJoBCUsN1EBzJRuPzd3nwrxEeQuWF4SCNHAbO60VdMraKQ1zs 6xFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@datenfreihafen.org header.s=2021 header.b=DbMY5uxx; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si1839291ejb.100.2021.06.03.01.29.46; Thu, 03 Jun 2021 01:30:08 -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; dkim=pass header.i=@datenfreihafen.org header.s=2021 header.b=DbMY5uxx; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbhFCI3x (ORCPT + 99 others); Thu, 3 Jun 2021 04:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbhFCI3w (ORCPT ); Thu, 3 Jun 2021 04:29:52 -0400 X-Greylist: delayed 414 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Jun 2021 01:28:08 PDT Received: from proxima.lasnet.de (proxima.lasnet.de [IPv6:2a01:4f8:121:31eb:3::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A399DC06174A; Thu, 3 Jun 2021 01:28:08 -0700 (PDT) Received: from [IPv6:2003:e9:d722:28a1:9240:5b8a:f037:504] (p200300e9d72228a192405b8af0370504.dip0.t-ipconnect.de [IPv6:2003:e9:d722:28a1:9240:5b8a:f037:504]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: stefan@datenfreihafen.org) by proxima.lasnet.de (Postfix) with ESMTPSA id 02BBFC02EE; Thu, 3 Jun 2021 10:21:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datenfreihafen.org; s=2021; t=1622708470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HyQTFQMfdHTiufBAcnI9P/Wr2W6Ljpu4A2px9nIQ4KU=; b=DbMY5uxxDqgbj8Q0iGoJpkz8aKFIz58TxhEcSDJAxFbApN/BRtLXzST+cM1oM8AA5422AN 5PyMcHFkm2h92/QCxZX1TNT5p5x8AuTwA79VpaBtWvTgQ4EJJJgu2s7OQTA/uH7fa9x6ld YD4bp2KWajjXV6ZqDSiCe/gaHrw9Pdn4owj+ef3k81FfbPAZ+4woRNR0X9JRUxvLdZdYVG Zt63VQB34AVgMV+I0INTFu27HD9ELe6yOzX2EVmDikEJh4h97Jx0j9p7b3/CkkwFGiA8EH 8VrO7yCsBQ6V6jgWwdQjIFzFCjsicmMoyaf5JjuowfTHSVSpS3tqoBvgsoIhvQ== Subject: Re: [PATCH] net/ieee802154: drop unneeded assignment in llsec_iter_devkeys() To: Yang Li , alex.aring@gmail.com Cc: davem@davemloft.net, kuba@kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1619346299-40237-1-git-send-email-yang.lee@linux.alibaba.com> From: Stefan Schmidt Message-ID: <6bffca3c-6c85-b975-24d4-cdd1aa47380e@datenfreihafen.org> Date: Thu, 3 Jun 2021 10:21:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <1619346299-40237-1-git-send-email-yang.lee@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 25.04.21 12:24, Yang Li wrote: > 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, > This patch has been applied to the wpan tree and will be part of the next pull request to net. Thanks! regards Stefan Schmidt