diff mbox series

[OpenWrt-Devel,mt76] mt7603: fix build with CONFIG_KERNEL_DYNAMIC_DEBUG=y

Message ID 20190803201611.21319-1-ynezz@true.cz
State Accepted
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel,mt76] mt7603: fix build with CONFIG_KERNEL_DYNAMIC_DEBUG=y | expand

Commit Message

Petr Štetiar Aug. 3, 2019, 8:16 p.m. UTC
When building with CONFIG_KERNEL_DYNAMIC_DEBUG=y enabled, the build
fails with following error:

 <command-line>:0:37: error: redeclaration of enumerator 'IEEE80211_HW_REPORTS_TX_ACK_STATUS'
 <command-line>:0:37: note: in definition of macro 'IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN'
 In file included from mt76-2019-07-22-75656a45/mt7603/../mt76.h:27:0,
                 from mt76-2019-07-22-75656a45/mt7603/mt7603.h:8,
                 from mt76-2019-07-22-75656a45/mt7603/pci.c:7:
 usr/include/mac80211/net/mac80211.h:2293:2: note: previous definition of 'IEEE80211_HW_REPORTS_TX_ACK_STATUS' was here
   IEEE80211_HW_REPORTS_TX_ACK_STATUS,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is caused by failing check-cc-enum build check due to the following
compile error:

 ./include/linux/dynamic_debug.h:77:14: error: 'KBUILD_MODNAME' undeclared (first use in this function); did you mean 'KERN_NODENAME'?
    .modname = KBUILD_MODNAME,   \

So this patch adds missing KBUILD_MODNAME variable to
CHECK_CC_ENUM_FLAGS in order to make check-cc-enum build check compile
again.

Fixes: c4e4982fa923 ("mt7603: set IEEE80211_HW_TX_STATUS_NO_AMPDU_LEN")
Cc: Felix Fietkau <nbd@nbd.name>
Reported-by: Joan Moreau <jom@grosjo.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 mt7603/Makefile | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/mt7603/Makefile b/mt7603/Makefile
index 46e3df56d5ce..29f896a5c3a0 100644
--- a/mt7603/Makefile
+++ b/mt7603/Makefile
@@ -1,6 +1,7 @@ 
 EXTRA_CFLAGS += -Werror -DCONFIG_MT76_LEDS
 
 CHECK_CC_ENUM_FLAGS = $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)
+CHECK_CC_ENUM_FLAGS += -DKBUILD_MODNAME='"mt7603e"'
 check-cc-enum = $(call try-run, echo "int v = $(1);" | $(CC) -Werror $(CHECK_CC_ENUM_FLAGS) $(2) -c -x c - -o "$$TMP",y,n)
 
 # backwards compatibility hack