diff mbox series

[4/4] net: l3mdev: use obj-$(CONFIG_NET_L3_MASTER_DEV) form in net/Makefile

Message ID 20210125231659.106201-4-masahiroy@kernel.org (mailing list archive)
State Accepted
Commit d32f834cd6873d9a5ed18ad028700f60d1688cf3
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 4 of 4 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_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>
---

 net/Makefile        | 4 +---
 net/l3mdev/Makefile | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

David Ahern Jan. 26, 2021, 3:44 a.m. UTC | #1
On 1/25/21 4:16 PM, Masahiro Yamada wrote:
> 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>
> ---
> 
>  net/Makefile        | 4 +---
>  net/l3mdev/Makefile | 2 +-
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>
diff mbox series

Patch

diff --git a/net/Makefile b/net/Makefile
index a18547c97cbb..9ca9572188fe 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -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/
diff --git a/net/l3mdev/Makefile b/net/l3mdev/Makefile
index 59755a9e2f9b..9e7da0acc58c 100644
--- a/net/l3mdev/Makefile
+++ b/net/l3mdev/Makefile
@@ -3,4 +3,4 @@ 
 # Makefile for the L3 device API
 #
 
-obj-$(CONFIG_NET_L3_MASTER_DEV) += l3mdev.o
+obj-y += l3mdev.o