xiaoxiang781216 commented on code in PR #6414:
URL: https://github.com/apache/incubator-nuttx/pull/6414#discussion_r895593423


##########
drivers/syslog/syslog_device.c:
##########
@@ -120,6 +123,63 @@ static const uint8_t g_syscrlf[2] =
  * Private Functions
  ****************************************************************************/
 
+/****************************************************************************
+ * Name: syslog_dev_takesem
+ ****************************************************************************/
+
+static inline int syslog_dev_takesem(FAR struct syslog_dev_s *syslog_dev)

Review Comment:
   it's better to add new function to check whether the caller already hold the 
lock and then return the error directly. Since syslog_device.c is part of 
kernel, it isn't good to dup the same logic again.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to