flow: Use add_function_data() to clean up the code
commit8572097283a087ffd2b3a80eec7116f0fb51d2ec
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Sep 2020 10:03:23 +0000 (25 13:03 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 25 Sep 2020 10:03:23 +0000 (25 13:03 +0300)
treed18d4c27589bac37219b7314b3c624fe36d6da09
parenta450affce651b389d37a98de1ac9df1022538a60
flow: Use add_function_data() to clean up the code

This change hasn't really been tested, but I will test it before I push
it.

There are a couple pitfalls.  The data has to be an unsigned long or a
pointer, so I changed a couple bool and int types to unsigned long.  Also
I hope that the free_stree() calls happen before the original data is
restored.  There were a couple comments to that effect in the code, so
I've worried about that before.  I think everything works correctly.

Then when we start parsing a function the data should always start out
as zero.  There were a couple places that did this manually, but that
code can be deleted so I went ahead and removed it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_atomic_inc_dec.c
check_locking.c
smatch_kernel_user_data.c
smatch_param_filter.c
smatch_param_limit.c
smatch_param_used.c
smatch_returns.c
smatch_start_states.c
smatch_type_val.c
smatch_untracked_param.c