Message ID | 20230512143535.29679-2-michal.orzel@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | xen/arm: smmuv3: Advertise coherent table walk | expand |
On 12/05/2023 15:35, Michal Orzel wrote: > 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: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
Hi Michal, > -----Original Message----- > Subject: [PATCH 1/2] 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: Henry Wang <Henry.Wang@arm.com> Kind regards, Henry
Hi Michal, > On 12 May 2023, at 3:35 pm, Michal Orzel <michal.orzel@amd.com> wrote: > > 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> Regards, Rahul
diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c index bfdb62b395ad..bf053cdb6d5c 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;
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> --- xen/drivers/passthrough/arm/smmu-v3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)