Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2565511rbb; Wed, 28 Feb 2024 06:02:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW57XQ6aglXxpr9x7pW2bw5Z7WLWQbWT61tmtPHkC0HElnxgKU17TuZ8ygkYck+kbb7/GytNZOy68PlKJSCph9f7upgJ+Ak2MFW3/y6pg== X-Google-Smtp-Source: AGHT+IExujcZLvudnuQlwqIVnZysMn5APVHuwohoLqOs2pmnuF/PAhp6olU8pRBmvtjx30qVPfJO X-Received: by 2002:a81:a981:0:b0:608:4cee:e71f with SMTP id g123-20020a81a981000000b006084ceee71fmr5095137ywh.32.1709128957460; Wed, 28 Feb 2024 06:02:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709128957; cv=pass; d=google.com; s=arc-20160816; b=ahN9ugo7ep7Y0h+e1jyaZdYS3vPkebc2lRrA10r+qh4YMcQQPN3F+mp++bCK926kJF sSuSrgc/8hS9IzmF8YPL/OuIlNwg8ioG94VQZj2BI2Q4x/pQ5czT1L/OOPCNWLnpxbpe gXZ0NfGX0pAjIYtxrZeu7RKztgkxceOPo9jCpIwxtftO+UOy8gjj4BVN3cL6DkjYH09m wEWj7VpQvCFyr5Qgu83391yOjJf/zl/AylqDuqkNv9j6wkMxiboz8ZyePeSBbIoyRIe6 /LmHsVB3F3VaCPp2EIIytmskXTuRyE/ZRH37mp79LHdMbo/fv9P36Q2H5+VntykBDQng oxqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=NtVZWVpU5R9hAHptwiMhbrmLXWCn2BTLHVeNkeWNIZs=; fh=45+RYGQTAjnpJn6wj2uO9K7eAId/ajb94FGivAjzOo4=; b=CvzIJaV8r6DlqwqVY4ch2/3nYeLOW+hluRefyB+5DzkH4hcfLrv78wrK2xroQOoqtz 5GvtP6y8zRE2YLQ7ns47MdIp93m1MfeyNhiDkaR0/OaUYw1WMLrBUVccWeaqnqoR4Jtm ioSuTHlYb61tCzq7G4Kmr7ABI5Tm+IAoHtwHnolb5EnTB4zq6ghkp0BHymrp/8x5yRQ5 1JgCwqXG3avI4vu65qoWStS4j7fjEQFb6Yp4NhXQiCOQmJl7zGdjCBHEvJ4epmSPfB/d lnYuwiqi8tBg3UFzDXvhU6PeoMEtWmfVcGxGMzhYc1Ue29OEJE39v6oSgWNgVOZD4Gw/ DICQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu7ykhg2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q4-20020a819904000000b006048126bbe5si3503303ywg.433.2024.02.28.06.02.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 06:02:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tu7ykhg2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4193-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 854501C261EA for ; Wed, 28 Feb 2024 14:01:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11044145341; Wed, 28 Feb 2024 14:01:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tu7ykhg2" X-Original-To: linux-wireless@vger.kernel.org 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 D75AF151CC5 for ; Wed, 28 Feb 2024 14:01:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709128873; cv=none; b=n+5K+kS9mUxLMwvaXy1fgMGv3wSR04BxZ6HE6h37g+PHY9FfrFnj8F5blKXiHmP5CsRHwownEn4xPNCDwMmK6Vq84Y4L/BdCjGMdhMe1ezuFg0Rqizcw9EUnzCGFH+pzhEVyMozS+Ko0dggLzjCoCcbR6pIxYdtdLxca3W9NMuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709128873; c=relaxed/simple; bh=PQzkPrDo1YRo7+0s5+rzZSeJRnOLSEyHGwogClOAXNE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=V4sDyux6kfQD9TtPk8XiZetFWkjPHeTlacZKy0d2MRZ9PUOXcEoSWPmzr5gCIOQPO1FMpu3VTepWdCndiWFZPh7LrguwVfk0SMYghaYQu8L61Uz5iBJDZ3t9gkhixC3YSorfq4vsBiYxt033TqcuWxtspBCVjMBh6kuI7FwpmUY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tu7ykhg2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2272AC433C7; Wed, 28 Feb 2024 14:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709128873; bh=PQzkPrDo1YRo7+0s5+rzZSeJRnOLSEyHGwogClOAXNE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=tu7ykhg2nMk6abggJ0xU/tnHpUtTaVix0hYBh+eRcNsV0e18t0ryQ5Q5wxnPjUpLn 6k9rmoc1F8Xed9MQJ64a2IaywyhUhqGRdBruCM8GDrrJFfh9zkYwHZLrh3/Usuk4BU EbG+hOGUIoO1N5jismTvvvsMZIkeXPqEfLjlvgdWw/W6kAeeJTMx0ejMZJ50Hh9Zzh Pzktv6+nVEzWf2FN7Q5L0Mh45puvL8tQmIhalc26bVr6jul8zYyQm07aJlLMJXKXcG +lt1Smgzr2SxS5M0bWk/5zu3GmYj98LKySZGJciVq97AwQQUfVssZLo4QKa0u9BGli SiAkpTgI2weZg== From: Kalle Valo To: Dmitry Antipov Cc: Baochen Qiang , Jeff Johnson , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] wifi: ath11k: fix few -Wmaybe-uninitialized warnings References: <20240228131406.165786-1-dmantipov@yandex.ru> Date: Wed, 28 Feb 2024 16:01:10 +0200 In-Reply-To: <20240228131406.165786-1-dmantipov@yandex.ru> (Dmitry Antipov's message of "Wed, 28 Feb 2024 16:14:06 +0300") Message-ID: <875xy8k7rt.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Dmitry Antipov writes: > When compiling with gcc version 14.0.1 20240226 (experimental) and > W=12, I've noticed the following warnings: > > drivers/net/wireless/ath/ath11k/mac.c: In function 'ath11k_mac_op_remain_on_channel': > drivers/net/wireless/ath/ath11k/mac.c:9230:12: warning: 'ret' may be used uninitialized > [-Wmaybe-uninitialized] > 9230 | if (ret) > > drivers/net/wireless/ath/ath11k/qmi.c: In function 'ath11k_qmi_load_file_target_mem': > drivers/net/wireless/ath/ath11k/qmi.c:2401:16: warning: 'ret' may be used uninitialized > [-Wmaybe-uninitialized] > 2401 | return ret; > > drivers/net/wireless/ath/ath11k/qmi.c: In function 'ath11k_qmi_load_bdf_qmi': > drivers/net/wireless/ath/ath11k/qmi.c:2494:17: warning: 'fw_entry' may be used uninitialized > [-Wmaybe-uninitialized] > 2494 | release_firmware(fw_entry); > > And a bunch of them traced to uninitialized fields of the same > variable, e.g.: > > drivers/net/wireless/ath/ath11k/spectral.c: In function 'ath11k_spectral_process_data': > drivers/net/wireless/ath/ath11k/spectral.c:700:47: warning: 'summ_rpt.meta.freq1' may > be used uninitialized [-Wmaybe-uninitialized] > 700 | struct ath11k_spectral_summary_report summ_rpt; > > Fix all of the above by using 0 and NULL initializers where appropriate. > Note there are few more (less obvious) -Wmaybe-uninitialized warnings > still remains, but they're hardly possible to fix without running on > a physical hardware. Compile tested oly. > > Also noticed by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Dmitry Antipov Did you verify that the warnings are valid? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches