diff mbox series

[3/4] net: switchdev: use obj-$(CONFIG_NET_SWITCHDEV) form in net/Makefile

Message ID 20210125231659.106201-3-masahiroy@kernel.org (mailing list archive)
State Accepted
Commit 0cfd99b487f1f1b0661a966c2182115d2989e5c3
Delegated to: Netdev Maintainers
Headers show
Series [1/4] net: move CONFIG_NET guard to top Makefile | expand

Checks

Context Check Description
netdev/cover_letter warning Series does not have a cover letter
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Guessed tree name to be net-next
netdev/subject_prefix success Link
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Masahiro Yamada Jan. 25, 2021, 11:16 p.m. UTC
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>
---

 net/Makefile           | 4 +---
 net/switchdev/Makefile | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/net/Makefile b/net/Makefile
index a7e38bd463a4..a18547c97cbb 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -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
diff --git a/net/switchdev/Makefile b/net/switchdev/Makefile
index bd69a3136e76..c5561d7f3a7c 100644
--- a/net/switchdev/Makefile
+++ b/net/switchdev/Makefile
@@ -3,4 +3,4 @@ 
 # Makefile for the Switch device API
 #
 
-obj-$(CONFIG_NET_SWITCHDEV) += switchdev.o
+obj-y += switchdev.o