[PATCH 37/45] C++: Fix page_zonenum() int->enum

From: David Howells
Date: Sun Apr 01 2018 - 16:44:09 EST


Make page_zonenum() cast the int it derives to the enum return type.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

include/linux/mm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index ad06d42adb1a..f91087e1ece6 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -797,7 +797,7 @@ int finish_mkwrite_fault(struct vm_fault *vmf);

static inline enum zone_type page_zonenum(const struct page *page)
{
- return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
+ return (enum zone_type)((page->flags >> ZONES_PGSHIFT) & ZONES_MASK);
}

#ifdef CONFIG_ZONE_DEVICE