linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <hofrat@osadl.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jeff Layton <jlayton@kernel.org>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nicholas Mc Guire <hofrat@osadl.org>
Subject: [PATCH] fs: drop duplicated bit in bitmask
Date: Thu, 19 Jul 2018 21:53:31 +0200	[thread overview]
Message-ID: <1532030011-736-1-git-send-email-hofrat@osadl.org> (raw)

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@osadl.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


             reply	other threads:[~2018-07-19 19:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 19:53 Nicholas Mc Guire [this message]
2018-07-20 15:14 ` [PATCH] fs: drop duplicated bit in bitmask Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1532030011-736-1-git-send-email-hofrat@osadl.org \
    --to=hofrat@osadl.org \
    --cc=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).