Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C385D14AAC for ; Sun, 29 Oct 2023 22:58:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dnNrbgC3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3566EC41679; Sun, 29 Oct 2023 22:58:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698620286; bh=zciaxIwhax2IHkdmjw3hCzXNaZOtIJu8wdTJbw2dMLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dnNrbgC3+CJ3xt2KoiT/BOmVHHliVio3y4pPd1MhJgfM2DUlzjv33IZnAfxIK6h85 XNHUD5sVOq1yIqcy1Ndc4FUuHCIqCrIysMuNDCm9XaqYeETMpMnHFxtyX+DP0VPyBs H5+qyt72CfgohdaO8TzsJ+lX+g0PwDUs9MFdfUCBojxG23BUQELq5wvGra5i7RE2mu FmKgEtJXum+j7yvZAtdI4KbuksIiLlyoLovnDJs8pqJLkZhyXzMGBUnWrwNPA9ICez 3o4ZKowAtJRbxcX9dPA5RJa9Jki7TghlQX/ARm6v4S1k+xQu4yxiI79gUZeokK5vi7 prIR2Eh60LWsw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Florian Westphal , kernel test robot , Sasha Levin , pablo@netfilter.org, kadlec@netfilter.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 6.1 18/39] netfilter: nfnetlink_log: silence bogus compiler warning Date: Sun, 29 Oct 2023 18:56:50 -0400 Message-ID: <20231029225740.790936-18-sashal@kernel.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231029225740.790936-1-sashal@kernel.org> References: <20231029225740.790936-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.60 Content-Transfer-Encoding: 8bit From: Florian Westphal [ Upstream commit 2e1d175410972285333193837a4250a74cd472e6 ] net/netfilter/nfnetlink_log.c:800:18: warning: variable 'ctinfo' is uninitialized The warning is bogus, the variable is only used if ct is non-NULL and always initialised in that case. Init to 0 too to silence this. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309100514.ndBFebXN-lkp@intel.com/ Signed-off-by: Florian Westphal Signed-off-by: Sasha Levin --- net/netfilter/nfnetlink_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index d97eb280cb2e8..c5ff699e30469 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c @@ -690,8 +690,8 @@ nfulnl_log_packet(struct net *net, unsigned int plen = 0; struct nfnl_log_net *log = nfnl_log_pernet(net); const struct nfnl_ct_hook *nfnl_ct = NULL; + enum ip_conntrack_info ctinfo = 0; struct nf_conn *ct = NULL; - enum ip_conntrack_info ctinfo; if (li_user && li_user->type == NF_LOG_TYPE_ULOG) li = li_user; -- 2.42.0