Skip to contentSkip to conversation

arm64: mm: fix __page_to_voff definition

PATCH In review Neeraj Upadhyay 4 participants 5 messages Oct 21, 2016 – Oct 31, 2016 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: mm: fix __page_to_voff definition

Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'.

Fixes 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping")
---
 arch/arm64/include/asm/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/memory.h +1 -1
index ba62df8..b71086d 100644
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x)
 #define _virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #else
 #define __virt_to_pgoff(kaddr)	(((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
-#define __page_to_voff(kaddr)	(((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
+#define __page_to_voff(page)	(((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
 
 #define page_to_virt(page)	((void *)((__page_to_voff(page)) | PAGE_OFFSET))
 #define virt_to_page(vaddr)	((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Neeraj Upadhyay

Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'.

Fixes 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping")

Thanks,
Mark.

Quoted 21 lines
---
 arch/arm64/include/asm/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/memory.h +1 -1
index ba62df8..b71086d 100644
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x)
 #define _virt_addr_valid(kaddr)	pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #else
 #define __virt_to_pgoff(kaddr)	(((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
-#define __page_to_voff(kaddr)	(((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
+#define __page_to_voff(page)	(((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
 
 #define page_to_virt(page)	((void *)((__page_to_voff(page)) | PAGE_OFFSET))
 #define virt_to_page(vaddr)	((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation
Acked-by on v1 1/1
#2 lore raw
In reply to Neeraj Upadhyay
Quoted 15 lines · Neeraj Upadhyay

Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'.

Fixes 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping")
---
 arch/arm64/include/asm/memory.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/include/asm/memory.h +0 -0
index ba62df8..b71086d 100644

arch/arm64/include/asm/memory.h static inline void *phys_to_virt(phys_addr_t x) · line 223

Quoted 8 lines
arch/arm64/include/asm/memory.h +1 -1
@@ -217,7 +217,7 @@ static inline void *phys_to_virt(phys_addr_t x)
 #define _virt_addr_valid(kaddr)        pfn_valid(__pa(kaddr) >> PAGE_SHIFT)
 #else
 #define __virt_to_pgoff(kaddr) (((u64)(kaddr) & ~PAGE_OFFSET) / PAGE_SIZE * sizeof(struct page))
-#define __page_to_voff(kaddr)  (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
+#define __page_to_voff(page)   (((u64)(page) & ~VMEMMAP_START) * PAGE_SIZE / sizeof(struct page))
 
 #define page_to_virt(page)     ((void *)((__page_to_voff(page)) | PAGE_OFFSET))
 #define virt_to_page(vaddr)    ((struct page *)((__virt_to_pgoff(vaddr)) | VMEMMAP_START))
maintainer
#3 lore raw
In reply to Neeraj Upadhyay
Quoted 6 lines · Neeraj Upadhyay

Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'.

Fixes 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping")

I'll queue this patch for 4.10. Thanks.

Signature · 1 line
Catalin
maintainer
#4 lore raw
Quoted 9 lines · Catalin Marinas
Quoted 6 lines · Neeraj Upadhyay

Fix parameter name for __page_to_voff, to match its definition. At present, we don't see any issue, as page_to_virt's caller declares 'page'.

Fixes 9f2875912dac ("arm64: mm: restrict virt_to_page() to the linear mapping")

I'll queue this patch for 4.10. Thanks.

I didn't realise that Will sent it already for 4.9-rc3, so I dropped it from the 4.10 queue.

Signature · 1 line
Catalin