From patchwork Fri May 20 19:43:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 12857399 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8999EC4332F for ; Fri, 20 May 2022 19:43:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353286AbiETTnb (ORCPT ); Fri, 20 May 2022 15:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59424 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353281AbiETTn1 (ORCPT ); Fri, 20 May 2022 15:43:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75D73199489; Fri, 20 May 2022 12:43:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F7C361B9A; Fri, 20 May 2022 19:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB9ECC34115; Fri, 20 May 2022 19:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653075805; bh=7YbNykz9c0aOCfyDPVpLz+qw4U51npRt4eZFKtm6Hoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qWUE9y/h7QwfETx0oy7xKGmX5Xbb6QWoIx57tCK1rS27ZXCPMC5goUnEKRcnrn8W3 ziF7gZ4qmWgFClZSaFdAAg2ncvljRLlUX8V+cCIpgcpFTEbRlWU26ODdCnzKYLQTjH 6Zz5zvpXFTrGBzlxe1J1RJ4oQjUYh5SvD4cRvyuahuxlHAmOhW1mL4U96vFh6OV90g WnoblE4At5zYaTpaodBxkhl6J7vaewMHV4+Cj3P1YO4aSXdfHqu4Fjyg0tZTapuf1Y tR35OqBy1ydxOyE1P7JbhXzWziWl/c7c9Imu40HyDlW8h96b4ZGiwR5xtlJw6p6L0l H9JiWmbEa/4ng== From: Jakub Kicinski To: kvalo@kernel.org, johannes@sipsolutions.net Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Jakub Kicinski Subject: [PATCH net-next 4/8] wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12 Date: Fri, 20 May 2022 12:43:16 -0700 Message-Id: <20220520194320.2356236-5-kuba@kernel.org> X-Mailer: git-send-email 2.34.3 In-Reply-To: <20220520194320.2356236-1-kuba@kernel.org> References: <20220520194320.2356236-1-kuba@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org For some reason GCC 12 decided to complain about the common pattern of queuing an object onto a list on the stack in ath6k: inlined from ‘ath6kl_htc_mbox_tx’ at drivers/net/wireless/ath/ath6kl/htc_mbox.c:1142:3: include/linux/list.h:74:19: warning: storing the address of local variable ‘queue’ in ‘*&packet_15(D)->list.prev’ [-Wdangling-pointer=] 74 | new->prev = prev; | ~~~~~~~~~~^~~~~~ Move the warning to W=1, hopefully it goes away with a compiler update. Signed-off-by: Jakub Kicinski --- CC: kvalo@kernel.org CC: linux-wireless@vger.kernel.org --- drivers/net/wireless/ath/ath6kl/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath6kl/Makefile b/drivers/net/wireless/ath/ath6kl/Makefile index dc2b3b46781e..01cc0d50fee6 100644 --- a/drivers/net/wireless/ath/ath6kl/Makefile +++ b/drivers/net/wireless/ath/ath6kl/Makefile @@ -36,6 +36,11 @@ ath6kl_core-y += wmi.o ath6kl_core-y += core.o ath6kl_core-y += recovery.o +# FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds +ifndef KBUILD_EXTRA_WARN +CFLAGS_htc_mbox.o += -Wno-dangling-pointer +endif + ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o ath6kl_core-$(CONFIG_ATH6KL_TRACING) += trace.o