5 if [[ "$file" = "" ]] ; then
6 echo "Usage: $0 <file with smatch messages>"
11 outfile
="kernel.expects_err_ptr"
13 remove
=$
(echo ${bin_dir}/..
/smatch_data
/${outfile}.remove
)
14 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
16 echo "// list of functions which expect an ERR_PTR." > $outfile
17 echo '// generated by `gen_expects_err_ptr.sh`' >> $outfile
18 grep -w "expects ERR_PTR" $file | cut
-d ' ' -f 2,6 | \
19 sed -e 's/([1234567890]*)//' |
sort -u > $tmp
20 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> $outfile
22 echo "Done. List saved as '$outfile'"