* [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions
@ 2020-10-07 2:22 Naoki Hayama
2020-10-12 3:34 ` Simon Glass
2020-10-23 0:27 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Naoki Hayama @ 2020-10-07 2:22 UTC (permalink / raw)
To: u-boot
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>
---
common/image.c | 20 ++++++++++----------
include/image.h | 1 +
2 files changed, 11 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);
diff --git a/include/image.h b/include/image.h
index 6222057f27..c91f0512f3 100644
--- a/include/image.h
+++ b/include/image.h
@@ -563,6 +563,7 @@ int genimg_get_cat_count(enum ih_category category);
/**
* genimg_get_cat_desc() - Get the description of a category
*
+ * @category: Category to check
* @return the description of a category, e.g. "architecture". This
* effectively converts the enum to a string.
*/
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions
2020-10-07 2:22 [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions Naoki Hayama
@ 2020-10-12 3:34 ` Simon Glass
2020-10-23 0:27 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-10-12 3:34 UTC (permalink / raw)
To: u-boot
On Tue, 6 Oct 2020 at 20:22, Naoki Hayama <naoki.hayama@lineo.co.jp> wrote:
>
> 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>
> ---
>
> common/image.c | 20 ++++++++++----------
> include/image.h | 1 +
> 2 files changed, 11 insertions(+), 10 deletions(-)
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions
2020-10-07 2:22 [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions Naoki Hayama
2020-10-12 3:34 ` Simon Glass
@ 2020-10-23 0:27 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-10-23 0:27 UTC (permalink / raw)
To: u-boot
On Wed, Oct 07, 2020 at 11:22:24AM +0900, Naoki Hayama wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201022/afda96eb/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-23 0:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-07 2:22 [PATCH 3/3] cosmetic: image: Fix comments and the order of definitions Naoki Hayama
2020-10-12 3:34 ` Simon Glass
2020-10-23 0:27 ` Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.