Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp221957pxy; Wed, 28 Apr 2021 03:01:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZDji/m9gu+kIeQ9tizzJ+5OtjQefjWLBcysrcLqpdZOXXn4OQJkNZ8Ifs9IKeMWqrUc71 X-Received: by 2002:a17:906:d7a6:: with SMTP id pk6mr1875830ejb.118.1619604119240; Wed, 28 Apr 2021 03:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619604119; cv=none; d=google.com; s=arc-20160816; b=CY9RcmhzftLfcMSuh3w9M873rypg12XX9uvu5LXbSuVA1aNdReqZHGwcogDrgkboou YiLVyDpjps2N6yjQkqesDuuW1nAxusFKrM3OzFIAjsS15bRIZ8VAgs+8lJHgPGzn1vqB qJ3NSr+Ak9mvTDsv6qowSEpuji46UaqE8hAbsEG0liRYkwtRg+2PNXkOhPMZD0qHnmiM f7982wYkCNJNAoq3LrDOrLVVhErNy68+eqcnMxtyN8dd8x9mv/7H0IPZPZgI7DZGmmlH JbcC5Qe0ronBLgFqB3P7ou7sNwLTj24HIMOuiZOhF0T7f9Lxmf43YQoLKALad8X4XCAx u9wg== 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=9YL75A9q8gjNNdPNTsOW00DrBfn1F+HWSdIbG/VeNPQ=; b=T2JBmhEBurw4TKZ6wzULtlsfLzznZ51A+2RTXADpC2gKyastlvA8gtsI7NAbidmDwE ScbHgOEQIjWiOzIUnVwvDLXG4yackBQg3jLHUHj2fM4fHB5PBVnYK9hclaSKd6r5o/fs ihehc8gmDKukgVMu+uCevgOeeLoxnHlkDZHBsgNVfyuqeWVPDB9NeoIz1y1Vbe0Wbgn+ lguExqkLchKT9/jcH2v3YzDl3XJRI+gXPTRsSnEv+NY4mb4H/IzbdqFkYV5fhThAopkJ vthzO3r20B4cllP4uIzLrJe/sTgMTAQqKCCRMrjBKA2neKLhvs4eBHTTSGoXdL+a6E7a kFYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 k12si1513809edr.115.2021.04.28.03.01.29; Wed, 28 Apr 2021 03:01:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S238769AbhD1J74 (ORCPT + 99 others); Wed, 28 Apr 2021 05:59:56 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:44001 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238070AbhD1J7z (ORCPT ); Wed, 28 Apr 2021 05:59:55 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R451e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0UX3sbtO_1619603946; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0UX3sbtO_1619603946) by smtp.aliyun-inc.com(127.0.0.1); Wed, 28 Apr 2021 17:59:08 +0800 From: Yang Li To: johannes@sipsolutions.net Cc: davem@davemloft.net, kuba@kernel.org, nathan@kernel.org, ndesaulniers@google.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Yang Li Subject: [PATCH] net: wireless: wext_compat.c: Remove redundant assignment to ps Date: Wed, 28 Apr 2021 17:59:05 +0800 Message-Id: <1619603945-116891-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-wireless@vger.kernel.org Variable 'ps' is set to wdev->ps 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/wireless/wext-compat.c:1170:7: warning: Value stored to 'ps' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li --- net/wireless/wext-compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index a8320dc..50a2330 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -1167,7 +1167,7 @@ static int cfg80211_wext_siwpower(struct net_device *dev, { struct wireless_dev *wdev = dev->ieee80211_ptr; struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); - bool ps = wdev->ps; + bool ps; int timeout = wdev->ps_timeout; int err; -- 1.8.3.1