Skip to content

Commit dba2ff4

Browse files
committed
arm64: Mark the 'addr' argument to set_ptes() and __set_pte_at() as unused
This argument is not used by the arm64 implementation. Mark it as __always_unused and also remove the unnecessary 'addr' increment in set_ptes(). Signed-off-by: Catalin Marinas <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Cc: Will Deacon <[email protected]> Tested-by: Ryan Roberts <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3425cec commit dba2ff4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/arm64/include/asm/pgtable.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,9 @@ static inline void __sync_cache_and_tags(pte_t pte, unsigned int nr_pages)
341341
mte_sync_tags(pte, nr_pages);
342342
}
343343

344-
static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
345-
pte_t *ptep, pte_t pte, unsigned int nr)
344+
static inline void set_ptes(struct mm_struct *mm,
345+
unsigned long __always_unused addr,
346+
pte_t *ptep, pte_t pte, unsigned int nr)
346347
{
347348
page_table_check_ptes_set(mm, ptep, pte, nr);
348349
__sync_cache_and_tags(pte, nr);
@@ -353,7 +354,6 @@ static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
353354
if (--nr == 0)
354355
break;
355356
ptep++;
356-
addr += PAGE_SIZE;
357357
pte_val(pte) += PAGE_SIZE;
358358
}
359359
}
@@ -528,7 +528,8 @@ static inline pmd_t pmd_mkdevmap(pmd_t pmd)
528528
#define pud_pfn(pud) ((__pud_to_phys(pud) & PUD_MASK) >> PAGE_SHIFT)
529529
#define pfn_pud(pfn,prot) __pud(__phys_to_pud_val((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))
530530

531-
static inline void __set_pte_at(struct mm_struct *mm, unsigned long addr,
531+
static inline void __set_pte_at(struct mm_struct *mm,
532+
unsigned long __always_unused addr,
532533
pte_t *ptep, pte_t pte, unsigned int nr)
533534
{
534535
__sync_cache_and_tags(pte, nr);

0 commit comments

Comments
 (0)