Skip to content

Commit d1b5c23

Browse files
chuckleverTrond Myklebust
authored andcommitted
NFS: FMODE_READ and friends are C macros, not enum types
Address a sparse warning: CHECK fs/nfs/nfstrace.c fs/nfs/nfstrace.c: note: in included file (through /home/cel/src/linux/rpc-over-tls/include/trace/trace_events.h, /home/cel/src/linux/rpc-over-tls/include/trace/define_trace.h, ...): fs/nfs/./nfstrace.h:424:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:424:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:424:1: got restricted fmode_t [usertype] fs/nfs/./nfstrace.h:425:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:425:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:425:1: got restricted fmode_t [usertype] fs/nfs/./nfstrace.h:426:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:426:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:426:1: got restricted fmode_t [usertype] Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 09226e8 commit d1b5c23

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

fs/nfs/nfstrace.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,6 @@ TRACE_DEFINE_ENUM(O_CLOEXEC);
430430
{ O_NOATIME, "O_NOATIME" }, \
431431
{ O_CLOEXEC, "O_CLOEXEC" })
432432

433-
TRACE_DEFINE_ENUM(FMODE_READ);
434-
TRACE_DEFINE_ENUM(FMODE_WRITE);
435-
TRACE_DEFINE_ENUM(FMODE_EXEC);
436-
437433
#define show_fmode_flags(mode) \
438434
__print_flags(mode, "|", \
439435
{ ((__force unsigned long)FMODE_READ), "READ" }, \

0 commit comments

Comments
 (0)