Skip to contentSkip to conversation

ath6kl: Use cc-disable-warning to disable -Wdangling-pointer

PATCH Applied Nathan Chancellor 4 participants 4 messages May 24, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/net/wireless/ath/ath6kl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/Makefile +1 -1
index 01cc0d50fee6..a75bfa9fd1cf 100644
@@ -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

base-commit: 677fb7525331375ba2f90f4bc94a80b9b6e697a3

Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Nathan Chancellor

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")

Thanks

Tom

Quoted 19 lines
---
  drivers/net/wireless/ath/ath6kl/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/Makefile +1 -1
index 01cc0d50fee6..a75bfa9fd1cf 100644
@@ -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

base-commit: 677fb7525331375ba2f90f4bc94a80b9b6e697a3

#2 lore raw
In reply to Nathan Chancellor

From: Nathan Chancellor <[email protected]>
Date: Tue, 24 May 2022 07:56:55 -0700

Quoted 10 lines

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")

I was just about to send it :D

Quoted 18 lines
---
 drivers/net/wireless/ath/ath6kl/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/ath/ath6kl/Makefile +1 -1
index 01cc0d50fee6..a75bfa9fd1cf 100644
@@ -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
Quoted 3 lines

base-commit: 677fb7525331375ba2f90f4bc94a80b9b6e697a3

Signature · 1 line
2.36.1

Thanks,
Al

#3 lore raw
In reply to Nathan Chancellor
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 24 May 2022 07:56:55 -0700 you wrote:

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.

[...]

Here is the summary with links:
- ath6kl: Use cc-disable-warning to disable -Wdangling-pointer

    https://git.kernel.org/netdev/net-next/c/48a75b979940

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html