linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] highmem: Remove a use of folio->page
@ 2025-06-13 19:48 Matthew Wilcox (Oracle)
  2025-06-16 21:20 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox (Oracle) @ 2025-06-13 19:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Matthew Wilcox (Oracle), linux-mm

Call folio_address() instead of page_address().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/highmem-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/highmem-internal.h b/include/linux/highmem-internal.h
index 9a7683d79a4b..36053c3d6d64 100644
--- a/include/linux/highmem-internal.h
+++ b/include/linux/highmem-internal.h
@@ -195,7 +195,7 @@ static inline void *kmap_local_page_try_from_panic(struct page *page)
 
 static inline void *kmap_local_folio(struct folio *folio, size_t offset)
 {
-	return page_address(&folio->page) + offset;
+	return folio_address(folio) + offset;
 }
 
 static inline void *kmap_local_page_prot(struct page *page, pgprot_t prot)
-- 
2.47.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] highmem: Remove a use of folio->page
  2025-06-13 19:48 [PATCH] highmem: Remove a use of folio->page Matthew Wilcox (Oracle)
@ 2025-06-16 21:20 ` David Hildenbrand
  0 siblings, 0 replies; 2+ messages in thread
From: David Hildenbrand @ 2025-06-16 21:20 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle), Andrew Morton; +Cc: linux-mm

On 13.06.25 21:48, Matthew Wilcox (Oracle) wrote:
> Call folio_address() instead of page_address().
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
>   include/linux/highmem-internal.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/highmem-internal.h b/include/linux/highmem-internal.h
> index 9a7683d79a4b..36053c3d6d64 100644
> --- a/include/linux/highmem-internal.h
> +++ b/include/linux/highmem-internal.h
> @@ -195,7 +195,7 @@ static inline void *kmap_local_page_try_from_panic(struct page *page)
>   
>   static inline void *kmap_local_folio(struct folio *folio, size_t offset)
>   {
> -	return page_address(&folio->page) + offset;
> +	return folio_address(folio) + offset;
>   }
>   
>   static inline void *kmap_local_page_prot(struct page *page, pgprot_t prot)

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-06-16 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 19:48 [PATCH] highmem: Remove a use of folio->page Matthew Wilcox (Oracle)
2025-06-16 21:20 ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).