From ec9255dbf81808715eae007fcaebdae62483848d Mon Sep 17 00:00:00 2001 From: Gregory Bean Date: Wed, 15 Jun 2011 09:32:38 -0700 Subject: [PATCH] checkpatch: complain about the use of dsb(). Now that mb() does what we want, dsb() should be discouraged. Change-Id: Ib8fe8f44f669753c3d91fac3c6e598e117d6d90e Signed-off-by: Gregory Bean (cherry picked from commit 9c0619be7b93ad114d6f33a749d905ddff93df7d) --- scripts/checkpatch.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index aa62850e2ba..c004a5931f4 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3284,6 +3284,12 @@ sub process { $herecurr); } +# dsb is too ARMish, and should usually be mb. + if ($line =~ /\bdsb\b/) { + WARN("Use of dsb is discouranged: prefer mb.\n" . + $herecurr); + } + # unbounded string functions are overflow risks my %str_fns = ( "sprintf" => "snprintf",