From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4FC7C433EF for ; Tue, 26 Jul 2022 06:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237626AbiGZGzm (ORCPT ); Tue, 26 Jul 2022 02:55:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231823AbiGZGzh (ORCPT ); Tue, 26 Jul 2022 02:55:37 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 457ED766A; Mon, 25 Jul 2022 23:55:35 -0700 (PDT) Received: from dggpemm500020.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LsSLJ3JLTzmVHK; Tue, 26 Jul 2022 14:53:44 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggpemm500020.china.huawei.com (7.185.36.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 26 Jul 2022 14:55:00 +0800 Received: from [10.174.178.247] (10.174.178.247) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 26 Jul 2022 14:55:00 +0800 Subject: Re: [PATCH v2 -next] ACPI/IORT: Fix build error implicit-function-declaration To: Ren Zhijie , , , , , , , CC: , , References: <20220726033520.47865-1-renzhijie2@huawei.com> From: Hanjun Guo Message-ID: Date: Tue, 26 Jul 2022 14:54:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20220726033520.47865-1-renzhijie2@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.247] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/7/26 11:35, Ren Zhijie wrote: > If CONFIG_ACPI_IORT=y and CONFIG_IOMMU_API is not set, > make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-, > will be failed, like this: > > drivers/acpi/arm64/iort.c: In function ‘iort_get_rmr_sids’: > drivers/acpi/arm64/iort.c:1406:2: error: implicit declaration of function ‘iort_iommu_rmr_get_resv_regions’; did you mean ‘iort_iommu_get_resv_regions’? [-Werror=implicit-function-declaration] > iort_iommu_rmr_get_resv_regions(iommu_fwnode, NULL, head); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > iort_iommu_get_resv_regions > cc1: some warnings being treated as errors > make[3]: *** [drivers/acpi/arm64/iort.o] Error 1 > > The function iort_iommu_rmr_get_resv_regions() > is declared under CONFIG_IOMMU_API, > and the callers of iort_get_rmr_sids() and iort_put_rmr_sids() > would select IOMMU_API. > > To fix this error, move the definitions to #ifdef CONFIG_IOMMU_API. > > Fixes: e302eea8f497 ("ACPI/IORT: Add a helper to retrieve RMR info directly") > Signed-off-by: Ren Zhijie > --- > Changes in v2: > - change commit message to a max of 75 chars per line. > Acked-by: Hanjun Guo Lorenzo, will this patch go via ARM64 tree? Thanks Hanjun