diff mbox series

[U-Boot,41/45] sysreset: Tidy up a few comments and logging

Message ID 20181001182249.129565-42-sjg@chromium.org
State Accepted
Commit eb517315a67320e770cf4a100a922e8ae18fa54e
Delegated to: Simon Glass
Headers show
Series Various fixes and improvements | expand

Commit Message

Simon Glass Oct. 1, 2018, 6:22 p.m. UTC
Some comments are incorrect or missing pieces. Fix these and use logging
to print the error.

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

 drivers/sysreset/sysreset-uclass.c | 4 +++-
 include/sysreset.h                 | 4 +++-
 test/dm/sysreset.c                 | 1 -
 3 files changed, 6 insertions(+), 3 deletions(-)

Comments

Simon Glass Oct. 9, 2018, 11:54 p.m. UTC | #1
Some comments are incorrect or missing pieces. Fix these and use logging
to print the error.

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

 drivers/sysreset/sysreset-uclass.c | 4 +++-
 include/sysreset.h                 | 4 +++-
 test/dm/sysreset.c                 | 1 -
 3 files changed, 6 insertions(+), 3 deletions(-)

Applied to u-boot-dm
diff mbox series

Patch

diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
index 06ef0ed96c7..e38814b3ed1 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -4,6 +4,8 @@ 
  * Written by Simon Glass <sjg@chromium.org>
  */
 
+#define LOG_CATEGORY UCLASS_SYSRESET
+
 #include <common.h>
 #include <sysreset.h>
 #include <dm.h>
@@ -64,7 +66,7 @@  void sysreset_walk_halt(enum sysreset_t type)
 		mdelay(100);
 
 	/* Still no reset? Give up */
-	debug("System reset not supported on this platform\n");
+	log_err("System reset not supported on this platform\n");
 	hang();
 }
 
diff --git a/include/sysreset.h b/include/sysreset.h
index a5c0b74a473..343e46f1aa5 100644
--- a/include/sysreset.h
+++ b/include/sysreset.h
@@ -31,6 +31,7 @@  struct sysreset_ops {
 	/**
 	 * get_status() - get printable reset status information
 	 *
+	 * @dev:	Device to check
 	 * @buf:	Buffer to receive the textual reset information
 	 * @size:	Size of the passed buffer
 	 * @return 0 if OK, -ve on error
@@ -49,8 +50,9 @@  struct sysreset_ops {
 int sysreset_request(struct udevice *dev, enum sysreset_t type);
 
 /**
- * get_status() - get printable reset status information
+ * sysreset_get_status() - get printable reset status information
  *
+ * @dev:	Device to check
  * @buf:	Buffer to receive the textual reset information
  * @size:	Size of the passed buffer
  * @return 0 if OK, -ve on error
diff --git a/test/dm/sysreset.c b/test/dm/sysreset.c
index 04d4621d9e1..218cc239cc6 100644
--- a/test/dm/sysreset.c
+++ b/test/dm/sysreset.c
@@ -62,7 +62,6 @@  static int dm_test_sysreset_get_status(struct unit_test_state *uts)
 
 	return 0;
 }
-
 DM_TEST(dm_test_sysreset_get_status, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
 
 /* Test that we can walk through the sysreset devices */