diff options
| author | Anshuman Khandual <anshuman.khandual@arm.com> | 2026-09-18 12:19:28 +0530 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-12 21:26:31 -0700 |
| commit | 48bd5dc504cca77b3c3d0df0683c9d29460109d5 (patch) | |
| tree | 260d8f34597b9ab881716ff6f782d68b0d1de4a4 /include/linux | |
| parent | ebd1a08c192109c83a87ddf42793ed6283180faf (diff) | |
mm: constify arguments in default pxdp_get()
Generic MM default pxdp_get() helpers fetch the values contained in
pgtable entries via READ_ONCE() without modifying them. Just make their
arguments explicitly 'const' for some additional protection.
Link: https://lore.kernel.org/20260918064928.793742-1-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: David Hildenbrand <david@kernel.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: SJ Park <sj@kernel.org>
Cc: Pedro Falcato <pfalcato@suse.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pgtable.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index e3c8ab96941c..780fe849ff8b 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -490,35 +490,35 @@ static inline int pudp_set_access_flags(struct vm_area_struct *vma, #endif #ifndef ptep_get -static inline pte_t ptep_get(pte_t *ptep) +static inline pte_t ptep_get(const pte_t *ptep) { return READ_ONCE(*ptep); } #endif #ifndef pmdp_get -static inline pmd_t pmdp_get(pmd_t *pmdp) +static inline pmd_t pmdp_get(const pmd_t *pmdp) { return READ_ONCE(*pmdp); } #endif #ifndef pudp_get -static inline pud_t pudp_get(pud_t *pudp) +static inline pud_t pudp_get(const pud_t *pudp) { return READ_ONCE(*pudp); } #endif #ifndef p4dp_get -static inline p4d_t p4dp_get(p4d_t *p4dp) +static inline p4d_t p4dp_get(const p4d_t *p4dp) { return READ_ONCE(*p4dp); } #endif #ifndef pgdp_get -static inline pgd_t pgdp_get(pgd_t *pgdp) +static inline pgd_t pgdp_get(const pgd_t *pgdp) { return READ_ONCE(*pgdp); } |
