diff options
author | Naoki Hayama <naoki.hayama@lineo.co.jp> | 2020-10-07 05:22:24 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-22 16:54:52 +0300 |
commit | 898a0849536381c6a1fb8d6d8ff7d46d9f6769eb (patch) | |
tree | 31791683cae1bd05489e873747fa9ea45a030982 /common/image.c | |
parent | ad5fb9f2e66e605941f78791f552c6bf6e522a9d (diff) | |
download | u-boot-898a0849536381c6a1fb8d6d8ff7d46d9f6769eb.tar.xz |
cosmetic: image: Fix comments and the order of definitions
Fix some comments about functions.
Move genimg_get_comp_name() above genimg_get_short_name() because
genimg_get_comp_name() is related to get_table_entry_name().
Signed-off-by: Naoki Hayama <naoki.hayama@lineo.co.jp>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image.c')
-rw-r--r-- | common/image.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/image.c b/common/image.c index 4fc4a0f1c4..451fc689a8 100644 --- a/common/image.c +++ b/common/image.c @@ -801,14 +801,14 @@ static const char *unknown_msg(enum ih_category category) } /** - * get_cat_table_entry_name - translate entry id to long name + * genimg_get_cat_name - translate entry id to long name * @category: category to look up (enum ih_category) * @id: entry id to be translated * * This will scan the translation table trying to find the entry that matches * the given id. * - * @retur long entry name if translation succeeds; error string on failure + * @return long entry name if translation succeeds; error string on failure */ const char *genimg_get_cat_name(enum ih_category category, uint id) { @@ -825,14 +825,14 @@ const char *genimg_get_cat_name(enum ih_category category, uint id) } /** - * get_cat_table_entry_short_name - translate entry id to short name + * genimg_get_cat_short_name - translate entry id to short name * @category: category to look up (enum ih_category) * @id: entry id to be translated * * This will scan the translation table trying to find the entry that matches * the given id. * - * @retur short entry name if translation succeeds; error string on failure + * @return short entry name if translation succeeds; error string on failure */ const char *genimg_get_cat_short_name(enum ih_category category, uint id) { @@ -918,6 +918,12 @@ const char *genimg_get_type_name(uint8_t type) return (get_table_entry_name(uimage_type, "Unknown Image", type)); } +const char *genimg_get_comp_name(uint8_t comp) +{ + return (get_table_entry_name(uimage_comp, "Unknown Compression", + comp)); +} + static const char *genimg_get_short_name(const table_entry_t *table, int val) { table = get_table_entry(table, val); @@ -935,12 +941,6 @@ const char *genimg_get_type_short_name(uint8_t type) return genimg_get_short_name(uimage_type, type); } -const char *genimg_get_comp_name(uint8_t comp) -{ - return (get_table_entry_name(uimage_comp, "Unknown Compression", - comp)); -} - const char *genimg_get_comp_short_name(uint8_t comp) { return genimg_get_short_name(uimage_comp, comp); |