mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 06:39:05 +00:00

Each object file contains information about which module it gets linked
into, so linking the same file into multiple modules now causes a warning:
scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_cmd.o is added to multiple modules: hclge hclgevf
scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_rss.o is added to multiple modules: hclge hclgevf
scripts/Makefile.build:254: drivers/net/ethernet/hisilicon/hns3/Makefile: hns3_common/hclge_comm_tqp_stats.o is added to multiple modules: hclge hclgevf
Change the way that hns3 is built by moving the three common files into a
separate module with exported symbols instead.
Fixes: 5f20be4e90
("net: hns3: refactor hns3 makefile to support hns3_common module")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240528161603.2443125-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
29 lines
1.0 KiB
Makefile
29 lines
1.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# Makefile for the HISILICON network device drivers.
|
|
#
|
|
|
|
ccflags-y += -I$(src)
|
|
ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3pf
|
|
ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3vf
|
|
ccflags-y += -I$(srctree)/drivers/net/ethernet/hisilicon/hns3/hns3_common
|
|
|
|
obj-$(CONFIG_HNS3) += hnae3.o
|
|
|
|
obj-$(CONFIG_HNS3_ENET) += hns3.o
|
|
hns3-objs = hns3_enet.o hns3_ethtool.o hns3_debugfs.o
|
|
|
|
hns3-$(CONFIG_HNS3_DCB) += hns3_dcbnl.o
|
|
|
|
obj-$(CONFIG_HNS3_HCLGEVF) += hclgevf.o hclge-common.o
|
|
|
|
hclge-common-objs += hns3_common/hclge_comm_cmd.o hns3_common/hclge_comm_rss.o hns3_common/hclge_comm_tqp_stats.o
|
|
|
|
hclgevf-objs = hns3vf/hclgevf_main.o hns3vf/hclgevf_mbx.o hns3vf/hclgevf_devlink.o hns3vf/hclgevf_regs.o
|
|
|
|
obj-$(CONFIG_HNS3_HCLGE) += hclge.o hclge-common.o
|
|
hclge-objs = hns3pf/hclge_main.o hns3pf/hclge_mdio.o hns3pf/hclge_tm.o hns3pf/hclge_regs.o \
|
|
hns3pf/hclge_mbx.o hns3pf/hclge_err.o hns3pf/hclge_debugfs.o hns3pf/hclge_ptp.o hns3pf/hclge_devlink.o \
|
|
|
|
hclge-$(CONFIG_HNS3_DCB) += hns3pf/hclge_dcb.o
|