summaryrefslogtreecommitdiff
path: root/xen
diff options
context:
space:
mode:
authorMichal Orzel <michal.orzel@amd.com>2023-05-12 16:35:34 +0200
committerJulien Grall <jgrall@amazon.com>2023-05-15 09:48:11 +0100
commitb3e4a6def6d2191b5575261d530e7a16c1a4df66 (patch)
treefcc595c083387a0b54f7a104104f1eaef796f5f9 /xen
parent4c507d8a6b6e8be90881a335b0a66eb28e0f7737 (diff)
downloadxen-b3e4a6def6d2191b5575261d530e7a16c1a4df66.tar.gz
xen/arm: smmuv3: Constify arm_smmu_get_by_dev() parameter
This function does not modify its parameter 'dev' and it is not supposed to do it. Therefore, constify it. Signed-off-by: Michal Orzel <michal.orzel@amd.com> Reviewed-by: Rahul Singh <rahul.singh@arm.com> Reviewed-by: Henry Wang <Henry.Wang@arm.com> Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Diffstat (limited to 'xen')
-rw-r--r--xen/drivers/passthrough/arm/smmu-v3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c
index bfdb62b395..bf053cdb6d 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -1468,7 +1468,7 @@ static bool arm_smmu_sid_in_range(struct arm_smmu_device *smmu, u32 sid)
return sid < limit;
}
/* Forward declaration */
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev);
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev);
static int arm_smmu_add_device(u8 devfn, struct device *dev)
{
@@ -2556,7 +2556,7 @@ static int __must_check arm_smmu_iotlb_flush(struct domain *d, dfn_t dfn,
return arm_smmu_iotlb_flush_all(d);
}
-static struct arm_smmu_device *arm_smmu_get_by_dev(struct device *dev)
+static struct arm_smmu_device *arm_smmu_get_by_dev(const struct device *dev)
{
struct arm_smmu_device *smmu = NULL;