Print this page
new smatch
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/smatch_scripts/gen_dma_funcs.sh
+++ new/usr/src/tools/smatch/src/smatch_scripts/gen_dma_funcs.sh
1 1 #!/bin/bash
2 2
3 3 file=$1
4 4 project=$(echo "$2" | cut -d = -f 2)
5 5
6 6 if [[ "$file" = "" ]] ; then
7 7 echo "Usage: $0 <file with smatch messages> -p=<project>"
8 8 exit 1
9 9 fi
10 10
11 11 if [[ "$project" != "kernel" ]] ; then
12 12 exit 0
13 13 fi
14 14
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 outfile="kernel.dma_funcs"
16 16 bin_dir=$(dirname $0)
17 17 remove=$(echo ${bin_dir}/../smatch_data/${outfile}.remove)
18 18 tmp=$(mktemp /tmp/smatch.XXXX)
19 19 tmp2=$(mktemp /tmp/smatch.XXXX)
20 20
21 21 echo "// list of DMA function and buffer parameters." > $outfile
22 22 echo '// generated by `gen_dma_funcs.sh`' >> $outfile
23 23 ${bin_dir}/trace_params.pl $file usb_control_msg 6 >> $tmp
24 24 ${bin_dir}/trace_params.pl $file usb_fill_bulk_urb 3 >> $tmp
25 +${bin_dir}/trace_params.pl $file dma_map_single 1 >> $tmp
25 26 cat $tmp | sort -u > $tmp2
26 27 mv $tmp2 $tmp
27 28 cat $tmp $remove $remove 2> /dev/null | sort | uniq -u >> $outfile
28 29 rm $tmp
29 30 echo "Done. List saved as '$outfile'"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX