Skip to contentSkip to conversation

pinctrl: aspeed: Wrap -Woverride-init with cc-option

PATCH In review Nathan Chancellor 4 participants 5 messages Dec 11, 2018 – Dec 16, 2018

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

PATCH 1/1 pinctrl: aspeed: Wrap -Woverride-init with cc-option

Clang does not support this option:

warning: unknown warning option '-Woverride-init'; did you mean '-Woverride-module'? [-Wunknown-warning-option]
1 warning generated.

---
 drivers/pinctrl/aspeed/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/aspeed/Makefile +1 -1
index 191ed0fc1804..790b406aae19 100644
@@ -1,6 +1,6 @@
 # Aspeed pinctrl support
 
-ccflags-y += -Woverride-init
+ccflags-y += $(call cc-option,-Woverride-init)
 obj-$(CONFIG_PINCTRL_ASPEED)	+= pinctrl-aspeed.o
 obj-$(CONFIG_PINCTRL_ASPEED_G4)	+= pinctrl-aspeed-g4.o
 obj-$(CONFIG_PINCTRL_ASPEED_G5)	+= pinctrl-aspeed-g5.o
Signature · 1 line
2.20.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Nathan Chancellor

Clang does not support this option:

warning: unknown warning option '-Woverride-init'; did you mean '-Woverride-module'? [-Wunknown-warning-option]
1 warning generated.

Quoted 19 lines
---
 drivers/pinctrl/aspeed/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/aspeed/Makefile +1 -1
index 191ed0fc1804..790b406aae19 100644
@@ -1,6 +1,6 @@
 # Aspeed pinctrl support
 
-ccflags-y += -Woverride-init
+ccflags-y += $(call cc-option,-Woverride-init)
 obj-$(CONFIG_PINCTRL_ASPEED)	+= pinctrl-aspeed.o
 obj-$(CONFIG_PINCTRL_ASPEED_G4)	+= pinctrl-aspeed-g4.o
 obj-$(CONFIG_PINCTRL_ASPEED_G5)	+= pinctrl-aspeed-g5.o
Signature · 1 line
2.20.0
maintainer Acked-by
#2 lore raw
Quoted 6 lines · Andrew Jeffery
Quoted 2 lines · Nathan Chancellor

Clang does not support this option:

Quoted 7 lines
Quoted 5 lines

warning: unknown warning option '-Woverride-init'; did you mean '-Woverride-module'? [-Wunknown-warning-option]
1 warning generated.

Thanks Nathan.

Andrew explained to me that this warning helps find bugs when developing the complicated (some would say crazy) set of macros that this pinctrl driver uses. It would be good to have this warning available in clang. Do we have a clang issue opened for that?

Cheers,

Joel

#3 lore raw
Quoted 22 lines · Joel Stanley
Quoted 6 lines · Andrew Jeffery
Quoted 2 lines · Nathan Chancellor

Clang does not support this option:

Quoted 7 lines
Quoted 5 lines

warning: unknown warning option '-Woverride-init'; did you mean '-Woverride-module'? [-Wunknown-warning-option]
1 warning generated.

Thanks Nathan.

Andrew explained to me that this warning helps find bugs when developing the complicated (some would say crazy) set of macros that this pinctrl driver uses. It would be good to have this warning available in clang. Do we have a clang issue opened for that?

Quoted 5 lines

Cheers,

Joel

Hi Joel,

I just opened https://github.com/ClangBuiltLinux/linux/issues/293.

I searched the LLVM issue tracker and haven't see any reference of this. I can file an issue but if you are a little more familiar with this warning, you are welcome to do it instead.

Thanks for the quick response,
Nathan