net: switchdev: use obj-$(CONFIG_NET_SWITCHDEV) form in net/Makefile
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 25 Jan 2021 23:16:57 +0000 (08:16 +0900)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Jan 2021 01:03:52 +0000 (17:03 -0800)
CONFIG_NET_SWITCHDEV is a bool option. Change the ifeq conditional to
the standard obj-$(CONFIG_NET_SWITCHDEV) form.

Use obj-y in net/switchdev/Makefile because Kbuild visits this Makefile
only when CONFIG_NET_SWITCHDEV=y.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20210125231659.106201-3-masahiroy@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/Makefile
net/switchdev/Makefile

index a7e38bd..a18547c 100644 (file)
@@ -72,9 +72,7 @@ obj-$(CONFIG_VSOCKETS)        += vmw_vsock/
 obj-$(CONFIG_MPLS)             += mpls/
 obj-$(CONFIG_NET_NSH)          += nsh/
 obj-$(CONFIG_HSR)              += hsr/
-ifneq ($(CONFIG_NET_SWITCHDEV),)
-obj-y                          += switchdev/
-endif
+obj-$(CONFIG_NET_SWITCHDEV)    += switchdev/
 ifneq ($(CONFIG_NET_L3_MASTER_DEV),)
 obj-y                          += l3mdev/
 endif
index bd69a31..c5561d7 100644 (file)
@@ -3,4 +3,4 @@
 # Makefile for the Switch device API
 #
 
-obj-$(CONFIG_NET_SWITCHDEV) += switchdev.o
+obj-y += switchdev.o