Takashi Iwai 37e159
From 48a75b979940f8aa838143e976455aa0e629e638 Mon Sep 17 00:00:00 2001
Takashi Iwai 37e159
From: Nathan Chancellor <nathan@kernel.org>
Takashi Iwai 37e159
Date: Tue, 24 May 2022 07:56:55 -0700
Takashi Iwai 37e159
Subject: [PATCH] ath6kl: Use cc-disable-warning to disable -Wdangling-pointer
Takashi Iwai 37e159
Git-commit: 48a75b979940f8aa838143e976455aa0e629e638
Takashi Iwai 37e159
Patch-mainline: v5.19-rc1
Takashi Iwai 37e159
References: bsc#1206451
Takashi Iwai 37e159
Takashi Iwai 37e159
Clang does not support this option so the build fails:
Takashi Iwai 37e159
Takashi Iwai 37e159
  error: unknown warning option '-Wno-dangling-pointer' [-Werror,-Wunknown-warning-option]
Takashi Iwai 37e159
Takashi Iwai 37e159
Use cc-disable-warning so that the option is only added when it is
Takashi Iwai 37e159
supported.
Takashi Iwai 37e159
Takashi Iwai 37e159
Fixes: bd1d129daa3e ("wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12")
Takashi Iwai 37e159
Reported-by: "kernelci.org bot" <bot@kernelci.org>
Takashi Iwai 37e159
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Takashi Iwai 37e159
Reviewed-by: Tom Rix <trix@redhat.com>
Takashi Iwai 37e159
Link: https://lore.kernel.org/r/20220524145655.869822-1-nathan@kernel.org
Takashi Iwai 37e159
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Takashi Iwai 37e159
Acked-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 37e159
Takashi Iwai 37e159
---
Takashi Iwai 37e159
 drivers/net/wireless/ath/ath6kl/Makefile | 2 +-
Takashi Iwai 37e159
 1 file changed, 1 insertion(+), 1 deletion(-)
Takashi Iwai 37e159
Takashi Iwai 37e159
diff --git a/drivers/net/wireless/ath/ath6kl/Makefile b/drivers/net/wireless/ath/ath6kl/Makefile
Takashi Iwai 37e159
index 01cc0d50fee6..a75bfa9fd1cf 100644
Takashi Iwai 37e159
--- a/drivers/net/wireless/ath/ath6kl/Makefile
Takashi Iwai 37e159
+++ b/drivers/net/wireless/ath/ath6kl/Makefile
Takashi Iwai 37e159
@@ -38,7 +38,7 @@ ath6kl_core-y += recovery.o
Takashi Iwai 37e159
 
Takashi Iwai 37e159
 # FIXME: temporarily silence -Wdangling-pointer on non W=1+ builds
Takashi Iwai 37e159
 ifndef KBUILD_EXTRA_WARN
Takashi Iwai 37e159
-CFLAGS_htc_mbox.o += -Wno-dangling-pointer
Takashi Iwai 37e159
+CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer)
Takashi Iwai 37e159
 endif
Takashi Iwai 37e159
 
Takashi Iwai 37e159
 ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
Takashi Iwai 37e159
-- 
Takashi Iwai 37e159
2.35.3
Takashi Iwai 37e159