buf_size: handle dma_alloc_attrs()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Mar 2013 19:38:24 +0000 (15 22:38 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Mar 2013 19:38:24 +0000 (15 22:38 +0300)
Just add the function and tell it where to find the size paramter.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_buf_size.c

index 4db70bc..0275127 100644 (file)
@@ -717,6 +717,7 @@ void register_buf_size(int id)
                add_function_assign_hook("sock_kmalloc", &match_alloc, INT_PTR(1));
                add_function_assign_hook("kmemdup", &match_alloc, INT_PTR(1));
                add_function_assign_hook("kmemdup_user", &match_alloc, INT_PTR(1));
+               add_function_assign_hook("dma_alloc_attrs", &match_alloc, INT_PTR(1));
        }
        add_hook(&match_array_assignment, ASSIGNMENT_HOOK);
        add_hook(&match_strlen_condition, CONDITION_HOOK);