]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fs: Remove duplicated flag O_NDELAY occurring twice in VALID_OPEN_FLAGS
authorKrzysztof Wilczyński <kw@linux.com>
Sun, 6 Sep 2020 22:39:49 +0000 (22:39 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 16 Sep 2020 23:27:43 +0000 (19:27 -0400)
The O_NDELAY flag occurs twice in the VALID_OPEN_FLAGS definition, this
change removes the duplicate.  There is no change to the functionality.

Note, that the flags O_NONBLOCK and O_NDELAY are not duplicates, as
values of these flags are platform dependent, and on platforms like
Sparc O_NONBLOCK and O_NDELAY are not the same.

This has been done that way to maintain the ABI compatibility with
Solaris since the Sparc port was first introduced.

This change resolves the following Coccinelle warning:

  include/linux/fcntl.h:11:13-21: duplicated argument to & or |

Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/fcntl.h

index 7bcdcf4f6ab2f1b5ccfa3b9b1667174c4bfbf1b9..921e750843e660c2909c678b73eb052955712203 100644 (file)
@@ -8,7 +8,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)