Lines Matching refs:expr

441 static struct expression *remove_spinlock_check(struct expression *expr)  in remove_spinlock_check()  argument
443 if (expr->type != EXPR_CALL) in remove_spinlock_check()
444 return expr; in remove_spinlock_check()
445 if (expr->fn->type != EXPR_SYMBOL) in remove_spinlock_check()
446 return expr; in remove_spinlock_check()
447 if (strcmp(expr->fn->symbol_name->name, "spinlock_check")) in remove_spinlock_check()
448 return expr; in remove_spinlock_check()
449 expr = get_argument_from_call_expr(expr->args, 0); in remove_spinlock_check()
450 return expr; in remove_spinlock_check()
462 static char *lock_to_name_sym(struct expression *expr, struct symbol **sym) in lock_to_name_sym() argument
464 expr = remove_spinlock_check(expr); in lock_to_name_sym()
465 expr = filter_kernel_args(expr); in lock_to_name_sym()
466 return expr_to_str_sym(expr, sym); in lock_to_name_sym()
469 static char *get_full_name(struct expression *expr, int index, struct symbol **sym) in get_full_name() argument
476 return expr_to_var_sym(strip_expr(expr->left), sym); in get_full_name()
480 arg = get_argument_from_call_expr(expr->args, lock->arg); in get_full_name()
637 struct expression *expr, *arg; in handle_macro_lock_unlock() local
646 expr = last_ptr_list((struct ptr_list *)big_expression_stack); in handle_macro_lock_unlock()
647 while (expr && expr->type == EXPR_ASSIGNMENT) in handle_macro_lock_unlock()
648 expr = strip_expr(expr->right); in handle_macro_lock_unlock()
649 if (!expr || expr->type != EXPR_CALL) in handle_macro_lock_unlock()
652 macro = get_macro_name(expr->pos); in handle_macro_lock_unlock()
661 arg = get_argument_from_call_expr(expr->args, info->param); in handle_macro_lock_unlock()
670 if (sm && sm->line != expr->pos.line) in handle_macro_lock_unlock()
676 if (sm && sm->line != expr->pos.line) in handle_macro_lock_unlock()
793 static void match_returns_locked(const char *fn, struct expression *expr, in match_returns_locked() argument
803 full_name = get_full_name(expr, index, &sym); in match_returns_locked()
809 static void match_lock_unlock(const char *fn, struct expression *expr, void *_index) in match_lock_unlock() argument
816 full_name = get_full_name(expr, index, &sym); in match_lock_unlock()
843 static int get_param_lock_name(struct sm_state *sm, struct expression *expr, in get_param_lock_name() argument
861 if (expr) { in get_param_lock_name()
865 ret_str = expr_to_str_sym(expr, &ret_sym); in get_param_lock_name()
909 static void match_return_info(int return_id, char *return_ranges, struct expression *expr) in match_return_info() argument
921 param = get_param_lock_name(sm, expr, &param_name); in match_return_info()
983 static bool func_in_lock_table(struct expression *expr) in func_in_lock_table() argument
985 if (expr->type != EXPR_SYMBOL) in func_in_lock_table()
987 return sym_in_lock_table(expr->symbol); in func_in_lock_table()
1110 static void db_param_locked_unlocked(struct expression *expr, int param, char *key, char *value, en… in db_param_locked_unlocked() argument
1116 call = expr; in db_param_locked_unlocked()
1131 if (expr->type != EXPR_ASSIGNMENT) in db_param_locked_unlocked()
1133 name = get_variable_from_key(expr->left, key, &sym); in db_param_locked_unlocked()
1155 static void db_param_locked(struct expression *expr, int param, char *key, char *value) in db_param_locked() argument
1157 db_param_locked_unlocked(expr, param, key, value, LOCK); in db_param_locked()
1160 static void db_param_unlocked(struct expression *expr, int param, char *key, char *value) in db_param_unlocked() argument
1162 db_param_locked_unlocked(expr, param, key, value, UNLOCK); in db_param_unlocked()
1165 static void db_param_restore(struct expression *expr, int param, char *key, char *value) in db_param_restore() argument
1167 db_param_locked_unlocked(expr, param, key, value, RESTORE); in db_param_restore()
1190 static void match_call_info(struct expression *expr) in match_call_info() argument
1198 param = get_caller_param_lock_name(expr, sm, &param_name); in match_call_info()
1206 sql_insert_caller_info(expr, locked_type, param, param_name, "xxx type"); in match_call_info()
1211 static void match_save_states(struct expression *expr) in match_save_states() argument
1217 static void match_restore_states(struct expression *expr) in match_restore_states() argument