[PATCH v2 05/45] log: update the comment for log_msg_ret()

Simon Glass sjg at chromium.org
Wed Sep 7 04:26:53 CEST 2022


Add some advice on string size here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 include/log.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/log.h b/include/log.h
index df497bad181..8a7b961bbfb 100644
--- a/include/log.h
+++ b/include/log.h
@@ -322,7 +322,10 @@ void __assert_fail(const char *assertion, const char *file, unsigned int line,
  *
  * or:
  *
- *	return log_msg_ret("fred failed", fred_call());
+ *	return log_msg_ret("get", fred_call());
+ *
+ * It is recommended to use <= 3 characters for the name since this will only
+ * use 4 bytes in rodata
  */
 #define log_ret(_ret) ({ \
 	int __ret = (_ret); \
-- 
2.37.2.789.g6183377224-goog



More information about the U-Boot mailing list