]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
bootstage: Fix up code style and comments
authorSimon Glass <sjg@chromium.org>
Mon, 22 May 2017 11:05:26 +0000 (05:05 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 5 Jun 2017 18:13:05 +0000 (14:13 -0400)
There are several code style and comment nits. Fix them and also remove
the comment about passing bootstage to the kernel being TBD. This is
already supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/bootstage.c
include/bootstage.h

index 5026705a86d996ffc4c7a38fcecbb0e8b81b484c..a959026946e826f905e68ce8c0cc6944a2d940e4 100644 (file)
@@ -8,8 +8,6 @@
 /*
  * This module records the progress of boot and arbitrary commands, and
  * permits accurate timestamping of each.
-  *
- * TBD: Pass timings to kernel in the FDT
  */
 
 #include <common.h>
@@ -84,6 +82,7 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name,
 
        /* Tell the board about this progress */
        show_boot_progress(flags & BOOTSTAGEF_ERROR ? -id : id);
+
        return mark;
 }
 
@@ -105,6 +104,7 @@ ulong bootstage_mark_name(enum bootstage_id id, const char *name)
 
        if (id == BOOTSTAGE_ID_ALLOC)
                flags = BOOTSTAGEF_ALLOC;
+
        return bootstage_add_record(id, name, flags, timer_get_boot_us());
 }
 
@@ -142,6 +142,7 @@ uint32_t bootstage_start(enum bootstage_id id, const char *name)
 
        rec->start_us = timer_get_boot_us();
        rec->name = name;
+
        return rec->start_us;
 }
 
@@ -153,6 +154,7 @@ uint32_t bootstage_accum(enum bootstage_id id)
 
        duration = (uint32_t)timer_get_boot_us() - rec->start_us;
        rec->time_us += duration;
+
        return duration;
 }
 
index e1aec1b549c0cbd689d319474c84c3bfa0276478..41bd61785c6feb2c00d9fea538b84a0dcfea9b6b 100644 (file)
@@ -217,7 +217,7 @@ ulong timer_get_boot_us(void);
 #if defined(USE_HOSTCC)
 #define show_boot_progress(val) do {} while (0)
 #else
-/*
+/**
  * Board code can implement show_boot_progress() if needed.
  *
  * @param val  Progress state (enum bootstage_id), or -id if an error
@@ -235,7 +235,7 @@ void show_boot_progress(int val);
  *
  * Call this after relocation has happened and after malloc has been initted.
  * We need to copy any pointers in bootstage records that were added pre-
- * relocation, since memory can be overritten later.
+ * relocation, since memory can be overwritten later.
  * @return Always returns 0, to indicate success
  */
 int bootstage_relocate(void);
@@ -251,7 +251,7 @@ int bootstage_relocate(void);
 ulong bootstage_add_record(enum bootstage_id id, const char *name,
                           int flags, ulong mark);
 
-/*
+/**
  * Mark a time stamp for the current boot stage.
  */
 ulong bootstage_mark(enum bootstage_id id);
@@ -310,7 +310,7 @@ void bootstage_report(void);
  */
 int bootstage_fdt_add_report(void);
 
-/*
+/**
  * Stash bootstage data into memory
  *
  * @param base Base address of memory buffer