Replace the indirection through struct stack_trace with an invocation of
the storage array based interface.

Signed-off-by: Thomas Gleixner <t...@linutronix.de>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Cc: io...@lists.linux-foundation.org
Cc: Robin Murphy <robin.mur...@arm.com>
Cc: Marek Szyprowski <m.szyprow...@samsung.com>
---
 kernel/dma/debug.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -89,8 +89,8 @@ struct dma_debug_entry {
        int              sg_mapped_ents;
        enum map_err_types  map_err_type;
 #ifdef CONFIG_STACKTRACE
-       struct           stack_trace stacktrace;
-       unsigned long    st_entries[DMA_DEBUG_STACKTRACE_ENTRIES];
+       unsigned int    stack_len;
+       unsigned long   stack_entries[DMA_DEBUG_STACKTRACE_ENTRIES];
 #endif
 };
 
@@ -174,7 +174,7 @@ static inline void dump_entry_trace(stru
 #ifdef CONFIG_STACKTRACE
        if (entry) {
                pr_warning("Mapped at:\n");
-               print_stack_trace(&entry->stacktrace, 0);
+               stack_trace_print(entry->stack_entries, entry->stack_len, 0);
        }
 #endif
 }
@@ -704,12 +704,10 @@ static struct dma_debug_entry *dma_entry
        spin_unlock_irqrestore(&free_entries_lock, flags);
 
 #ifdef CONFIG_STACKTRACE
-       entry->stacktrace.max_entries = DMA_DEBUG_STACKTRACE_ENTRIES;
-       entry->stacktrace.entries = entry->st_entries;
-       entry->stacktrace.skip = 1;
-       save_stack_trace(&entry->stacktrace);
+       entry->stack_len = stack_trace_save(entry->stack_entries,
+                                           ARRAY_SIZE(entry->stack_entries),
+                                           1);
 #endif
-
        return entry;
 }
 


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to