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

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

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20210125231659.106201-4-masahiroy@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/Makefile
net/l3mdev/Makefile

index a18547c97cbb8078f27e802652ad4acb723dd2e6..9ca9572188feb21206b8df7e432d0ffae5ec1a5d 100644 (file)
@@ -73,9 +73,7 @@ obj-$(CONFIG_MPLS)            += mpls/
 obj-$(CONFIG_NET_NSH)          += nsh/
 obj-$(CONFIG_HSR)              += hsr/
 obj-$(CONFIG_NET_SWITCHDEV)    += switchdev/
-ifneq ($(CONFIG_NET_L3_MASTER_DEV),)
-obj-y                          += l3mdev/
-endif
+obj-$(CONFIG_NET_L3_MASTER_DEV)        += l3mdev/
 obj-$(CONFIG_QRTR)             += qrtr/
 obj-$(CONFIG_NET_NCSI)         += ncsi/
 obj-$(CONFIG_XDP_SOCKETS)      += xdp/
index 59755a9e2f9bb33e84517f76f77c233714282b4c..9e7da0acc58cd7a56865f8d91fee0ea6c27c060d 100644 (file)
@@ -3,4 +3,4 @@
 # Makefile for the L3 device API
 #
 
-obj-$(CONFIG_NET_L3_MASTER_DEV) += l3mdev.o
+obj-y += l3mdev.o