diff mbox series

[net-next,v1,1/1] net: intel: Use *-y instead of *-objs in Makefile

Message ID 20240508132315.1121086-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v1,1/1] net: intel: Use *-y instead of *-objs in Makefile | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 926 this patch: 932
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 14 of 14 maintainers
netdev/build_clang fail Errors and warnings before: 937 this patch: 943
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 937 this patch: 943
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 89 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Andy Shevchenko May 8, 2024, 1:23 p.m. UTC
*-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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/ethernet/intel/e1000/Makefile   | 2 +-
 drivers/net/ethernet/intel/e1000e/Makefile  | 7 +++----
 drivers/net/ethernet/intel/i40e/Makefile    | 2 +-
 drivers/net/ethernet/intel/iavf/Makefile    | 5 ++---
 drivers/net/ethernet/intel/igb/Makefile     | 6 +++---
 drivers/net/ethernet/intel/igbvf/Makefile   | 6 +-----
 drivers/net/ethernet/intel/igc/Makefile     | 4 ++--
 drivers/net/ethernet/intel/ixgbe/Makefile   | 8 ++++----
 drivers/net/ethernet/intel/ixgbevf/Makefile | 6 +-----
 drivers/net/ethernet/intel/libeth/Makefile  | 2 +-
 drivers/net/ethernet/intel/libie/Makefile   | 2 +-
 11 files changed, 20 insertions(+), 30 deletions(-)

Comments

Alexander Lobakin May 8, 2024, 1:35 p.m. UTC | #1
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 8 May 2024 16:23:15 +0300

> *-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.

Wait, I was sure I've seen somewhere that -objs is more new and
preferred over -y. See recent dimlib comment where Florian changed -y to
-objs for example.
Any documentation reference that -objs is for userspace and we should
clearly use -y?

Thanks,
Olek
Andy Shevchenko May 8, 2024, 2:25 p.m. UTC | #2
On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin 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.
> 
> Wait, I was sure I've seen somewhere that -objs is more new and
> preferred over -y. 

Then you are mistaken.

> See recent dimlib comment where Florian changed -y to
> -objs for example.

So does he :-)

> Any documentation reference that -objs is for userspace and we should
> clearly use -y?

Sure. Luckily it's documented in Documentation/kbuild/makefiles.rst
"Composite Host Programs" (mind the meaning of the word "host"!).
Alexander Lobakin May 8, 2024, 2:39 p.m. UTC | #3
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 8 May 2024 17:25:31 +0300

> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin 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.
>>
>> Wait, I was sure I've seen somewhere that -objs is more new and
>> preferred over -y. 
> 
> Then you are mistaken.
> 
>> See recent dimlib comment where Florian changed -y to
>> -objs for example.
> 
> So does he :-)
> 
>> Any documentation reference that -objs is for userspace and we should
>> clearly use -y?
> 
> Sure. Luckily it's documented in Documentation/kbuild/makefiles.rst
> "Composite Host Programs" (mind the meaning of the word "host"!).

Oh okay, I see. `-objs` is indeed only mentioned in the host chapter.

Thanks! Good to know.

Thanks,
Olek
Alexander Lobakin May 8, 2024, 2:40 p.m. UTC | #4
From: Alexander Lobakin <aleksander.lobakin@intel.com>
Date: Wed, 8 May 2024 16:39:21 +0200

> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Date: Wed, 8 May 2024 17:25:31 +0300
> 
>> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin 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.
>>>
>>> Wait, I was sure I've seen somewhere that -objs is more new and
>>> preferred over -y. 
>>
>> Then you are mistaken.
>>
>>> See recent dimlib comment where Florian changed -y to
>>> -objs for example.
>>
>> So does he :-)
>>
>>> Any documentation reference that -objs is for userspace and we should
>>> clearly use -y?
>>
>> Sure. Luckily it's documented in Documentation/kbuild/makefiles.rst
>> "Composite Host Programs" (mind the meaning of the word "host"!).
> 
> Oh okay, I see. `-objs` is indeed only mentioned in the host chapter.

Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>

