From: Hanjun Guo <guohanjun@huawei.com>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>,
renzhijie <renzhijie2@huawei.com>,
"lpieralisi@kernel.org" <lpieralisi@kernel.org>,
"sudeep.holla@arm.com" <sudeep.holla@arm.com>,
"rafael@kernel.org" <rafael@kernel.org>,
"lenb@kernel.org" <lenb@kernel.org>,
"jroedel@suse.de" <jroedel@suse.de>,
"robin.murphy@arm.com" <robin.murphy@arm.com>
Cc: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"lorenzo.pieralisi@linaro.org" <lorenzo.pieralisi@linaro.org>
Subject: Re: [PATCH -next] ACPI/IORT: Fix build error implicit-function-declaration
Date: Tue, 26 Jul 2022 10:53:25 +0800 [thread overview]
Message-ID: <078d74b2-151e-4b4a-55fc-9cd8f6fb910c@huawei.com> (raw)
In-Reply-To: <d59bc043788e4dc796a445588d667ab7@huawei.com>
On 2022/7/25 21:50, Shameerali Kolothum Thodi 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
>
> Thanks for spotting this.
>
>> The function iort_iommu_rmr_get_resv_regions() is declared at #ifdef
>> CONFIG_IOMMU_API area, 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 area.
>
> That makes sense. And the only callers of these are SMMU drivers I think we
> don't need stub functions under !CONFIG_IOMMU_API(Lorenzo, could you
> please double check this).
I think so, because SMMU drivers will select IOMMU_API,
in drivers/iommu/Kconfig, it says:
# IOMMU_API always gets selected by whoever wants it.
config IOMMU_API
bool
>
> Nit: Please wrap the commit description to a max of 75 chars per line.
Zhijie, would you mind send a updated version?
Thanks
Hanjun
next prev parent reply other threads:[~2022-07-26 2:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-24 11:54 [PATCH -next] ACPI/IORT: Fix build error implicit-function-declaration Ren Zhijie
2022-07-25 13:50 ` Shameerali Kolothum Thodi
2022-07-26 2:53 ` Hanjun Guo [this message]
2022-07-26 3:22 ` Ren Zhijie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=078d74b2-151e-4b4a-55fc-9cd8f6fb910c@huawei.com \
--to=guohanjun@huawei.com \
--cc=jroedel@suse.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@linaro.org \
--cc=lpieralisi@kernel.org \
--cc=rafael@kernel.org \
--cc=renzhijie2@huawei.com \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox