lkml.org 
[lkml]   [2018]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 37/45] C++: Fix page_zonenum() int->enum
From
Date
Make page_zonenum() cast the int it derives to the enum return type.

Signed-off-by: David Howells <dhowells@redhat.com>
---

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
\
 
 \ /
  Last update: 2018-04-01 22:46    [W:0.370 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site