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>
This commit is contained in:
parent
e45bab8ebf
commit
fd1b57ac73
|
@ -2916,7 +2916,7 @@ sub process {
|
|||
if ($dstat ne '' &&
|
||||
$dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(),
|
||||
$dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo();
|
||||
$dstat !~ /^(?:$Ident|-?$Constant)$/ && # 10 // foo()
|
||||
$dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo
|
||||
$dstat !~ /^'X'$/ && # character constants
|
||||
$dstat !~ /$exceptions/ &&
|
||||
$dstat !~ /^\.$Ident\s*=/ && # .foo =
|
||||
|
|
Loading…
Reference in New Issue