An earlier patch disabled checking through inline functions because inlining them clashes with the context tracking code, so this now makes sparse check the inline functions as though they were really functions. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> --- sparse.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) --- sparse.orig/sparse.c 2008-05-29 10:19:13.000000000 +0200 +++ sparse/sparse.c 2008-05-29 10:19:14.000000000 +0200 @@ -29,11 +29,12 @@ struct context_check { const struct expression *expr; }; -DECLARE_ALLOCATOR(context_check); DECLARE_PTR_LIST(context_check_list, struct context_check); DECLARE_PTR_LIST(context_list_list, struct context_check_list); ALLOCATOR(context_check, "context check list"); +static struct symbol_list *inline_list = NULL; + static void context_add(struct context_check_list **ccl, const struct expression *expr, @@ -277,6 +278,15 @@ static int check_bb_context(struct entry */ FOR_EACH_PTR(bb->insns, insn) { switch (insn->opcode) { + case OP_INLINED_CALL: { + if (!insn->func->sym) + break; + if (insn->func->sym->visited) + break; + insn->func->sym->visited = 1; + add_ptr_list(&inline_list, insn->func->sym); + break; + } case OP_CONTEXT: if (handle_context(ep, bb, insn, &combined)) goto out; @@ -545,6 +555,9 @@ int main(int argc, char **argv) check_symbols(sparse_initialize(argc, argv, &filelist)); FOR_EACH_PTR_NOTAG(filelist, file) { check_symbols(sparse(file)); + evaluate_symbol_list(inline_list); + check_symbols(inline_list); + free_ptr_list(&inline_list); } END_FOR_EACH_PTR_NOTAG(file); return 0; } -- -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html