tools: add non-32 bit atomic warning to checkpatch

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-11-19 18:48:42 +00:00
parent 0545c37384
commit 11b5117007

View file

@ -6367,6 +6367,13 @@ sub process {
ERROR("NONSTANDARD_INTEGRAL_TYPES",
"Please, no nonstandard integer types in new code.\n" . $herecurr)
}
# check for usage of non-32 bit atomics
if ($line =~ /_Atomic [u]?int(?!32)[0-9]+_t/) {
WARN("NON_32BIT_ATOMIC",
"Please, only use 32 bit atomics.\n" . $herecurr);
}
}
# If we have no input at all, then there is nothing to report on