colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / include / trace.h
index 871327fb358a9e894447f99fca22faa2294d31e3..606dba9768974f12eb241b8d8eec499e538b6877 100644 (file)
@@ -1,7 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright (c) 2012 The Chromium OS Authors.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __TRACE_H
@@ -40,7 +39,7 @@ struct trace_output_func {
 /* A header at the start of the trace output buffer */
 struct trace_output_hdr {
        enum trace_chunk_type type;     /* Record type */
-       uint32_t rec_count;             /* Number of records */
+       size_t rec_count;               /* Number of records */
 };
 
 /* Print statistics about traced function calls */
@@ -58,7 +57,7 @@ void trace_print_stats(void);
  * @param needed       Returns number of bytes used / needed
  * @return 0 if ok, -1 on error (buffer exhausted)
  */
-int trace_list_functions(void *buff, int buff_size, unsigned *needed);
+int trace_list_functions(void *buff, size_t buff_size, size_t *needed);
 
 /* Flags for ftrace_record */
 enum ftrace_flags {
@@ -78,7 +77,7 @@ struct trace_call {
        uint32_t flags;         /* Flags and timestamp */
 };
 
-int trace_list_calls(void *buff, int buff_size, unsigned int *needed);
+int trace_list_calls(void *buff, size_t buff_size, size_t *needed);
 
 /**
  * Turn function tracing on and off
@@ -89,14 +88,7 @@ int trace_list_calls(void *buff, int buff_size, unsigned int *needed);
  */
 void trace_set_enabled(int enabled);
 
-#ifdef CONFIG_TRACE_EARLY
 int trace_early_init(void);
-#else
-static inline int trace_early_init(void)
-{
-       return 0;
-}
-#endif
 
 /**
  * Init the trace system