iwlwifi: remove object duplication in Makefile
Subsystems (3)
PATCH 1/1 iwlwifi: remove object duplication in Makefile
The objects in $(iwlwifi-objs) $(iwlwifi-y) $(iwlwifi-m) are linked to iwlwifi.ko .
This line adds $(iwlwifi-m) to iwlwifi-objs, so the objects from $(iwlwifi-m) are listed twice as the dependency of the module.
It works because Kbuild trims the duplicated objects from linking, but there is no good reason to have this line.
---
drivers/net/wireless/intel/iwlwifi/Makefile | 2 -- 1 file changed, 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/Makefile +0 -2
@@ -19,8 +19,6 @@ iwlwifi-$(CONFIG_IWLMVM) += fw/paging.o fw/smem.o fw/init.o iwlwifi-$(CONFIG_ACPI) += fw/acpi.o iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += fw/debugfs.o -iwlwifi-objs += $(iwlwifi-m) - iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o ccflags-y += -I$(src)
Signature · 1 line
2.17.1
Quoted 5 lines · Masahiro Yamada
The objects in $(iwlwifi-objs) $(iwlwifi-y) $(iwlwifi-m) are linked to iwlwifi.ko .
This line adds $(iwlwifi-m) to iwlwifi-objs, so the objects from $(iwlwifi-m) are listed twice as the dependency of the module.
Are you sure? We have
obj-$(CONFIG_IWLWIFI) += iwlwifi.o
and then "iwlwifi-y += ...", but I was under the impression that iwlwifi.o didn't really pick up iwlwifi-m automatically, that's not something that you'd normally do, normally -m only makes sense to build a module using "obj-m", just here we do it for the mvm sub level stuff...
johannes
Quoted 12 lines · Johannes Berg
Quoted 5 lines · Masahiro Yamada
The objects in $(iwlwifi-objs) $(iwlwifi-y) $(iwlwifi-m) are linked to iwlwifi.ko .
This line adds $(iwlwifi-m) to iwlwifi-objs, so the objects from $(iwlwifi-m) are listed twice as the dependency of the module.
Are you sure? We have
obj-$(CONFIG_IWLWIFI) += iwlwifi.o
Quoted 8 lines
and then "iwlwifi-y += ...", but I was under the impression that iwlwifi.o didn't really pick up iwlwifi-m automatically, that's not something that you'd normally do, normally -m only makes sense to build a module using "obj-m", just here we do it for the mvm sub level stuff...
johannes
I made a mistake.
iwlwifi-m is automatically handled since commitcf4f21938e13ea1533ebdcb21c46f1d998a44ee8
but cfg/*.o objects are not liked to vmlinux
under the following combination:
CONFIG_IWLWIFI=yCONFIG_IWLDVM=mCONFIG_IWLMVM=m
Please ignore this patch.
Perhaps, I may come back to this patch,
but I need to change scripts/Makefile.lib beforehand.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 8 lines · Masahiro Yamada
iwlwifi-m is automatically handled since commit
cf4f21938e13ea1533ebdcb21c46f1d998a44ee8
but cfg/*.o objects are not liked to vmlinux
under the following combination:
CONFIG_IWLWIFI=yCONFIG_IWLDVM=mCONFIG_IWLMVM=m
Right, that's what I thought.
Quoted 2 lines
Perhaps, I may come back to this patch,
but I need to changescripts/Makefile.libbeforehand.
It's a pretty special case, not really worth it IMHO...
johannes