mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:50:57 +07:00
checkpatch: improve test for no space after cast
sizeof(foo) is not a cast, allow a space after it. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Kalle Valo <kvalo@qca.qualcomm.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
619a908aa3
commit
04941aa774
@ -2515,7 +2515,8 @@ sub process {
|
||||
}
|
||||
}
|
||||
|
||||
if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|{)/) {
|
||||
if ($line =~ /^\+.*(\w+\s*)?\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|[,;\({\[\<\>])/ &&
|
||||
(!defined($1) || $1 !~ /sizeof\s*/)) {
|
||||
if (CHK("SPACING",
|
||||
"No space is necessary after a cast\n" . $herecurr) &&
|
||||
$fix) {
|
||||
|
Loading…
Reference in New Issue
Block a user