[PATCH] fs: drop duplicated bit in bitmask

From: Nicholas Mc Guire
Date: Thu Jul 19 2018 - 15:55:38 EST


The definition of VALID_OPEN_FLAGS contains O_NDELAY two times which
is unnecessary. The duplication has no actual effect so this is just
a minor code cleanup and fixes a coccinelle warning.

Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
---

Problem found by coccicheck: doublebitand.cocci
message: ./include/linux/fcntl.h:10:13-21: duplicated argument to & or |

Patch was compile tested with: x86_64_defconfig (built fs/open.c and
fs/fcntl.c)
with some sparse warnings in both cases - not related to the proposed
change though

Patch is against 4.18-rc5 (localversion-next is next-20180719)

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

diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h
index 27dc7a6..72df1b8 100644
--- a/include/linux/fcntl.h
+++ b/include/linux/fcntl.h
@@ -7,7 +7,7 @@
/* list of all valid flags for the open/openat flags argument: */
#define VALID_OPEN_FLAGS \
(O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \
- O_APPEND | O_NDELAY | O_NONBLOCK | O_NDELAY | __O_SYNC | O_DSYNC | \
+ O_APPEND | O_NDELAY | O_NONBLOCK | __O_SYNC | O_DSYNC | \
FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \
O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE)

--
2.1.4