Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164535
b: refs/heads/master
c: 42e41c5
h: refs/heads/master
i:
  164533: 3f0bb12
  164531: 128fa4d
  164527: dccd786
v: v3
  • Loading branch information
Mike Frysinger authored and Linus Torvalds committed Sep 22, 2009
1 parent 320b1af commit e0e4d99
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0487683096decad0720dfaf80b9d28173d5f6662
refs/heads/master: 42e41c54d61e32e8a349943607daa53205324d7f
22 changes: 22 additions & 0 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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)$/);

Expand All @@ -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/) {
Expand Down

0 comments on commit e0e4d99

Please sign in to comment.