Thanks,
Olek
Aleksandr Loktionov May 8, 2024, 2:42 p.m. UTC | #5
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On
> Behalf Of Alexander Lobakin
> Sent: Wednesday, May 8, 2024 4:40 PM
> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Alexei Starovoitov <ast@kernel.org>; Jesper Dangaard Brouer
> <hawk@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
> netdev@vger.kernel.org; Richard Cochran <richardcochran@gmail.com>;
> John Fastabend <john.fastabend@gmail.com>; linux-
> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; intel-
> wired-lan@lists.osuosl.org; Jakub Kicinski <kuba@kernel.org>;
> Keller, Jacob E <jacob.e.keller@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; bpf@vger.kernel.org; Paolo Abeni
> <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>
> Subject: Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel:
> Use *-y instead of *-objs in Makefile
> 
> From: Alexander Lobakin <aleksander.lobakin@intel.com>
> Date: Wed, 8 May 2024 16:39:21 +0200
> 
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Date: Wed, 8 May 2024 17:25:31 +0300
> >
> >> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin
> 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.
> >>>
> >>> Wait, I was sure I've seen somewhere that -objs is more new and
> >>> preferred over -y.
> >>
> >> Then you are mistaken.
> >>
> >>> See recent dimlib comment where Florian changed -y to -objs for
> >>> example.
> >>
> >> So does he :-)
> >>
> >>> Any documentation reference that -objs is for userspace and we
> >>> should clearly use -y?
> >>
> >> Sure. Luckily it's documented in
> Documentation/kbuild/makefiles.rst
> >> "Composite Host Programs" (mind the meaning of the word
> "host"!).
> >
> > Oh okay, I see. `-objs` is indeed only mentioned in the host
> chapter.
> 
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> 
> Thanks,
> Olek

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
kernel test robot May 8, 2024, 5:28 p.m. UTC | #6
Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/net-intel-Use-y-instead-of-objs-in-Makefile/20240508-212446
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240508132315.1121086-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20240509/202405090110.rS1cBZES-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240509/202405090110.rS1cBZES-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405090110.rS1cBZES-lkp@intel.com/

All errors (new ones prefixed by >>, old ones prefixed by <<):

WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mn-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/imx/imx8mp-interconnect.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hte/hte-tegra194-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vdpa/vdpa.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vdpa/ifcvf/ifcvf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/parport/parport.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/libnvdimm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_pmem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_btt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/of_pmem.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_virtio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/parsers/brcm_u-boot.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/parsers/tplink_safeloader.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_util.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/chips/cfi_cmdset_0020.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/mtd/maps/map_funcs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/hisi-spmi-controller.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/spmi/spmi-pmic-arb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_cif.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_aec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_netx.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_pruss.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/uio/uio_mf624.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/pcmcia_rsrc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/yenta_socket.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/pcmcia/i82092.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/corsair-cpro.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/hwmon/mr75203.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/vhost/vringh.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/greybus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/greybus/gb-es2.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rpmsg/rpmsg_char.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/adc/ingenic-adc.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/adc/xilinx-ams.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/iio/buffer/kfifo_buf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-core.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-hub.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-aspeed.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-gpio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-master-ast-cf.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/fsi/fsi-scom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/siox/siox-bus-gpio.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/counter/ftm-quaddec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/core/snd-pcm-dmaengine.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/core/sound_kunit.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/drivers/snd-pcmtest.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/pci/hda/snd-hda-cirrus-scodec-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/soc-topology-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-ab8500-codec.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-sigmadsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/codecs/snd-soc-wm-adsp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/fsl/imx-pcm-dma.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/mxs/snd-soc-mxs-pcm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/snd-soc-qcom-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/snd-soc-qcom-sdw.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/qcom/qdsp6/snd-q6dsp-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-intel-atom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-acpi-intel-byt.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-acpi-intel-bdw.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-intel-hda-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-intel-hda-mlink.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-intel-hda.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-tng.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-skl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-apl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-cnl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-icl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-tgl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-mtl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/intel/snd-sof-pci-intel-lnl.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/imx/snd-sof-imx8.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/imx/snd-sof-imx8m.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/imx/snd-sof-imx8ulp.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/imx/imx-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/mediatek/mtk-adsp-common.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/mediatek/mt8195/snd-sof-mt8195.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/mediatek/mt8186/snd-sof-mt8186.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/snd-sof-utils.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/snd-sof-acpi.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/snd-sof-of.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/sof/snd-sof-pci.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/xilinx/snd-soc-xlnx-i2s.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/xilinx/snd-soc-xlnx-formatter-pcm.o
WARNING: modpost: missing MODULE_DESCRIPTION() in sound/ac97_bus.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mtty.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mdpy-fb.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/vfio-mdev/mbochs.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/configfs/configfs_sample.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/bytestream-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/dma-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/inttype-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kfifo/record-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kobject-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kobject/kset-example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kprobes/kprobe_example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kprobes/kretprobe_example.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/kmemleak/kmemleak-test.o
WARNING: modpost: missing MODULE_DESCRIPTION() in samples/fprobe/fprobe_example.o
>> ERROR: modpost: "igc_led_free" [drivers/net/ethernet/intel/igc/igc.ko] undefined!
>> ERROR: modpost: "igc_led_setup" [drivers/net/ethernet/intel/igc/igc.ko] undefined!
Andy Shevchenko May 8, 2024, 5:56 p.m. UTC | #7
On Thu, May 09, 2024 at 01:28:19AM +0800, kernel test robot wrote:
> Hi Andy,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on net-next/main]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/net-intel-Use-y-instead-of-objs-in-Makefile/20240508-212446
> base:   net-next/main
> patch link:    https://lore.kernel.org/r/20240508132315.1121086-1-andriy.shevchenko%40linux.intel.com
> patch subject: [PATCH net-next v1 1/1] net: intel: Use *-y instead of *-objs in Makefile
> config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20240509/202405090110.rS1cBZES-lkp@intel.com/config)
> compiler: loongarch64-linux-gcc (GCC) 13.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240509/202405090110.rS1cBZES-lkp@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202405090110.rS1cBZES-lkp@intel.com/
> 
> All errors (new ones prefixed by >>, old ones prefixed by <<):

> >> ERROR: modpost: "igc_led_free" [drivers/net/ethernet/intel/igc/igc.ko] undefined!
> >> ERROR: modpost: "igc_led_setup" [drivers/net/ethernet/intel/igc/igc.ko] undefined!

Sure, misplaced line. I'll fix this in the next version.
Jacob Keller May 8, 2024, 5:58 p.m. UTC | #8
On 5/8/2024 7:42 AM, Loktionov, Aleksandr wrote:
> 
> 
>> -----Original Message-----
>> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On
>> Behalf Of Alexander Lobakin
>> Sent: Wednesday, May 8, 2024 4:40 PM
>> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> Cc: Alexei Starovoitov <ast@kernel.org>; Jesper Dangaard Brouer
>> <hawk@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
>> netdev@vger.kernel.org; Richard Cochran <richardcochran@gmail.com>;
>> John Fastabend <john.fastabend@gmail.com>; linux-
>> kernel@vger.kernel.org; Eric Dumazet <edumazet@google.com>; intel-
>> wired-lan@lists.osuosl.org; Jakub Kicinski <kuba@kernel.org>;
>> Keller, Jacob E <jacob.e.keller@intel.com>; Nguyen, Anthony L
>> <anthony.l.nguyen@intel.com>; bpf@vger.kernel.org; Paolo Abeni
>> <pabeni@redhat.com>; David S. Miller <davem@davemloft.net>
>> Subject: Re: [Intel-wired-lan] [PATCH net-next v1 1/1] net: intel:
>> Use *-y instead of *-objs in Makefile
>>
>> From: Alexander Lobakin <aleksander.lobakin@intel.com>
>> Date: Wed, 8 May 2024 16:39:21 +0200
>>
>>> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>> Date: Wed, 8 May 2024 17:25:31 +0300
>>>
>>>> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin
>> 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.
>>>>>
>>>>> Wait, I was sure I've seen somewhere that -objs is more new and
>>>>> preferred over -y.
>>>>
>>>> Then you are mistaken.
>>>>
>>>>> See recent dimlib comment where Florian changed -y to -objs for
>>>>> example.
>>>>
>>>> So does he :-)
>>>>
>>>>> Any documentation reference that -objs is for userspace and we
>>>>> should clearly use -y?
>>>>
>>>> Sure. Luckily it's documented in
>> Documentation/kbuild/makefiles.rst
>>>> "Composite Host Programs" (mind the meaning of the word
>> "host"!).
>>>
>>> Oh okay, I see. `-objs` is indeed only mentioned in the host
>> chapter.
>>
>> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
>>
>> Thanks,
>> Olek
> 
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

Yea, reading the makefiles.rst again, it does seem that -objs only is
intended for host programs. The fact that it works now is an accident.
Further use of -y is necessary as we also use module-$(CONFIG_SYMBOL) to
resolve cases where we only include the files if the configuration is set.

Makes sense to clean this up.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Andy Shevchenko May 8, 2024, 6:02 p.m. UTC | #9
On Wed, May 08, 2024 at 10:58:37AM -0700, Jacob Keller wrote:
> On 5/8/2024 7:42 AM, Loktionov, Aleksandr wrote:
> >> From: Alexander Lobakin <aleksander.lobakin@intel.com>
> >> Date: Wed, 8 May 2024 16:39:21 +0200
> >>> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> >>> Date: Wed, 8 May 2024 17:25:31 +0300
> >>>> On Wed, May 08, 2024 at 03:35:26PM +0200, Alexander Lobakin
> >> 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.
> >>>>>
> >>>>> Wait, I was sure I've seen somewhere that -objs is more new and
> >>>>> preferred over -y.
> >>>>
> >>>> Then you are mistaken.
> >>>>
> >>>>> See recent dimlib comment where Florian changed -y to -objs for
> >>>>> example.
> >>>>
> >>>> So does he :-)
> >>>>
> >>>>> Any documentation reference that -objs is for userspace and we
> >>>>> should clearly use -y?
> >>>>
> >>>> Sure. Luckily it's documented in
> >> Documentation/kbuild/makefiles.rst
> >>>> "Composite Host Programs" (mind the meaning of the word
> >> "host"!).
> >>>
> >>> Oh okay, I see. `-objs` is indeed only mentioned in the host
> >> chapter.
> >>
> >> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> >>
> >> Thanks,
> >> Olek
> > 
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> 
> Yea, reading the makefiles.rst again, it does seem that -objs only is
> intended for host programs. The fact that it works now is an accident.
> Further use of -y is necessary as we also use module-$(CONFIG_SYMBOL) to
> resolve cases where we only include the files if the configuration is set.
> 
> Makes sense to clean this up.
> 
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

Oops, just sent a v2 to address LKP findings. Can you look at it instead?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/intel/e1000/Makefile b/drivers/net/ethernet/intel/e1000/Makefile
index 314c52d44b7c..79491dec47e1 100644
--- a/drivers/net/ethernet/intel/e1000/Makefile
+++ b/drivers/net/ethernet/intel/e1000/Makefile
@@ -7,4 +7,4 @@ 
 
 obj-$(CONFIG_E1000) += e1000.o
 
-e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
+e1000-y := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o
diff --git a/drivers/net/ethernet/intel/e1000e/Makefile b/drivers/net/ethernet/intel/e1000e/Makefile
index 0baa15503c38..18f22b6374d5 100644
--- a/drivers/net/ethernet/intel/e1000e/Makefile
+++ b/drivers/net/ethernet/intel/e1000e/Makefile
@@ -10,7 +10,6 @@  subdir-ccflags-y += -I$(src)
 
 obj-$(CONFIG_E1000E) += e1000e.o
 
-e1000e-objs := 82571.o ich8lan.o 80003es2lan.o \
-	       mac.o manage.o nvm.o phy.o \
-	       param.o ethtool.o netdev.o ptp.o
-
+e1000e-y := 82571.o ich8lan.o 80003es2lan.o \
+	    mac.o manage.o nvm.o phy.o \
+	    param.o ethtool.o netdev.o ptp.o
diff --git a/drivers/net/ethernet/intel/i40e/Makefile b/drivers/net/ethernet/intel/i40e/Makefile
index cad93f323bd5..9faa4339a76c 100644
--- a/drivers/net/ethernet/intel/i40e/Makefile
+++ b/drivers/net/ethernet/intel/i40e/Makefile
@@ -10,7 +10,7 @@  subdir-ccflags-y += -I$(src)
 
 obj-$(CONFIG_I40E) += i40e.o
 
-i40e-objs := i40e_main.o \
+i40e-y := i40e_main.o \
 	i40e_ethtool.o	\
 	i40e_adminq.o	\
 	i40e_common.o	\
diff --git a/drivers/net/ethernet/intel/iavf/Makefile b/drivers/net/ethernet/intel/iavf/Makefile
index 2d154a4e2fd7..356ac9faa5bf 100644
--- a/drivers/net/ethernet/intel/iavf/Makefile
+++ b/drivers/net/ethernet/intel/iavf/Makefile
@@ -11,6 +11,5 @@  subdir-ccflags-y += -I$(src)
 
 obj-$(CONFIG_IAVF) += iavf.o
 
-iavf-objs := iavf_main.o iavf_ethtool.o iavf_virtchnl.o iavf_fdir.o \
-	     iavf_adv_rss.o \
-	     iavf_txrx.o iavf_common.o iavf_adminq.o
+iavf-y := iavf_main.o iavf_ethtool.o iavf_virtchnl.o iavf_fdir.o \
+	  iavf_adv_rss.o iavf_txrx.o iavf_common.o iavf_adminq.o
diff --git a/drivers/net/ethernet/intel/igb/Makefile b/drivers/net/ethernet/intel/igb/Makefile
index 394c1e0656b9..463c0d26b9d4 100644
--- a/drivers/net/ethernet/intel/igb/Makefile
+++ b/drivers/net/ethernet/intel/igb/Makefile
@@ -6,6 +6,6 @@ 
 
 obj-$(CONFIG_IGB) += igb.o
 
-igb-objs := igb_main.o igb_ethtool.o e1000_82575.o \
-	    e1000_mac.o e1000_nvm.o e1000_phy.o e1000_mbx.o \
-	    e1000_i210.o igb_ptp.o igb_hwmon.o
+igb-y := igb_main.o igb_ethtool.o e1000_82575.o \
+	 e1000_mac.o e1000_nvm.o e1000_phy.o e1000_mbx.o \
+	 e1000_i210.o igb_ptp.o igb_hwmon.o
diff --git a/drivers/net/ethernet/intel/igbvf/Makefile b/drivers/net/ethernet/intel/igbvf/Makefile
index afd3e36eae75..902711d5e691 100644
--- a/drivers/net/ethernet/intel/igbvf/Makefile
+++ b/drivers/net/ethernet/intel/igbvf/Makefile
@@ -6,8 +6,4 @@ 
 
 obj-$(CONFIG_IGBVF) += igbvf.o
 
-igbvf-objs := vf.o \
-              mbx.o \
-              ethtool.o \
-              netdev.o
-
+igbvf-y := vf.o mbx.o ethtool.o netdev.o
diff --git a/drivers/net/ethernet/intel/igc/Makefile b/drivers/net/ethernet/intel/igc/Makefile
index ebffd3054285..a64c734740f6 100644
--- a/drivers/net/ethernet/intel/igc/Makefile
+++ b/drivers/net/ethernet/intel/igc/Makefile
@@ -8,5 +8,5 @@ 
 obj-$(CONFIG_IGC) += igc.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
diff --git a/drivers/net/ethernet/intel/ixgbe/Makefile b/drivers/net/ethernet/intel/ixgbe/Makefile
index 4fb0d9e3f2da..965e5ce1b326 100644
--- a/drivers/net/ethernet/intel/ixgbe/Makefile
+++ b/drivers/net/ethernet/intel/ixgbe/Makefile
@@ -6,10 +6,10 @@ 
 
 obj-$(CONFIG_IXGBE) += ixgbe.o
 
-ixgbe-objs := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
-              ixgbe_82599.o ixgbe_82598.o ixgbe_phy.o ixgbe_sriov.o \
-              ixgbe_mbx.o ixgbe_x540.o ixgbe_x550.o ixgbe_lib.o ixgbe_ptp.o \
-              ixgbe_xsk.o
+ixgbe-y := ixgbe_main.o ixgbe_common.o ixgbe_ethtool.o \
+           ixgbe_82599.o ixgbe_82598.o ixgbe_phy.o ixgbe_sriov.o \
+           ixgbe_mbx.o ixgbe_x540.o ixgbe_x550.o ixgbe_lib.o ixgbe_ptp.o \
+           ixgbe_xsk.o
 
 ixgbe-$(CONFIG_IXGBE_DCB) +=  ixgbe_dcb.o ixgbe_dcb_82598.o \
                               ixgbe_dcb_82599.o ixgbe_dcb_nl.o
diff --git a/drivers/net/ethernet/intel/ixgbevf/Makefile b/drivers/net/ethernet/intel/ixgbevf/Makefile
index 186a4bb24fde..01d3e892f3fa 100644
--- a/drivers/net/ethernet/intel/ixgbevf/Makefile
+++ b/drivers/net/ethernet/intel/ixgbevf/Makefile
@@ -6,9 +6,5 @@ 
 
 obj-$(CONFIG_IXGBEVF) += ixgbevf.o
 
-ixgbevf-objs := vf.o \
-                mbx.o \
-                ethtool.o \
-                ixgbevf_main.o
+ixgbevf-y := vf.o mbx.o ethtool.o ixgbevf_main.o
 ixgbevf-$(CONFIG_IXGBEVF_IPSEC) += ipsec.o
-
diff --git a/drivers/net/ethernet/intel/libeth/Makefile b/drivers/net/ethernet/intel/libeth/Makefile
index cb99203d1dd2..52492b081132 100644
--- a/drivers/net/ethernet/intel/libeth/Makefile
+++ b/drivers/net/ethernet/intel/libeth/Makefile
@@ -3,4 +3,4 @@ 
 
 obj-$(CONFIG_LIBETH)		+= libeth.o
 
-libeth-objs			+= rx.o
+libeth-y			:= rx.o
diff --git a/drivers/net/ethernet/intel/libie/Makefile b/drivers/net/ethernet/intel/libie/Makefile
index bf42c5aeeedd..ffd27fab916a 100644
--- a/drivers/net/ethernet/intel/libie/Makefile
+++ b/drivers/net/ethernet/intel/libie/Makefile
@@ -3,4 +3,4 @@ 
 
 obj-$(CONFIG_LIBIE)	+= libie.o
 
-libie-objs		+= rx.o
+libie-y			:= rx.o