From patchwork Thu Jan 30 01:59:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11357333 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECB30924 for ; Thu, 30 Jan 2020 01:59:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CA93D206D5 for ; Thu, 30 Jan 2020 01:59:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Nv8LqQ4T"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FVzpVYqB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA93D206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=tLb1z4WCdfeZwFHy9D9gJDlejOHr1Nccmft5Bqo+bas=; b=Nv8LqQ4TQIuwbg iOhzObw0ta1LS+f63U7dnmcjjkLDUJtyhJx46H+gZqexdjm2/ig3TQSOaHFN2YhO0ioRq9bm2Msq9 OsSKEEkfJFLilY89mZp+oxoHuHabWFEz/IM52n10L57EtHsLHAz+Cz7Efj5UmwlYcWEgAXQnklzoQ arqrtTqkXxUu/WmBhpBwIVp0ds+zMkvQjRPMeRTXeQ3tscuH4zwfdE/5Jn6tTeWGfxs1NmmYp7ZBP 4Oh8s7DboaTIyXWknbVr8fRiR68NB6ezEt14ipprbZfE3ZF5IiGe25JweEpYrGmkIFDP8/f9e6N5x Q8Cb6JnFLytBNdZ0XCwQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iwz6x-0007b3-MZ; Thu, 30 Jan 2020 01:59:15 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iwz6u-0007aN-Ho for ath11k@lists.infradead.org; Thu, 30 Jan 2020 01:59:14 +0000 Received: by mail-ot1-x344.google.com with SMTP id r16so1686020otd.2 for ; Wed, 29 Jan 2020 17:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i88Mz1HHfHLRjCoXJjYlUuVlF7tVe72iHNwcP0Yi878=; b=FVzpVYqBOkYJARKHKHz9NHlb+5/d7Vt+y/cLQ9kbw3/DGLgrZUfmFvhTPbXxBB40ev oE1abXhHnNBgzBj1j3EOAabKBgjxt1eRdkKZBx4HjFUjZyq3ytVXrVOzPkZ5YBJTKnRT kcDOi9OglnDClR0mdlIcNuZH7M/LoORTZphTZy+gLkKsXsNZutbn8GS0av34/GlQ2MdA c+TjAOf7/GCrZgxK9twfKuDfelQJ30hPK4IVMFksBOmDMIk0mihHjq5lv90Y4lztsRAx evEW3LpbForUZMEVfuyWogpNsH3eiuFWc/IPpUDlf6zj4hyJko7j4fbrvrPMMq+a7acZ fsDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i88Mz1HHfHLRjCoXJjYlUuVlF7tVe72iHNwcP0Yi878=; b=Kyw+S+dzXcHjvVsXGxWgQX/Y2+V/migaqIJkBUVRtfqPBI6O44pMPmDJXawyZoNHqH uYaArp5m20ZMS4AK6yqvwbvY48pBpir8fcrrM+sKI89iQ5lhVxzw3bl/fOwUMYgvIR8H 3k4APpw+ucogOgoF1gOf+5NCjXK3frjUoFd554gmb+6UYGZSZX1jWxbP3XF3ndTPPjGd 7VVMFiaX1WCj79EWN3Dd6D2RF6fBdHW49KnIxQu4UeLsXJ2AbrTjIjR2EdhI3afvEdQP dVtHnHqnuh8qKgH2i4OFRD0WMH4rV9MpyzNiU0R3OVEHtdaHZ9Nj6Z3IlQoicM5FX3CQ 9xXw== X-Gm-Message-State: APjAAAWIhln+9aFBAgMltpStw3KCKMe0wx9jFwzi9SLFU8SzazBer1oX 93jujdskd4mzxVeODpX/zq4= X-Google-Smtp-Source: APXvYqwf3Y2XAi7u2qNJRKRkKDQV20c+PEuElI0yUCGY1S8JLzS4wxhZN5rjfaR7wsnHeHMBXU6t5g== X-Received: by 2002:a05:6830:4cd:: with SMTP id s13mr1710548otd.181.1580349550068; Wed, 29 Jan 2020 17:59:10 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id r13sm1216891oic.52.2020.01.29.17.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 17:59:09 -0800 (PST) From: Nathan Chancellor To: Kalle Valo Subject: [PATCH] ath11k: Silence clang -Wsometimes-uninitialized in ath11k_update_per_peer_stats_from_txcompl Date: Wed, 29 Jan 2020 18:59:05 -0700 Message-Id: <20200130015905.18610-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200129_175912_615330_001F6F56 X-CRM114-Status: GOOD ( 10.88 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [natechancellor[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor , ci_notify@linaro.org, ath11k@lists.infradead.org Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org Clang warns a few times (trimmed for brevity): ../drivers/net/wireless/ath/ath11k/debugfs_sta.c:185:7: warning: variable 'rate_idx' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] It is not wrong, rate_idx is only initialized in the first if block. However, this is not necessarily an issue in practice because rate_idx will only be used when initialized because ath11k_accumulate_per_peer_tx_stats only uses rate_idx when flags is not set to RATE_INFO_FLAGS_HE_MCS, RATE_INFO_FLAGS_VHT_MCS, or RATE_INFO_FLAGS_MCS. Still, it is not good to stick uninitialized values into another function so initialize it to zero to prevent any issues down the line. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Link: https://github.com/ClangBuiltLinux/linux/issues/832 Reported-by: ci_notify@linaro.org Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers --- drivers/net/wireless/ath/ath11k/debugfs_sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/debugfs_sta.c b/drivers/net/wireless/ath/ath11k/debugfs_sta.c index 743760c9bcae..a5bdd16d6d46 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath11k/debugfs_sta.c @@ -136,7 +136,7 @@ void ath11k_update_per_peer_stats_from_txcompl(struct ath11k *ar, struct ath11k_sta *arsta; struct ieee80211_sta *sta; u16 rate; - u8 rate_idx; + u8 rate_idx = 0; int ret; u8 mcs;