aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8b1dfd544c64..87bbb8bce9bf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1378,6 +1378,18 @@ sub process {
1378 WARN("adding a line without newline at end of file\n" . $herecurr); 1378 WARN("adding a line without newline at end of file\n" . $herecurr);
1379 } 1379 }
1380 1380
1381# Blackfin: use hi/lo macros
1382 if ($realfile =~ m@arch/blackfin/.*\.S$@) {
1383 if ($line =~ /\.[lL][[:space:]]*=.*&[[:space:]]*0x[fF][fF][fF][fF]/) {
1384 my $herevet = "$here\n" . cat_vet($line) . "\n";
1385 ERROR("use the LO() macro, not (... & 0xFFFF)\n" . $herevet);
1386 }
1387 if ($line =~ /\.[hH][[:space:]]*=.*>>[[:space:]]*16/) {
1388 my $herevet = "$here\n" . cat_vet($line) . "\n";
1389 ERROR("use the HI() macro, not (... >> 16)\n" . $herevet);
1390 }
1391 }
1392
1381# check we are in a valid source file C or perl if not then ignore this hunk 1393# check we are in a valid source file C or perl if not then ignore this hunk
1382 next if ($realfile !~ /\.(h|c|pl)$/); 1394 next if ($realfile !~ /\.(h|c|pl)$/);
1383 1395
@@ -1397,6 +1409,16 @@ sub process {
1397 WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr); 1409 WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);
1398 } 1410 }
1399 1411
1412# Blackfin: don't use __builtin_bfin_[cs]sync
1413 if ($line =~ /__builtin_bfin_csync/) {
1414 my $herevet = "$here\n" . cat_vet($line) . "\n";
1415 ERROR("use the CSYNC() macro in asm/blackfin.h\n" . $herevet);
1416 }
1417 if ($line =~ /__builtin_bfin_ssync/) {
1418 my $herevet = "$here\n" . cat_vet($line) . "\n";
1419 ERROR("use the SSYNC() macro in asm/blackfin.h\n" . $herevet);
1420 }
1421
1400# Check for potential 'bare' types 1422# Check for potential 'bare' types
1401 my ($stat, $cond, $line_nr_next, $remain_next, $off_next); 1423 my ($stat, $cond, $line_nr_next, $remain_next, $off_next);
1402 if ($realcnt && $line =~ /.\s*\S/) { 1424 if ($realcnt && $line =~ /.\s*\S/) {