Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204868
b: refs/heads/master
c: 74425ee
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Palix authored and Michal Marek committed Jun 11, 2010
1 parent 8bad18f commit 90f86bd
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b396aa03084b51f6822052a8070703287f198360
refs/heads/master: 74425eee71eb44c9f370bd922f72282b69bb0eab
10 changes: 10 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1476,6 +1476,16 @@ M: Daniel Oliveira Nascimento <don@syst.com.br>
S: Supported
F: drivers/platform/x86/classmate-laptop.c

COCCINELLE/Semantic Patches (SmPL)
M: Julia Lawall <julia@diku.dk>
M: Gilles Muller <Gilles.Muller@lip6.fr>
M: Nicolas Palix <npalix@diku.dk>
L: cocci@diku.dk (moderated for non-subscribers)
W: http://coccinelle.lip6.fr/
S: Supported
F: scripts/coccinelle/
F: scripts/coccicheck

CODA FILE SYSTEM
M: Jan Harkes <jaharkes@cs.cmu.edu>
M: coda@cs.cmu.edu
Expand Down
12 changes: 8 additions & 4 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ endif
# of make so .config is not included in this case either (for *config).

no-dot-config-targets := clean mrproper distclean \
cscope TAGS tags help %docs check% \
cscope TAGS tags help %docs check% coccicheck \
include/linux/version.h headers_% \
kernelrelease kernelversion

Expand Down Expand Up @@ -526,7 +526,7 @@ endif # $(dot-config)
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
# Defaults to vmlinux, but the arch makefile usually adds further targets
# Defaults vmlinux but it is usually overridden in the arch makefile
all: vmlinux

ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
Expand Down Expand Up @@ -1279,8 +1279,9 @@ help:
@echo ' includecheck - Check for duplicate included header files'
@echo ' export_report - List the usages of all exported symbols'
@echo ' headers_check - Sanity check on exported headers'
@echo ' headerdep - Detect inclusion cycles in headers'; \
echo ''
@echo ' headerdep - Detect inclusion cycles in headers'
@$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
@echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
Expand Down Expand Up @@ -1439,6 +1440,9 @@ versioncheck:
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl

coccicheck:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@

namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl

Expand Down
3 changes: 3 additions & 0 deletions trunk/scripts/Makefile.help
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

checker-help:
@echo ' coccicheck - Check with Coccinelle.'
2 changes: 1 addition & 1 deletion trunk/scripts/checkkconfigsymbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while
do
# Output the bare Kconfig variable and the filename; the _MODULE part at
# the end is not removed here (would need perl an not-hungry regexp for that).
sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Za-z_]\+\).*!\2 '$i'!p' < $i
sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i
done | \
# Smart "sort|uniq" implemented in awk and tuned to collect the names of all
# files which use a given symbol
Expand Down
54 changes: 54 additions & 0 deletions trunk/scripts/coccicheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/sh

SPATCH="`which ${SPATCH:=spatch}`"

if [ ! -x "$SPATCH" ]; then
echo 'spatch is part of the Coccinelle project and is available at http://coccinelle.lip6.fr/'
exit 1
fi

if [ "$MODE" = "" ] ; then
echo 'You have not explicitly specify the mode to use. Fallback to "report".'
echo 'You can specify the mode with "make coccicheck MODE=<mode>"'
echo 'Available modes are: report, patch, context, org'
MODE="report"
fi

echo ''
echo 'Please check for false positives in the output before submitting a patch.'
echo 'When using "patch" mode, carefully review the patch before submitting it.'
echo ''

function coccinelle {
COCCI="$1"
DIR="$2"

OPT=`grep "Option" $COCCI | cut -d':' -f2`
FILE=`echo $COCCI | sed "s|$DIR/||"`

echo "Processing `basename $COCCI` with option(s) \"$OPT\""
echo 'Message example to submit a patch:'

sed -e '/\/\/\//!d' -e 's|^///||' $COCCI

echo ' The semantic patch that makes this change is available'
echo " in $FILE."
echo ''
echo ' More information about semantic patching is available at'
echo ' http://coccinelle.lip6.fr/'
echo ''

# The option '-parse_cocci' can be used to syntaxically check the SmPL files.
#
# $SPATCH -D $MODE -very_quiet -parse_cocci $COCCI $OPT > /dev/null

$SPATCH -D $MODE -very_quiet -sp_file $COCCI $OPT -dir $DIR
}

if [ "$COCCI" = "" ] ; then
for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do
coccinelle $f $srctree;
done
else
coccinelle $COCCI $srctree
fi
10 changes: 5 additions & 5 deletions trunk/scripts/decodecode
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ echo $code
code=`echo $code | sed -e 's/.*Code: //'`

width=`expr index "$code" ' '`
width=$((($width-1)/2))
width=$[($width-1)/2]
case $width in
1) type=byte ;;
2) type=2byte ;;
4) type=4byte ;;
esac

disas() {
${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s > /dev/null 2>&1
${CROSS_COMPILE}as $AFLAGS -o $1.o $1.s &> /dev/null

if [ "$ARCH" = "arm" ]; then
if [ $width -eq 2 ]; then
if [ "$ARCH" == "arm" ]; then
if [ $width == 2 ]; then
OBJDUMPFLAGS="-M force-thumb"
fi

${CROSS_COMPILE}strip $1.o
fi

${CROSS_COMPILE}objdump $OBJDUMPFLAGS -S $1.o | \
grep -v "/tmp\|Disassembly\|\.text\|^$" > $1.dis 2>&1
grep -v "/tmp\|Disassembly\|\.text\|^$" &> $1.dis
}

marker=`expr index "$code" "\<"`
Expand Down
1 change: 0 additions & 1 deletion trunk/scripts/kconfig/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ gconf.glade.h
#
conf
mconf
nconf
qconf
gconf
kxgettext

0 comments on commit 90f86bd

Please sign in to comment.