5 if [[ "$file" = "" ]] ; then
6 echo "Usage: $0 <file with smatch messages>"
10 outfile
="kernel.dma_funcs"
12 remove
=$
(echo ${bin_dir}/..
/smatch_data
/${outfile}.remove
)
13 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
14 tmp2
=$
(mktemp
/tmp
/smatch.XXXX
)
16 echo "// list of DMA function and buffer parameters." > $outfile
17 echo '// generated by `gen_dma_funcs.sh`' >> $outfile
18 ${bin_dir}/trace_params.pl
$file usb_control_msg
6 >> $tmp
19 ${bin_dir}/trace_params.pl
$file usb_fill_bulk_urb
3 >> $tmp
20 cat $tmp |
sort -u > $tmp2
22 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> $outfile
24 echo "Done. List saved as '$outfile'"