From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E880C18E5B for ; Mon, 16 Mar 2020 21:15:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 23FB220663 for ; Mon, 16 Mar 2020 21:15:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oJl+8nZd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732670AbgCPVPb (ORCPT ); Mon, 16 Mar 2020 17:15:31 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:34671 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732648AbgCPVPb (ORCPT ); Mon, 16 Mar 2020 17:15:31 -0400 Received: by mail-pj1-f66.google.com with SMTP id q16so1714520pje.1 for ; Mon, 16 Mar 2020 14:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KaK149mcvHpJfMxye3tXJbFCoSJn6xDOGuQiZnEv0Kw=; b=oJl+8nZd+9LHzT40nJyJpJtsqNnnWAFfqgFRQndl19IpKUIGbqNdVNhBE9WEOnIV2g 2c7b3BSJ2ogdeQ7VuOP3OiFyCQhSdVd4J4VA/4APGFx+yohktiZTEaRER/oQ6B/d0NfX sDTXa9db3Gn1XzHA6McRVnzpwTMdcs05FxmGYBXr8VfyQLCCTQ3TcSRAwCg/f18wya2n eAgUrOvBOl8xxzXeFDzOJCdbveNC4EF1CJOXWlfSmn30fGKE489oQw+ZujOzTAuarzRF Sm/4j7xsi8YJ3N+3bw6oHU/rDwv9zoCOgyZScV7WUyLnnsFloGsOpmt05pPwfivRg5h6 3oow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KaK149mcvHpJfMxye3tXJbFCoSJn6xDOGuQiZnEv0Kw=; b=qxTdhXi6PJQKOQ81eSyl1wSHNozsNJKH7Y2zvbuo0AOkWxtBXDhgStpfskXALe6Tw2 1OW0BPUJYIc2TtskLNrM5IPQGOLyi1xuFh/owRw1RiDOSQ1NSWmcu6cUxjIunV0S4wr0 J8BrbfyrH97wxlaHCE8aHdk9II3z9udAaHVtCchp1X5Wa3xsLqPIPXD1fnAjqEcdNaZU xyTgvjQgJVnCExQvdqU+u29Erub9G4i94XeP8rZ0VPZB13Di7WCMziasdDTCAlARu7X9 x3usIlsrXa0fZVNZqQlPssX5NHfI+bk0d7DwKo6flMQrkzvOm0po6gUh0eXvuDby2NHK +7Dg== X-Gm-Message-State: ANhLgQ0oHPnbhWFfCtLZ37WLI/B/auzlzCxXHcms7FBtu5jwKr6iLpyT YHYivV9JThPhxsqyCR9d2sTx9cXpkdtUAZRV7+RX0g== X-Google-Smtp-Source: ADFU+vsLMv4vfYgKJM3UACye15ScgavNMy5rn/D4RIYctClFBjL2Holw5IElKcomCXFXEdmQBRVk31RXNl8gfxVrZiI= X-Received: by 2002:a17:90b:311:: with SMTP id ay17mr1531492pjb.27.1584393329930; Mon, 16 Mar 2020 14:15:29 -0700 (PDT) MIME-Version: 1.0 References: <20200130015905.18610-1-natechancellor@gmail.com> <20200211142431.243E6C433A2@smtp.codeaurora.org> In-Reply-To: <20200211142431.243E6C433A2@smtp.codeaurora.org> From: Nick Desaulniers Date: Mon, 16 Mar 2020 14:15:17 -0700 Message-ID: Subject: Re: [PATCH] ath11k: Silence clang -Wsometimes-uninitialized in ath11k_update_per_peer_stats_from_txcompl To: Kalle Valo Cc: Nathan Chancellor , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Network Development , LKML , clang-built-linux , CI Notify Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Kalle, I still see this warning in KernelCI builds of linux-next. Is ath-next flowing into linux-next? I just want to triple check that this fix gets sent along. On Tue, Feb 11, 2020 at 6:24 AM Kalle Valo wrote: > > Nathan Chancellor wrote: > > > 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 > > Signed-off-by: Kalle Valo > > Patch applied to ath-next branch of ath.git, thanks. > > df57acc415b1 ath11k: Silence clang -Wsometimes-uninitialized in ath11k_update_per_peer_stats_from_txcompl > > -- > https://patchwork.kernel.org/patch/11357331/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200211142431.243E6C433A2%40smtp.codeaurora.org. -- Thanks, ~Nick Desaulniers From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pj1-x1041.google.com ([2607:f8b0:4864:20::1041]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDx5B-0002TC-6R for ath11k@lists.infradead.org; Mon, 16 Mar 2020 21:15:34 +0000 Received: by mail-pj1-x1041.google.com with SMTP id q16so1714522pje.1 for ; Mon, 16 Mar 2020 14:15:30 -0700 (PDT) MIME-Version: 1.0 References: <20200130015905.18610-1-natechancellor@gmail.com> <20200211142431.243E6C433A2@smtp.codeaurora.org> In-Reply-To: <20200211142431.243E6C433A2@smtp.codeaurora.org> From: Nick Desaulniers Date: Mon, 16 Mar 2020 14:15:17 -0700 Message-ID: Subject: Re: [PATCH] ath11k: Silence clang -Wsometimes-uninitialized in ath11k_update_per_peer_stats_from_txcompl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath11k" Errors-To: ath11k-bounces+kvalo=adurom.com@lists.infradead.org To: Kalle Valo Cc: Network Development , linux-wireless@vger.kernel.org, LKML , clang-built-linux , Nathan Chancellor , CI Notify , ath11k@lists.infradead.org Hi Kalle, I still see this warning in KernelCI builds of linux-next. Is ath-next flowing into linux-next? I just want to triple check that this fix gets sent along. On Tue, Feb 11, 2020 at 6:24 AM Kalle Valo wrote: > > Nathan Chancellor wrote: > > > 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 > > Signed-off-by: Kalle Valo > > Patch applied to ath-next branch of ath.git, thanks. > > df57acc415b1 ath11k: Silence clang -Wsometimes-uninitialized in ath11k_update_per_peer_stats_from_txcompl > > -- > https://patchwork.kernel.org/patch/11357331/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200211142431.243E6C433A2%40smtp.codeaurora.org. -- Thanks, ~Nick Desaulniers _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k