[PATCH 36/45] C++: Fix kernfs_type() int->enum

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


Fix kernfs_type() to cast the integer derived from kn->flags to the return
type enum.

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

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

diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index ab25c8b6d9e3..1f06e9ddc930 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -271,7 +271,7 @@ struct kernfs_ops {

static inline enum kernfs_node_type kernfs_type(struct kernfs_node *kn)
{
- return kn->flags & KERNFS_TYPE_MASK;
+ return (enum kernfs_node_type)(kn->flags & KERNFS_TYPE_MASK);
}

/**