Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2084335imm; Thu, 19 Jul 2018 12:56:25 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcnyspe86/wuK/57W9bU9lvyQwl/wSIGup8Mk0pywB5jmEikCNC9YF6uEEPam1/1BwOeeW+ X-Received: by 2002:a63:af14:: with SMTP id w20-v6mr11636658pge.47.1532030185290; Thu, 19 Jul 2018 12:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532030185; cv=none; d=google.com; s=arc-20160816; b=nS34cbaMoWvYHDX35DKHcwIrKztcmk2gViNI6sK33gXeqVBximwbqzE2g/XR+cI1Vu Wc+/OkX5HvZ4BDFTlu72qVGcmN99fBygChoWhfVjEniQ9Uux64jqX13Wh5vhdzjvyB4O erv22O5c70HhBYoBhP6hy7FUsH/xUKEPw1EaBZrLSOd6zQUMy9CEq2KfostMVqMI8rzn 53N1X8CuWPIn7ABdg0HWxMvAhYCvVXb/1PaIqBozfba0s34pAU4AFgGmV7+jj3YvJlA8 +YKqvamLhrnIGVIcJDMj3ZPyxC/Tx24ln7Vc2jbk4MuG7MjFy9UoAyzdpOLLYjnnPo/e ijzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EUais4twG52/yNvqGqj+gydGbIicUFrTowv4k/2ycw4=; b=P9DiBUkUc89KPZ4ZqE+y2MV/8tKQ3i2FMBHR8NInd8HBYJ0o8yRfeOP7tLmVmoEgA1 pL+sUPSif8lDfVQ4s2THgkJ72GolGQAEWr5ZY5/So8gnn+fyxXdiz7Gto4kS4LoIFRrH iKDnpbYA9GPdiWkrnmyKOgft25nRO/fc2jQ2pT6qhAPNGXa0Pw1TeX18FR6WJAIT6Uip u9ISbxkVbpFYsB/2H0aLdTj+HsiyYikIn6DYtMtTLgxKBalAd+TX+9rJ1v24I9eH2RDe ZMkxHL1WmJp5WtjjB/lgh5ewDbjSLDR8W0M2rPbpNO9yRymZtWZ96KzdFGwI/VyQ2pfa n/jQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si24857pli.54.2018.07.19.12.56.10; Thu, 19 Jul 2018 12:56:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729914AbeGSUkO (ORCPT + 99 others); Thu, 19 Jul 2018 16:40:14 -0400 Received: from www.osadl.org ([62.245.132.105]:53769 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbeGSUkN (ORCPT ); Thu, 19 Jul 2018 16:40:13 -0400 Received: from debian01.hofrr.at (178.115.242.59.static.drei.at [178.115.242.59] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id w6JJsNAG005161; Thu, 19 Jul 2018 21:54:23 +0200 From: Nicholas Mc Guire To: Christoph Hellwig Cc: Jeff Layton , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] fs: drop duplicated bit in bitmask Date: Thu, 19 Jul 2018 21:53:31 +0200 Message-Id: <1532030011-736-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 X-Spam-Status: No, score=-4.2 required=6.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on www.osadl.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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