Skip to content

Commit 17d9a4b

Browse files
rikardfalkebornwilldeacon
authored andcommitted
iommu/arm-smmu-v3: Constify arm_smmu_mmu_notifier_ops
The only usage of arm_smmu_mmu_notifier_ops is to assign its address to the ops field in the mmu_notifier struct, which is a pointer to const struct mmu_notifier_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn <[email protected]> Reviewed-by: Jean-Philippe Brucker <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent cd76990 commit 17d9a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static void arm_smmu_mmu_notifier_free(struct mmu_notifier *mn)
220220
kfree(mn_to_smmu(mn));
221221
}
222222

223-
static struct mmu_notifier_ops arm_smmu_mmu_notifier_ops = {
223+
static const struct mmu_notifier_ops arm_smmu_mmu_notifier_ops = {
224224
.invalidate_range = arm_smmu_mm_invalidate_range,
225225
.release = arm_smmu_mm_release,
226226
.free_notifier = arm_smmu_mmu_notifier_free,

0 commit comments

Comments
 (0)