From: Quentin Young Date: Mon, 19 Nov 2018 18:48:42 +0000 (+0000) Subject: tools: add non-32 bit atomic warning to checkpatch X-Git-Tag: frr-7.1-dev~170^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F3359%2Fhead;p=mirror%2Ffrr.git tools: add non-32 bit atomic warning to checkpatch Signed-off-by: Quentin Young --- diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 22354c1e88..547a4b2137 100755 --- a/tools/checkpatch.pl +++ b/tools/checkpatch.pl @@ -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