linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI
@ 2021-06-09  1:55 Shawn Guo
  2021-06-09 16:26 ` Will Deacon
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Guo @ 2021-06-09  1:55 UTC (permalink / raw)
  To: Will Deacon
  Cc: Robin Murphy, Bjorn Andersson, Lorenzo Pieralisi, Hanjun Guo,
	Sudeep Holla, Mark Rutland, linux-arm-kernel, linux-arm-msm,
	Shawn Guo

The struct acpi_platform_list and function acpi_match_platform_list()
defined in include/linux/acpi.h are available only when CONFIG_ACPI is
enabled.  Add protection to fix the build issues with !CONFIG_ACPI.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
index f7e187f3fa66..a437753d84df 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
@@ -340,21 +340,25 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
 	{ }
 };
 
+#ifdef CONFIG_ACPI
 static struct acpi_platform_list qcom_acpi_platlist[] = {
 	{ "LENOVO", "CB-01   ", 0x8180, ACPI_SIG_IORT, equal, "QCOM SMMU" },
 	{ "QCOM  ", "QCOMEDK2", 0x8180, ACPI_SIG_IORT, equal, "QCOM SMMU" },
 	{ }
 };
+#endif
 
 struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu)
 {
 	const struct device_node *np = smmu->dev->of_node;
 
+#ifdef CONFIG_ACPI
 	if (np == NULL) {
 		/* Match platform for ACPI boot */
 		if (acpi_match_platform_list(qcom_acpi_platlist) >= 0)
 			return qcom_smmu_create(smmu, &qcom_smmu_impl);
 	}
+#endif
 
 	if (of_match_node(qcom_smmu_impl_of_match, np))
 		return qcom_smmu_create(smmu, &qcom_smmu_impl);
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI
  2021-06-09  1:55 [PATCH] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI Shawn Guo
@ 2021-06-09 16:26 ` Will Deacon
  0 siblings, 0 replies; 2+ messages in thread
From: Will Deacon @ 2021-06-09 16:26 UTC (permalink / raw)
  To: Shawn Guo
  Cc: catalin.marinas, kernel-team, Will Deacon, Hanjun Guo,
	linux-arm-msm, linux-arm-kernel, Sudeep Holla, Robin Murphy,
	Lorenzo Pieralisi, Bjorn Andersson, Mark Rutland

On Wed, 9 Jun 2021 09:55:11 +0800, Shawn Guo wrote:
> The struct acpi_platform_list and function acpi_match_platform_list()
> defined in include/linux/acpi.h are available only when CONFIG_ACPI is
> enabled.  Add protection to fix the build issues with !CONFIG_ACPI.

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI
      https://git.kernel.org/will/c/22c2d7189155

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-09 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  1:55 [PATCH] iommu/arm-smmu-qcom: Protect acpi_match_platform_list() call with CONFIG_ACPI Shawn Guo
2021-06-09 16:26 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).