Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9205666ybi; Tue, 23 Jul 2019 23:56:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwF7QJhIPTRAQh+jZGbyTXMiQ/5jz+XthdwtqCFH910jBqnXh2zqwVdSGZ/hBMqXdRAhBpD X-Received: by 2002:a63:db47:: with SMTP id x7mr79483521pgi.375.1563951411905; Tue, 23 Jul 2019 23:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563951411; cv=none; d=google.com; s=arc-20160816; b=XYn5ZtbM+baB/we1+Dpu+vnYonrcpz45lGnmml+HBMirbUi1L5q70BZ8uhR6CR3FhU QfBPDSb+/KhLy+cFjhxzC9mulI7o8phf15MRZSGbsx5vTr4EJgCx4avEQTfhK6oM55tD VP/Dhc2DlIXd7uu31+GiELu8/xpszZH6j/PbFRY2Xupt0At78TXDA1KwdJqpKlSdcjTU D12YQR07x9os5OrS4M/9WyJIIgoqNQ5q7HI+hHenRGTncDuYroSFgmiUIqa3sqZSqA2b eWBmujfCioPdFthttD5d2heNRDCKd0FrDxAgUeIN4/nndDq2sytrquMHArMSz0XYbI/3 SIZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=8bBmORaD8AfdiJ0H1erZFPipoEtnbuQrB4jUIR988zM=; b=kebZ2YW/qmd+Dao3lepWvE/roM5C93LavXHei/61Mr4LjekxY5p69BecMUbFVZiAkG LiCm+bHtO7okrWTCanyJxnbz9xF+Pukttj1NxUtSqqSatWG5/IZjeGHq54wQ38eVyKLH b4ZXofGHbvqP1AEqLTvVe3+Ngmm9fyZkcMpk8d2zO6NB2DHERClQ104iDKrSzBALttqs TurDddclE6PuTKrT0WX1LUj5M4VHvXjifF0uCLDFzl86h73OdWuK27KOKCOIxBiNzusn IqrQG+DsOt0RwH6DCyPljVlcRCex5FSLeIetuZzUjOhRnQ9tTlsdwhhvmtVToaQib2Hr lwYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7si2860785pgc.460.2019.07.23.23.56.37; Tue, 23 Jul 2019 23:56:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726444AbfGXGzq (ORCPT + 99 others); Wed, 24 Jul 2019 02:55:46 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:60428 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725870AbfGXGzq (ORCPT ); Wed, 24 Jul 2019 02:55:46 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B64D5D0066629F36656E; Wed, 24 Jul 2019 14:55:03 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Wed, 24 Jul 2019 14:54:54 +0800 From: YueHaibing To: , , , , CC: , , YueHaibing Subject: [PATCH] RDMA/hns: Fix build error Date: Wed, 24 Jul 2019 14:54:43 +0800 Message-ID: <20190724065443.53068-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190723024908.11876-1-yuehaibing@huawei.com> References: <20190723024908.11876-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 --- drivers/infiniband/hw/hns/Kconfig | 6 +++--- drivers/infiniband/hw/hns/Makefile | 8 ++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/hns/Kconfig b/drivers/infiniband/hw/hns/Kconfig index 8bf847b..5478219 100644 --- a/drivers/infiniband/hw/hns/Kconfig +++ b/drivers/infiniband/hw/hns/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config INFINIBAND_HNS - tristate "HNS RoCE Driver" + bool "HNS RoCE Driver" depends on NET_VENDOR_HISILICON depends on ARM64 || (COMPILE_TEST && 64BIT) ---help--- @@ -11,7 +11,7 @@ config INFINIBAND_HNS To compile HIP06 or HIP08 driver as module, choose M here. config INFINIBAND_HNS_HIP06 - bool "Hisilicon Hip06 Family RoCE support" + tristate "Hisilicon Hip06 Family RoCE support" depends on INFINIBAND_HNS && HNS && HNS_DSAF && HNS_ENET ---help--- RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip06 and @@ -21,7 +21,7 @@ config INFINIBAND_HNS_HIP06 module will be called hns-roce-hw-v1 config INFINIBAND_HNS_HIP08 - bool "Hisilicon Hip08 Family RoCE support" + tristate "Hisilicon Hip08 Family RoCE support" depends on INFINIBAND_HNS && PCI && HNS3 ---help--- RoCE driver support for Hisilicon RoCE engine in Hisilicon Hip08 SoC. diff --git a/drivers/infiniband/hw/hns/Makefile b/drivers/infiniband/hw/hns/Makefile index e105945..449a2d8 100644 --- a/drivers/infiniband/hw/hns/Makefile +++ b/drivers/infiniband/hw/hns/Makefile @@ -9,12 +9,8 @@ hns-roce-objs := hns_roce_main.o hns_roce_cmd.o hns_roce_pd.o \ hns_roce_ah.o hns_roce_hem.o hns_roce_mr.o hns_roce_qp.o \ hns_roce_cq.o hns_roce_alloc.o hns_roce_db.o hns_roce_srq.o hns_roce_restrack.o -ifdef CONFIG_INFINIBAND_HNS_HIP06 hns-roce-hw-v1-objs := hns_roce_hw_v1.o $(hns-roce-objs) -obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v1.o -endif +obj-$(CONFIG_INFINIBAND_HNS_HIP06) += hns-roce-hw-v1.o -ifdef CONFIG_INFINIBAND_HNS_HIP08 hns-roce-hw-v2-objs := hns_roce_hw_v2.o hns_roce_hw_v2_dfx.o $(hns-roce-objs) -obj-$(CONFIG_INFINIBAND_HNS) += hns-roce-hw-v2.o -endif +obj-$(CONFIG_INFINIBAND_HNS_HIP08) += hns-roce-hw-v2.o -- 2.7.4