Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2531109rdb; Wed, 21 Feb 2024 10:21:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVIkirDXUBu1pWLeqpb0H46FkWJrJ7P+twJP9Z8kkGg+UdQliF0Ug7w0k5ogQ9viQC/VzMpoKgjtVS8kWhJz07HFdQfFvt5F3Wi7La6Nw== X-Google-Smtp-Source: AGHT+IFExG5a/OJ7LkNsr5C0rq5zYJ9d8YWes2RdDZBMMPxB+dd+xDjOMyR/rPLzMBxiL2mS9bVt X-Received: by 2002:a17:906:3517:b0:a3f:5991:8a83 with SMTP id r23-20020a170906351700b00a3f59918a83mr1071121eja.43.1708539670140; Wed, 21 Feb 2024 10:21:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708539670; cv=pass; d=google.com; s=arc-20160816; b=Coeac/ursNnMXPoOOPI0hK0woJnoBfzPwXg6HUUIL4XaidORHTB9s4crH6hqBUbK6k QNtVGS91fvBz3352Lj4DVHGAbpwvHBQzXmqtTURMeS6V/6VeCQQy5RQH6bBj1e0Fdhwd g+hC/xmK0RAY6IsCrjO0KPcfossx2D1qA7P2sA3iW99RfE0HjBiT9muMK1lgwbjglyHW G3t846NxejIklFWk0NwugY/3QuF6/fgkcegPeaR8+Ek4xR3WANNKGhqTDhwdi3r0FFDo w825aSkY8Uous9ZPuvOyog/YXt/N6nntc2CZh6UN4+kiN11iFHnXhZkm3oFeURQeEt4H vp+w== 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=pPqTA10aUTd7OyOTWQU0Z21UeSO6OCcIhtgZ2d+qAbk=; fh=zFPB44rXYyDvg75ybOLa3f4qAJt9d3JsDOox7tl4OQQ=; b=vkW9Tp+PWj8vu3d1ors7DEZaYC6RNIe6zF7XENxVBUoPw1hekVJEIcGwUx0RgBXXK+ wVmMT+9HTrEQY8qe+KEpoSu948O2k8bpaSjBQJLF+0FmsNP1WqG/zXkYv/zGOcbK7jse gWldBijbpqsT9MB6Nxd7uDPnIibQ1Yh16eptSLE1Wv9eHpILb/u3siTIvUDh6Dx/FStl XtwbeM2fIGOTFRHiI8zUwy+AxS0s0Mfm9YK+zhb7TMcZYV0b22CwV4Lw0xH5etXLSdtg Y/rJgZBE9N8/VL1s+6iAE+mY693PC9gs28fsdfe+xGxW2lOKUrn324jMCZW9Nr8886Qo acNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F561lTe2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3874-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m8-20020a1709062ac800b00a3ec1dd0f8bsi2667615eje.997.2024.02.21.10.21.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 10:21:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F561lTe2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-3874-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3874-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DF0901F24EA7 for ; Wed, 21 Feb 2024 18:21:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5AA684FD8; Wed, 21 Feb 2024 18:21:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F561lTe2" 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 BAA4784FA5; Wed, 21 Feb 2024 18:21:06 +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=1708539666; cv=none; b=tdO+sQkpVr4NH/Hc9SXKVScuwoQwhL3YGwHNoqqlZBoclBYsqwCjKxsiZccZGOz7c9v/ue26FXy7BdY4+4DEdnBaKT/rdOhbAq+sVHW8a9YkUnxGCu+AIihOe89JcjG2ZwNl5eobv/aeRGllyHbm8f2MiviYiEjCSa7q2s57vpA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708539666; c=relaxed/simple; bh=tQaWzc3U8kyTUOyG3hGc5iK+s3OXDgj0AzeWKbHcNFY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=OJacFxZj2AVayfzj1rvhKnw7xtnH8oFqV9owaLEducMB0X7LKCe+KCGdiCONiP58U2eKmHEh/lAeoLVrd9APrdwMwt/+PaUozmw6Kiz/Arbrw10udpE315Hir+SvhFIwNLq2+242kC5MHlovNQBcFtbMOKmkX3sNnYEME0YGLd0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F561lTe2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AECEC433F1; Wed, 21 Feb 2024 18:21:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708539666; bh=tQaWzc3U8kyTUOyG3hGc5iK+s3OXDgj0AzeWKbHcNFY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=F561lTe2JDbsfjGXvYgvVLgEO0kOuviDsp5/faAf/biHQ56QorfmvA/inS1XrvfJT GGtIXWZQlyOn5zCgu/CCCVTEiD04wc86dJrO11M4oo3hNJ9x+e22aEvo5bh/vwUdvw xL8M1UF4iaWsh+2Fu/L6Y1S4kB2YJ0CGKU3nn/Mf6n9ke3kq9i6sbIrpXlTbGqTm6J aLMhDan+ZxNA8DQzdiZiWA26zT5RQMq+un8HT1tEe39ugLStCXw08gbBusOz086znX qus+lwKIc/AqREgUHCJPCeL8CMdRHerpzHrIxreGEZJoYE8nOAyQ+WjOGOlJdhmIKi 3vPYYPiCARF6w== From: Kalle Valo To: Nathan Chancellor Cc: quic_jjohnson@quicinc.com, morbo@google.com, justinstitt@google.com, quic_periyasa@quicinc.com, ath12k@lists.infradead.org, linux-wireless@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH] wifi: ath12k: Fix uninitialized use of ret in ath12k_mac_allocate() References: <20240205-ath12k-mac-wuninitialized-v1-1-3fda7b17357f@kernel.org> <170731849247.2220494.17976129376947521581.kvalo@kernel.org> <20240221180013.GA2074929@dev-arch.thelio-3990X> Date: Wed, 21 Feb 2024 20:21:02 +0200 In-Reply-To: <20240221180013.GA2074929@dev-arch.thelio-3990X> (Nathan Chancellor's message of "Wed, 21 Feb 2024 11:00:13 -0700") Message-ID: <87ttm1llv5.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 Nathan Chancellor writes: > Hi Kalle, > > On Wed, Feb 07, 2024 at 03:08:14PM +0000, Kalle Valo wrote: >> Nathan Chancellor wrote: >> >> > Clang warns (or errors with CONFIG_WERROR=y): >> > >> > drivers/net/wireless/ath/ath12k/mac.c:8060:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] >> > 8060 | return ret; >> > | ^~~ >> > drivers/net/wireless/ath/ath12k/mac.c:8022:9: note: initialize >> > the variable 'ret' to silence this warning >> > 8022 | int ret, i, j; >> > | ^ >> > | = 0 >> > 1 error generated. >> > >> > Commit 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 >> > hw") added a completely uninitialized use of ret. Prior to that change, >> > -ENOMEM was returned to the callers of ath12k_mac_allocate() whenever >> > ath12k_mac_hw_allocate() failed. Assign that value to ret to make sure >> > it is always initialized when used and clear up the warning. >> > >> > Closes: https://github.com/ClangBuiltLinux/linux/issues/1989i >> > Fixes: 6db6e70a17f6 ("wifi: ath12k: Introduce the container for mac80211 hw") >> > Signed-off-by: Nathan Chancellor >> > Acked-by: Jeff Johnson >> > Signed-off-by: Kalle Valo >> >> Patch applied to ath-next branch of ath.git, thanks. >> >> 04edb5dc68f4 wifi: ath12k: Fix uninitialized use of ret in ath12k_mac_allocate() > > It doesn't seem like this tree or branch flows into -next on its own, so > this patch is not present in and the build still breaks on > next-20240221. Can this be fixed so that this warning stops breaking our > builds? Yeah, ath-next is not pulled to linux-next because of "reasons". We are planning to send ath-next pull request to wireless-next in the next few days. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches