public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] mm: Use local variable for swap address space
@ 2019-06-19  1:38 Stuart Summers
  2019-06-19  2:03 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2019-06-19 15:30 ` [PATCH] " Jani Nikula
  0 siblings, 2 replies; 5+ messages in thread
From: Stuart Summers @ 2019-06-19  1:38 UTC (permalink / raw)
  To: intel-gfx

This addresses the following build error:
mm/huge_memory.c: In function ‘__split_huge_page’:
mm/huge_memory.c:2506:41: warning: dereferencing ‘void *’ pointer
    __xa_store(&swap_address_space(entry)->i_pages,
                                         ^~
mm/huge_memory.c:2506:41: error: request for member ‘i_pages’ in
something not a structure or union

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 mm/huge_memory.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index affb2c3667f9..bced5485137b 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -2503,7 +2503,9 @@ static void __split_huge_page(struct page *page, struct list_head *list,
 					head + i, 0);
 		} else if (PageSwapCache(page)) {
 			swp_entry_t entry = { .val = page_private(head + i) };
-			__xa_store(&swap_address_space(entry)->i_pages,
+			struct address_space *address_space =
+				swap_address_space(entry);
+			__xa_store(&address_space->i_pages,
 				   swp_offset(entry),
 				   head + i, 0);
 		}
-- 
2.21.0.5.gaeb582a983

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-06-19 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19  1:38 [PATCH] mm: Use local variable for swap address space Stuart Summers
2019-06-19  2:03 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-06-19 15:30 ` [PATCH] " Jani Nikula
2019-06-19 17:07   ` Summers, Stuart
2019-06-19 20:00     ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox