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

David Howells
2018-04-01T20:43:58Z

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

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

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);
}

/**