From: Nathan Chancellor Date: Tue, 24 May 2022 14:56:55 +0000 (-0700) Subject: ath6kl: Use cc-disable-warning to disable -Wdangling-pointer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=48a75b979940f8aa838143e976455aa0e629e638;p=linux.git ath6kl: Use cc-disable-warning to disable -Wdangling-pointer Clang does not support this option so the build fails: error: unknown warning option '-Wno-dangling-pointer' [-Werror,-Wunknown-warning-option] Use cc-disable-warning so that the option is only added when it is supported. Fixes: bd1d129daa3e ("wifi: ath6k: silence false positive -Wno-dangling-pointer warning on GCC 12") Reported-by: "kernelci.org bot" Signed-off-by: Nathan Chancellor Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20220524145655.869822-1-nathan@kernel.org Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/wireless/ath/ath6kl/Makefile b/drivers/net/wireless/ath/ath6kl/Makefile index 01cc0d50fee6f..a75bfa9fd1cfd 100644 --- a/drivers/net/wireless/ath/ath6kl/Makefile +++ b/drivers/net/wireless/ath/ath6kl/Makefile @@ -38,7 +38,7 @@ 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 +CFLAGS_htc_mbox.o += $(call cc-disable-warning, dangling-pointer) endif ath6kl_core-$(CONFIG_NL80211_TESTMODE) += testmode.o