All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: remove object duplication in Makefile
@ 2020-01-06  7:54 Masahiro Yamada
  2020-01-06 15:51 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-01-06  7:54 UTC (permalink / raw)
  To: Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, linux-wireless
  Cc: Masahiro Yamada, David S. Miller, Kalle Valo, linux-kernel, netdev

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.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/net/wireless/intel/iwlwifi/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wireless/intel/iwlwifi/Makefile
index 0aae3fa4128c..a018d27a5410 100644
--- a/drivers/net/wireless/intel/iwlwifi/Makefile
+++ b/drivers/net/wireless/intel/iwlwifi/Makefile
@@ -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)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi: remove object duplication in Makefile
  2020-01-06  7:54 [PATCH] iwlwifi: remove object duplication in Makefile Masahiro Yamada
@ 2020-01-06 15:51 ` Johannes Berg
  2020-01-06 17:11   ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2020-01-06 15:51 UTC (permalink / raw)
  To: Masahiro Yamada, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, linux-wireless
  Cc: David S. Miller, Kalle Valo, linux-kernel, netdev

On Mon, 2020-01-06 at 16:54 +0900, Masahiro Yamada wrote:
> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi: remove object duplication in Makefile
  2020-01-06 15:51 ` Johannes Berg
@ 2020-01-06 17:11   ` Masahiro Yamada
  2020-01-06 17:45     ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2020-01-06 17:11 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Emmanuel Grumbach, Luca Coelho, Intel Linux Wireless,
	linux-wireless, David S. Miller, Kalle Valo,
	Linux Kernel Mailing List, Networking

On Tue, Jan 7, 2020 at 12:51 AM Johannes Berg <johannes@sipsolutions.net> wrote:
>
> On Mon, 2020-01-06 at 16:54 +0900, Masahiro Yamada wrote:
> > 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
>

I made a mistake.

iwlwifi-m is automatically handled since commit
cf4f21938e13ea1533ebdcb21c46f1d998a44ee8
but cfg/*.o objects are not liked to vmlinux
under the following combination:

CONFIG_IWLWIFI=y
CONFIG_IWLDVM=m
CONFIG_IWLMVM=m


Please ignore this patch.

Perhaps, I may come back to this patch,
but I need to change scripts/Makefile.lib beforehand.


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] iwlwifi: remove object duplication in Makefile
  2020-01-06 17:11   ` Masahiro Yamada
@ 2020-01-06 17:45     ` Johannes Berg
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2020-01-06 17:45 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Emmanuel Grumbach, Luca Coelho, Intel Linux Wireless,
	linux-wireless, David S. Miller, Kalle Valo,
	Linux Kernel Mailing List, Networking

On Tue, 2020-01-07 at 02:11 +0900, Masahiro Yamada wrote:

> iwlwifi-m is automatically handled since commit
> cf4f21938e13ea1533ebdcb21c46f1d998a44ee8
> but cfg/*.o objects are not liked to vmlinux
> under the following combination:
> 
> CONFIG_IWLWIFI=y
> CONFIG_IWLDVM=m
> CONFIG_IWLMVM=m

Right, that's what I thought.

> Perhaps, I may come back to this patch,
> but I need to change scripts/Makefile.lib beforehand.

It's a pretty special case, not really worth it IMHO...

johannes


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-06 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06  7:54 [PATCH] iwlwifi: remove object duplication in Makefile Masahiro Yamada
2020-01-06 15:51 ` Johannes Berg
2020-01-06 17:11   ` Masahiro Yamada
2020-01-06 17:45     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.