diff mbox series

net: Make NET imply NETDEVICES

Message ID 20231109001225.2357160-1-trini@konsulko.com
State Accepted
Commit f4449038f68578be553cc120360344f0d72b7a0a
Delegated to: Tom Rini
Headers show
Series net: Make NET imply NETDEVICES | expand

Commit Message

Tom Rini Nov. 9, 2023, 12:12 a.m. UTC
Normally, when NET is enabled, CMD_NET will then be enabled and in turn
NETDEVICES will (likely) be enabled via imply. However, if we disable
CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
for us. This suggestion (as an imply is) really isn't about the network
commands but network itself and is a legacy of how intertwined
NET/CMD_NET were historically. Move this over to the NET entry instead
where it is a more logical fit.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
This could also be dropping the imply from cmd/Kconfig and instead
making drivers/net/Kconfig::NETDEVICES be default y, which is what it
practically is today. This would require a more lengthy check however to
be sure there's no functional change and I'm not sure it's any better or
worse than this approach.
---
 cmd/Kconfig | 1 -
 net/Kconfig | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Nov. 9, 2023, 1:15 a.m. UTC | #1
On Wed, 8 Nov 2023 at 17:12, Tom Rini <trini@konsulko.com> wrote:
>
> Normally, when NET is enabled, CMD_NET will then be enabled and in turn
> NETDEVICES will (likely) be enabled via imply. However, if we disable
> CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
> for us. This suggestion (as an imply is) really isn't about the network
> commands but network itself and is a legacy of how intertwined
> NET/CMD_NET were historically. Move this over to the NET entry instead
> where it is a more logical fit.
>
> Reported-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> This could also be dropping the imply from cmd/Kconfig and instead
> making drivers/net/Kconfig::NETDEVICES be default y, which is what it
> practically is today. This would require a more lengthy check however to
> be sure there's no functional change and I'm not sure it's any better or
> worse than this approach.
> ---
>  cmd/Kconfig | 1 -
>  net/Kconfig | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>

Thanks!
Tom Rini Nov. 25, 2023, 10:38 p.m. UTC | #2
On Wed, Nov 08, 2023 at 07:12:25PM -0500, Tom Rini wrote:

> Normally, when NET is enabled, CMD_NET will then be enabled and in turn
> NETDEVICES will (likely) be enabled via imply. However, if we disable
> CMDLINE in a defconfig we now no longer get CMD_NET enabling NETDEVICES
> for us. This suggestion (as an imply is) really isn't about the network
> commands but network itself and is a legacy of how intertwined
> NET/CMD_NET were historically. Move this over to the NET entry instead
> where it is a more logical fit.
> 
> Reported-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Tested-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 629a90afb7b5..1b4aad5c930b 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1682,7 +1682,6 @@  if NET
 menuconfig CMD_NET
 	bool "Network commands"
 	default y
-	imply NETDEVICES
 
 if CMD_NET
 
diff --git a/net/Kconfig b/net/Kconfig
index 4215889127c9..8c80b3a6c671 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -5,6 +5,7 @@ 
 menuconfig NET
 	bool "Networking support"
 	default y
+	imply NETDEVICES
 
 if NET