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 36/45] C++: Fix kernfs_type() int->enum
From
Date
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);
}

/**
\
 
 \ /
  Last update: 2018-04-01 22:44    [W:1.184 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site