4 if [[ "$file" = "" ]] ; then
5 echo "Usage: $0 <file with smatch messages>"
12 for line
in $
(grep 'dereferenced before' $file) ; do
14 code_file
=$
(echo "$line" | cut
-d ' ' -f1)
15 lineno
=$
(echo "$line" | cut
-d ' ' -f2)
16 variable
=$
(echo "$line" | cut
-d "'" -f2)
17 source_line
=$
(tail -n $lineno $code_file |
head -n 1 |
sed -e 's/^\W*//')
19 if echo "$source_line" |
grep -q rcu_assign_pointer
; then
22 if echo "$source_line" |
grep -q '^\W*tda_' ; then
25 if echo "$source_line" |
grep -q tda_fail
; then
28 if echo "$source_line" |
grep -q '^\W*ATH5K_' ; then
31 if echo "$source_line" |
grep -qw CMDINFO
; then
34 if echo "$source_line" |
grep -qw dump_desc_dbg
; then
37 if echo "$source_line" |
grep -qw CAMERA_IS_OPERATIONAL
; then
40 if echo "$source_line" |
grep -qw USBVISION_IS_OPERATIONAL
; then
43 if echo "$source_line" |
grep -qw DEV_INIT_TEST_WITH_RETURN
; then
46 if echo "$source_line" |
grep -qw TW_PRINTK
; then
49 if echo "$source_line" |
grep -qw RESET_ONE_SEC_TX_CNT
; then
52 if echo "$source_line" |
grep -qw SOCK_DEBUG
; then
55 if echo "$source_line" |
grep -qw P80211SKB_RXMETA
; then
58 if echo "$source_line" |
grep -qw ACM_READY
; then
61 if echo "$source_line" |
grep -qw v4l2_subdev_notify
; then
64 if echo "$source_line" |
egrep -qw 'tuner_(err|info)' ; then
67 if echo "$source_line" |
grep -qw DBG_SKB
; then
70 if echo "$source_line" |
grep -qw for_each_mddev
; then
73 if echo "$source_line" |
grep -qw v4l2_subdev_call
; then
76 if echo "$source_line" |
grep -qw VALID_CALLBACK
; then
79 if [ "$variable" == "bp->dev" ] && echo "$source_line" |
grep -qw DP
; then
82 if echo "$source_line" |
grep -qw BNX2X_ERR
; then
85 if echo "$source_line" |
grep -qw FCOE_NETDEV_DBG
; then
88 if echo "$source_line" |
grep -qw __rq_for_each_bio
; then
91 if echo "$source_line" |
grep -qw IPS_DMA_DIR
; then
94 if [ "$variable" == "dev" ] && echo "$source_line" |
grep -qw dprintk
; then
98 echo "$code_file $lineno '$variable': $source_line"