mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:50:54 +07:00
checkpatch: allow multiple const * types
checkpatch's $Type variable does not match declarations of multiple const * types. This can produce false positives for things like: $ ./scripts/checkpatch.pl -f drivers/staging/comedi/comedidev.h WARNING: Missing a blank line after declarations #60: FILE: drivers/staging/comedi/comedidev.h:60: + const struct comedi_lrange *range_table; + const struct comedi_lrange *const *range_table_list; Fix the $Type variable to support matching multiple "* const" uses. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Hartley Sweeten <HartleyS@visionengravers.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
e2826fd070
commit
1574a29f8e
@ -435,7 +435,7 @@ sub build_types {
|
||||
}x;
|
||||
$Type = qr{
|
||||
$NonptrType
|
||||
(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
|
||||
(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*\s*(?:const\s*)?|\[\])+|(?:\s*\[\s*\])+)?
|
||||
(?:\s+$Inline|\s+$Modifier)*
|
||||
}x;
|
||||
$Declare = qr{(?:$Storage\s+(?:$Inline\s+)?)?$Type};
|
||||
|
Loading…
Reference in New Issue
Block a user