diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-03-23 18:02:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-23 19:58:36 -0400 |
commit | fd1b57ac73f169a5ba7a9569989aad40184f6340 (patch) | |
tree | 7a188a1f50c00a86e790acc406fb96db45294850 /scripts | |
parent | e45bab8ebfee65ba89b228c1e7c64a6cb0812124 (diff) |
checkpatch: high precedence operators do not require additional parentheses in #defines
With any very high precedence operator it is not necessary to enforce
additional parentheses around simple negated expressions. This prevents
us requesting further perentheses around the following:
#define PMEM_IS_FREE(id, index) !(pmem[id].bitmap[index].allocated)
For now add logical and bitwise not and unary minus.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 01a65988a057..ec58d3152e71 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -2916,7 +2916,7 @@ sub process { | |||
2916 | if ($dstat ne '' && | 2916 | if ($dstat ne '' && |
2917 | $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), | 2917 | $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), |
2918 | $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); | 2918 | $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); |
2919 | $dstat !~ /^(?:$Ident|-?$Constant)$/ && # 10 // foo() | 2919 | $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo |
2920 | $dstat !~ /^'X'$/ && # character constants | 2920 | $dstat !~ /^'X'$/ && # character constants |
2921 | $dstat !~ /$exceptions/ && | 2921 | $dstat !~ /$exceptions/ && |
2922 | $dstat !~ /^\.$Ident\s*=/ && # .foo = | 2922 | $dstat !~ /^\.$Ident\s*=/ && # .foo = |