[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1532030011-736-1-git-send-email-hofrat@osadl.org>
Date: Thu, 19 Jul 2018 21:53:31 +0200
From: Nicholas Mc Guire <hofrat@...dl.org>
To: Christoph Hellwig <hch@....de>
Cc: Jeff Layton <jlayton@...nel.org>,
"J. Bruce Fields" <bfields@...ldses.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
Nicholas Mc Guire <hofrat@...dl.org>
Subject: [PATCH] fs: drop duplicated bit in bitmask
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@...dl.org>
---
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
Powered by blists - more mailing lists