* [PATCH net-next] net: dsa: realtek: use <module>-y in Makefile
@ 2026-10-19 4:26 Luiz Angelo Daros de Luca
2026-10-19 13:00 ` Alvin Šipraga
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Angelo Daros de Luca @ 2026-10-19 4:26 UTC (permalink / raw)
To: Linus Walleij, Alvin Šipraga, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Luiz Angelo Daros de Luca
Switch from <module>-objs to <module>-y to eliminate ifdefs and simplify
conditional object list construction. Drop the obsolete trailing
comment.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
drivers/net/dsa/realtek/Makefile | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/drivers/net/dsa/realtek/Makefile b/drivers/net/dsa/realtek/Makefile
index 72bb42e80c95..0a94a619b2c1 100644
--- a/drivers/net/dsa/realtek/Makefile
+++ b/drivers/net/dsa/realtek/Makefile
@@ -1,23 +1,15 @@
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_NET_DSA_REALTEK) += realtek_dsa.o
-realtek_dsa-objs := rtl83xx.o
-
-ifdef CONFIG_NET_DSA_REALTEK_MDIO
-realtek_dsa-objs += realtek-mdio.o
-endif
-
-ifdef CONFIG_NET_DSA_REALTEK_SMI
-realtek_dsa-objs += realtek-smi.o
-endif
+realtek_dsa-y := rtl83xx.o
+realtek_dsa-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o
+realtek_dsa-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o
-rtl8366-objs := rtl8366-core.o rtl8366rb.o
-ifdef CONFIG_NET_DSA_REALTEK_RTL8366RB_LEDS
-rtl8366-objs += rtl8366rb-leds.o
-endif
+rtl8366-y := rtl8366-core.o rtl8366rb.o
+rtl8366-$(CONFIG_NET_DSA_REALTEK_RTL8366RB_LEDS) += rtl8366rb-leds.o
+
obj-$(CONFIG_NET_DSA_REALTEK_RTL8365MB) += rtl8365mb.o
-rtl8365mb-objs := rtl8365mb_main.o \
- rtl8365mb_table.o \
- rtl8365mb_vlan.o \
- rtl8365mb_l2.o \
-# end of rtl8365mb-objs
+rtl8365mb-y := rtl8365mb_main.o \
+ rtl8365mb_table.o \
+ rtl8365mb_vlan.o \
+ rtl8365mb_l2.o
---
base-commit: 98c2ad4f5d805dbc1ea436a334ee59311806a48c
change-id: 20261019-realtek_mkf-380d67738b1d
Best regards,
--
Luiz Angelo Daros de Luca <luizluca@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: dsa: realtek: use <module>-y in Makefile
2026-10-19 4:26 [PATCH net-next] net: dsa: realtek: use <module>-y in Makefile Luiz Angelo Daros de Luca
@ 2026-10-19 13:00 ` Alvin Šipraga
0 siblings, 0 replies; 2+ messages in thread
From: Alvin Šipraga @ 2026-10-19 13:00 UTC (permalink / raw)
To: Luiz Angelo Daros de Luca
Cc: Linus Walleij, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
On Mon, Oct 19, 2026 at 01:26:27AM -0300, Luiz Angelo Daros de Luca wrote:
> Switch from <module>-objs to <module>-y to eliminate ifdefs and simplify
> conditional object list construction. Drop the obsolete trailing
> comment.
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
> ---
> drivers/net/dsa/realtek/Makefile | 28 ++++++++++------------------
> 1 file changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/dsa/realtek/Makefile b/drivers/net/dsa/realtek/Makefile
> index 72bb42e80c95..0a94a619b2c1 100644
> --- a/drivers/net/dsa/realtek/Makefile
> +++ b/drivers/net/dsa/realtek/Makefile
> @@ -1,23 +1,15 @@
> # SPDX-License-Identifier: GPL-2.0
> obj-$(CONFIG_NET_DSA_REALTEK) += realtek_dsa.o
> -realtek_dsa-objs := rtl83xx.o
> -
> -ifdef CONFIG_NET_DSA_REALTEK_MDIO
> -realtek_dsa-objs += realtek-mdio.o
> -endif
> -
> -ifdef CONFIG_NET_DSA_REALTEK_SMI
> -realtek_dsa-objs += realtek-smi.o
> -endif
> +realtek_dsa-y := rtl83xx.o
> +realtek_dsa-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o
> +realtek_dsa-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
>
> obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o
> -rtl8366-objs := rtl8366-core.o rtl8366rb.o
> -ifdef CONFIG_NET_DSA_REALTEK_RTL8366RB_LEDS
> -rtl8366-objs += rtl8366rb-leds.o
> -endif
> +rtl8366-y := rtl8366-core.o rtl8366rb.o
> +rtl8366-$(CONFIG_NET_DSA_REALTEK_RTL8366RB_LEDS) += rtl8366rb-leds.o
> +
> obj-$(CONFIG_NET_DSA_REALTEK_RTL8365MB) += rtl8365mb.o
> -rtl8365mb-objs := rtl8365mb_main.o \
> - rtl8365mb_table.o \
> - rtl8365mb_vlan.o \
> - rtl8365mb_l2.o \
> -# end of rtl8365mb-objs
> +rtl8365mb-y := rtl8365mb_main.o \
> + rtl8365mb_table.o \
> + rtl8365mb_vlan.o \
> + rtl8365mb_l2.o
>
> ---
> base-commit: 98c2ad4f5d805dbc1ea436a334ee59311806a48c
> change-id: 20261019-realtek_mkf-380d67738b1d
>
> Best regards,
> --
> Luiz Angelo Daros de Luca <luizluca@gmail.com>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-19 13:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 4:26 [PATCH net-next] net: dsa: realtek: use <module>-y in Makefile Luiz Angelo Daros de Luca
2026-10-19 13:00 ` Alvin Šipraga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®