5 if [[ "$file" = "" ]] ; then
6 echo "Usage: $0 <file with smatch messages>"
11 remove
=$
(echo ${bin_dir}/..
/smatch_data
/kernel.returns_held.remove
)
12 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
14 echo "// list of functions that return a held device." \
15 > kernel.returns_held_funcs
16 echo '// generated by `gen_returns_held.sh`' >> kernel.returns_held_funcs
17 grep "returned dev is held" $file | cut
-s -d ' ' -f 2 | cut
-d '(' -f 1 | \
19 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u \
20 >> kernel.returns_held_funcs
22 echo "Done. List saved as 'kernel.returns_held_funcs'"