Skip to contentSkip to conversation

iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

PATCH In review Jordan Crouse 3 participants 5 messages Jun 4, 2020 – Jul 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

When CONFIG_OF=n of_match_device() gets pre-processed out of existence leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to keep the compiler from warning in that case.

Fixes 0e764a01015d ("iommu/arm-smmu: Allow client devices to select direct mapping")

---

 drivers/iommu/arm-smmu-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-qcom.c +1 -1
index cf01d0215a39..be4318044f96 100644
@@ -12,7 +12,7 @@ struct qcom_smmu {
 	struct arm_smmu_device smmu;
 };
 
-static const struct of_device_id qcom_smmu_client_of_match[] = {
+static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
 	{ .compatible = "qcom,adreno" },
 	{ .compatible = "qcom,mdp4" },
 	{ .compatible = "qcom,mdss" },
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 18 lines · Jordan Crouse

When CONFIG_OF=n of_match_device() gets pre-processed out of existence leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to keep the compiler from warning in that case.

Fixes 0e764a01015d ("iommu/arm-smmu: Allow client devices to select direct mapping")

---

 drivers/iommu/arm-smmu-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-qcom.c +0 -0
index cf01d0215a39..be4318044f96 100644

drivers/iommu/arm-smmu-qcom.c struct qcom_smmu { · line 18

Quoted 8 lines
drivers/iommu/arm-smmu-qcom.c +1 -1
@@ -12,7 +12,7 @@ struct qcom_smmu {
 	struct arm_smmu_device smmu;
 };
 
-static const struct of_device_id qcom_smmu_client_of_match[] = {
+static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
 	{ .compatible = "qcom,adreno" },
 	{ .compatible = "qcom,mdp4" },
 	{ .compatible = "qcom,mdss" },

Thanks. Joerg -- can you pick this one up, please? I don't have any other SMMU fixes pending at the moment.

Cheers,

Will

#2 lore raw
Quoted 31 lines · Will Deacon
Quoted 18 lines · Jordan Crouse

When CONFIG_OF=n of_match_device() gets pre-processed out of existence leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to keep the compiler from warning in that case.

Fixes 0e764a01015d ("iommu/arm-smmu: Allow client devices to select direct mapping")

---

 drivers/iommu/arm-smmu-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-qcom.c +0 -0
index cf01d0215a39..be4318044f96 100644

drivers/iommu/arm-smmu-qcom.c struct qcom_smmu { · line 18

Quoted 8 lines
drivers/iommu/arm-smmu-qcom.c +1 -1
@@ -12,7 +12,7 @@ struct qcom_smmu {
 	struct arm_smmu_device smmu;
 };
 
-static const struct of_device_id qcom_smmu_client_of_match[] = {
+static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
 	{ .compatible = "qcom,adreno" },
 	{ .compatible = "qcom,mdp4" },
 	{ .compatible = "qcom,mdss" },

Thanks. Joerg -- can you pick this one up, please? I don't have any other SMMU fixes pending at the moment.

Quoted 3 lines

Cheers,

Will

Quick ping to pick this up for 5.8 fixes.

Thanks,
Jordan

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer
#3 lore raw
In reply to Will Deacon
Quoted 22 lines · Will Deacon
Quoted 21 lines · Jordan Crouse

When CONFIG_OF=n of_match_device() gets pre-processed out of existence leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to keep the compiler from warning in that case.

Fixes 0e764a01015d ("iommu/arm-smmu: Allow client devices to select direct mapping")

---

 drivers/iommu/arm-smmu-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm-smmu-qcom.c +0 -0
index cf01d0215a39..be4318044f96 100644
@@ -12,7 +12,7 @@ struct qcom_smmu {
 	struct arm_smmu_device smmu;
 };
 
Quoted 8 lines

drivers/iommu/arm-smmu-qcom.c struct qcom_smmu { · line 18

Quoted 5 lines
drivers/iommu/arm-smmu-qcom.c +1 -1
-static const struct of_device_id qcom_smmu_client_of_match[] = {
+static const struct of_device_id qcom_smmu_client_of_match[] __maybe_unused = {
 	{ .compatible = "qcom,adreno" },
 	{ .compatible = "qcom,mdp4" },
 	{ .compatible = "qcom,mdss" },

Thanks. Joerg -- can you pick this one up, please? I don't have any other SMMU fixes pending at the moment.

I can't see this in Joerg's tree or in linux-next. Joerg: did you pick this one up? (I thought you did, but I can't find it!).

Will

maintainer
#4 lore raw
Quoted 2 lines · Will Deacon

I can't see this in Joerg's tree or in linux-next. Joerg: did you pick this one up? (I thought you did, but I can't find it!).

Yes, its in the tree and and will be pushed soon. I'll also send it to Linus today.

Joerg