Re: [PATCH net-next v2 1/1] net: intel: Use *-y instead of *-objs in Makefile

From: Jacob Keller
Date: Wed May 08 2024 - 14:24:04 EST




On 5/8/2024 11:00 AM, Andy Shevchenko wrote:
> *-objs suffix is reserved rather for (user-space) host programs while
> usually *-y suffix is used for kernel drivers (although *-objs works
> for that purpose for now).
>
> Let's correct the old usages of *-objs in Makefiles.
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---

FWIW I applied v1 and v2, and got only the following range-diff:

> $ git range-diff net-next/main use-module-y-v1 use-module-y-v2
> 1: 0e5c43eb8e36 ! 1: 2cf60c46b7a8 net: intel: Use *-y instead of *-objs in Makefile
> @@ Commit message
>
> Let's correct the old usages of *-objs in Makefiles.
>
> - Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> - Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@xxxxxxxxx>
> - Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
> + Reviewed-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> + Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> ## drivers/net/ethernet/intel/e1000/Makefile ##
> @@
> @@ drivers/net/ethernet/intel/igbvf/Makefile
>
> ## drivers/net/ethernet/intel/igc/Makefile ##
> @@
> + #
> +
> obj-$(CONFIG_IGC) += igc.o
> - igc-$(CONFIG_IGC_LEDS) += igc_leds.o
> +-igc-$(CONFIG_IGC_LEDS) += igc_leds.o
>
> -igc-objs := igc_main.o igc_mac.o igc_i225.o igc_base.o igc_nvm.o igc_phy.o \
> -igc_diag.o igc_ethtool.o igc_ptp.o igc_dump.o igc_tsn.o igc_xdp.o
> +igc-y := igc_main.o igc_mac.o igc_i225.o igc_base.o igc_nvm.o igc_phy.o \
> + igc_diag.o igc_ethtool.o igc_ptp.o igc_dump.o igc_tsn.o igc_xdp.o
> ++igc-$(CONFIG_IGC_LEDS) += igc_leds.o
>
> ## drivers/net/ethernet/intel/ixgbe/Makefile ##
> @@
>

This matches the changes described w.r.t ordering, and everything built
properly when I tested it on my test kernel tree.

Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>