From e0e4d9938fc44f195380e1f4c6cf78da45b5ce1c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 21 Sep 2009 17:04:40 -0700 Subject: [PATCH] --- yaml --- r: 164535 b: refs/heads/master c: 42e41c54d61e32e8a349943607daa53205324d7f h: refs/heads/master i: 164533: 3f0bb12d359131ef723c2239b9de731c684e5f9a 164531: 128fa4dc5676c8638429f84d391c4f9d6de99151 164527: dccd78603af71c403c6b15ca85688d2fc76cd77f v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2e5872bd5c90..998cc204fa4a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0487683096decad0720dfaf80b9d28173d5f6662 +refs/heads/master: 42e41c54d61e32e8a349943607daa53205324d7f diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 8b1dfd544c64..87bbb8bce9bf 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1378,6 +1378,18 @@ sub process { WARN("adding a line without newline at end of file\n" . $herecurr); } +# Blackfin: use hi/lo macros + if ($realfile =~ m@arch/blackfin/.*\.S$@) { + if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) { + my $herevet = "$here\n" . cat_vet($line) . "\n"; + ERROR("use the LO() macro, not (... & 0xFFFF)\n" . $herevet); + } + if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) { + my $herevet = "$here\n" . cat_vet($line) . "\n"; + ERROR("use the HI() macro, not (... >> 16)\n" . $herevet); + } + } + # check we are in a valid source file C or perl if not then ignore this hunk next if ($realfile !~ /\.(h|c|pl)$/); @@ -1397,6 +1409,16 @@ sub process { WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr); } +# Blackfin: don't use __builtin_bfin_[cs]sync + if ($line =~ /__builtin_bfin_csync/) { + my $herevet = "$here\n" . cat_vet($line) . "\n"; + ERROR("use the CSYNC() macro in asm/blackfin.h\n" . $herevet); + } + if ($line =~ /__builtin_bfin_ssync/) { + my $herevet = "$here\n" . cat_vet($line) . "\n"; + ERROR("use the SSYNC() macro in asm/blackfin.h\n" . $herevet); + } + # Check for potential 'bare' types my ($stat, $cond, $line_nr_next, $remain_next, $off_next); if ($realcnt && $line =~ /.\s*\S/) {