@@ -1,6 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux MDIO bus drivers
+# Enable W=1 by default
+subdir-ccflags-y := $(KBUILD_CFLAGS_WARN1)
+
obj-$(CONFIG_MDIO_ASPEED) += mdio-aspeed.o
obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux PCS drivers
+# Enable W=1 by default
+subdir-ccflags-y := $(KBUILD_CFLAGS_WARN1)
+
obj-$(CONFIG_PCS_XPCS) += pcs-xpcs.o
obj-$(CONFIG_PCS_LYNX) += pcs-lynx.o
@@ -1,6 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
# Makefile for Linux PHY drivers
+# Enable W=1 by default
+subdir-ccflags-y := $(KBUILD_CFLAGS_WARN1)
+
libphy-y := phy.o phy-c45.o phy-core.o phy_device.o \
linkmode.o
mdio-bus-y += mdio_bus.o mdio_device.o
Add to the subdirectory ccflags variable the additional compiler warnings which W=1 adds at the top level when enabled. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- drivers/net/mdio/Makefile | 3 +++ drivers/net/pcs/Makefile | 3 +++ drivers/net/phy/Makefile | 3 +++ 3 files changed, 9 insertions(+)