arm64/mm: use phys_addr_t
PATCH 1/1 arm64/mm: use phys_addr_t
From: Miles Chen <[email protected]>
Use phys_addr_t instead of unsigned long for the return value of __pa(), make code easy to understand.
--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/mm/mmu.c +2 -2
@@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,static void __init __map_memblock (pgd_t *pgd,phys_addr_t start,phys_addr_t end) { -unsigned long kernel_start =__pa (_text); -unsigned long kernel_end =__pa (__init_begin); +phys_addr_t kernel_start =__pa (_text); +phys_addr_t kernel_end =__pa (__init_begin);/* * Take care not to create a writable alias for the
Signature · 1 line
1.9.1
Quoted 15 lines · miles.chen at mediatek.com
From: Miles Chen <[email protected]>
Use
phys_addr_tinstead of unsigned long for the return value of__pa(), make code easy to understand.Signed-off-by Miles Chen <[email protected]>--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/mm/mmu.c +0
-0
arch/arm64/mm/mmu.c static void create_mapping_late(phys_addr_t phys, unsigned long virt, · line 363
Quoted 7 lines
arch/arm64/mm/mmu.c +2
-2@@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,static void __init __map_memblock (pgd_t *pgd,phys_addr_t start,phys_addr_t end) { -unsigned long kernel_start =__pa (_text); -unsigned long kernel_end =__pa (__init_begin); +phys_addr_t kernel_start =__pa (_text); +phys_addr_t kernel_end =__pa (__init_begin);
Looks fine.
Quoted 6 lines · miles.chen at mediatek.com
From: Miles Chen <[email protected]>
Use
phys_addr_tinstead of unsigned long for the return value of__pa(), make code easy to understand.Signed-off-by Miles Chen <[email protected]>
This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as.
Thanks,
Mark.
Quoted 27 lines
--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/mm/mmu.c +2
-2@@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,static void __init __map_memblock (pgd_t *pgd,phys_addr_t start,phys_addr_t end) { -unsigned long kernel_start =__pa (_text); -unsigned long kernel_end =__pa (__init_begin); +phys_addr_t kernel_start =__pa (_text); +phys_addr_t kernel_end =__pa (__init_begin);/* * Take care not to create a writable alias for the Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 12 lines · Mark Rutland
Quoted 6 lines · miles.chen at mediatek.com
From: Miles Chen <[email protected]>
Use
phys_addr_tinstead of unsigned long for the return value of__pa(), make code easy to understand.Signed-off-by Miles Chen <[email protected]>This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as.
Indeed. But doesn't it clash with Laura's series?
Quoted 37 lines
Acked-by Mark Rutland <[email protected]>Thanks,
Mark.Quoted 23 lines
--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/mm/mmu.c +2
-3@@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,static void __init __map_memblock (pgd_t *pgd,phys_addr_t start,phys_addr_t end) { -unsigned long kernel_start =__pa (_text); -unsigned long kernel_end =__pa (__init_begin); +phys_addr_t kernel_start =__pa (_text); +phys_addr_t kernel_end =__pa (__init_begin);/* * Take care not to create a writable alias for the -- 1.9.1
Quoted 4 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Mark Rutland
reviewerQuoted 7 lines · Ard Biesheuvel
Quoted 6 lines · Mark Rutland
Quoted 5 lines · miles.chen at mediatek.com
From: Miles Chen <[email protected]>
Use
phys_addr_tinstead of unsigned long for the return value of__pa(), make code easy to understand.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Signed-off-by Miles Chen <[email protected]>This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as.
Indeed. But doesn't it clash with Laura's series?
Good point.
Yes, but only for the RHS of the assignment changing. This'll need to be rebased atop of the arm64 for-next/core branch, or Catalin/Will might fix it up when applying, perhaps?
Thanks,
Mark.
Quoted 37 lines
Quoted 37 lines
Acked-by Mark Rutland <[email protected]>Thanks,
Mark.Quoted 23 lines
--- arch/arm64/mm/mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/mm/mmu.c +2
-3@@ -359,8 +359,8 @@ static void create_mapping_late(phys_addr_t phys, unsigned long virt,static void __init __map_memblock (pgd_t *pgd,phys_addr_t start,phys_addr_t end) { -unsigned long kernel_start =__pa (_text); -unsigned long kernel_end =__pa (__init_begin); +phys_addr_t kernel_start =__pa (_text); +phys_addr_t kernel_end =__pa (__init_begin);/* * Take care not to create a writable alias for the -- 1.9.1
Quoted 4 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 15 lines · Mark Rutland
Quoted 14 lines · Ard Biesheuvel
Quoted 12 lines · Mark Rutland
Quoted 6 lines · miles.chen at mediatek.com
From: Miles Chen <[email protected]>
Use
phys_addr_tinstead of unsigned long for the return value of__pa(), make code easy to understand.Signed-off-by Miles Chen <[email protected]>This looks sensible to me. It's consistent with the types these variables are compared against, and with the types of function parameters these are passed as.
Quoted 7 lines
Quoted 1 line
Indeed. But doesn't it clash with Laura's series?
Good point.
Yes, but only for the RHS of the assignment changing. This'll need to be rebased atop of the arm64 for-next/core branch, or Catalin/Will might fix it up when applying, perhaps?
Yeah, it's dead easy for me to fix up.
Will