On 2019/7/24 19:32, Jason Gunthorpe wrote: > On Wed, Jul 24, 2019 at 02:54:43PM +0800, YueHaibing wrote: >> If INFINIBAND_HNS_HIP08 is selected and HNS3 is m, >> but INFINIBAND_HNS is y, building fails: >> >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_exit': >> hns_roce_hw_v2.c:(.exit.text+0xd): undefined reference to `hnae3_unregister_client' >> drivers/infiniband/hw/hns/hns_roce_hw_v2.o: In function `hns_roce_hw_v2_init': >> hns_roce_hw_v2.c:(.init.text+0xd): undefined reference to `hnae3_register_client' >> >> Also if INFINIBAND_HNS_HIP06 is selected and HNS_DSAF >> is m, but INFINIBAND_HNS is y, building fails: >> >> drivers/infiniband/hw/hns/hns_roce_hw_v1.o: In function `hns_roce_v1_reset': >> hns_roce_hw_v1.c:(.text+0x39fa): undefined reference to `hns_dsaf_roce_reset' >> hns_roce_hw_v1.c:(.text+0x3a25): undefined reference to `hns_dsaf_roce_reset' >> >> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx> >> Fixes: dd74282df573 ("RDMA/hns: Initialize the PCI device for hip08 RoCE") >> Fixes: 08805fdbeb2d ("RDMA/hns: Split hw v1 driver from hns roce driver") >> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx> >> drivers/infiniband/hw/hns/Kconfig | 6 +++--- >> drivers/infiniband/hw/hns/Makefile | 8 ++------ >> 2 files changed, 5 insertions(+), 9 deletions(-) > > did you test this approach with CONFIG_MODULES=n? Yes, I test it, it works now. > > Jason > > . >