You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/01/31 12:42:02 UTC

[incubator-nuttx] branch master updated: syslog: Include nuttx/syslog/syslog.h in include/nuttx/syslog/syslog_rpmsg.h

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a0dbba  syslog: Include nuttx/syslog/syslog.h in include/nuttx/syslog/syslog_rpmsg.h
6a0dbba is described below

commit 6a0dbba62b01791064f74555913723cb63c403d0
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Jan 31 17:39:18 2022 +0800

    syslog: Include nuttx/syslog/syslog.h in include/nuttx/syslog/syslog_rpmsg.h
    
    to avoid struct syslog_channel_s used before definition
    and remove the unnecessary inclusion
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/syslog/syslog_rpmsg.c        | 9 ---------
 drivers/syslog/syslog_rpmsg_server.c | 1 -
 include/nuttx/syslog/syslog_rpmsg.h  | 1 +
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/syslog/syslog_rpmsg.c b/drivers/syslog/syslog_rpmsg.c
index 6399b47..9d1e244 100644
--- a/drivers/syslog/syslog_rpmsg.c
+++ b/drivers/syslog/syslog_rpmsg.c
@@ -34,12 +34,9 @@
 
 #include <nuttx/irq.h>
 #include <nuttx/rptun/openamp.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_rpmsg.h>
 #include <nuttx/wqueue.h>
-#include <nuttx/compiler.h>
 
-#include "syslog.h"
 #include "syslog_rpmsg.h"
 
 /****************************************************************************
@@ -327,8 +324,6 @@ int syslog_rpmsg_putc(FAR struct syslog_channel_s *channel, int ch)
   FAR struct syslog_rpmsg_s *priv = &g_syslog_rpmsg;
   irqstate_t flags;
 
-  UNUSED(channel);
-
   flags = enter_critical_section();
   syslog_rpmsg_putchar(priv, ch, true);
   leave_critical_section(flags);
@@ -342,8 +337,6 @@ int syslog_rpmsg_flush(FAR struct syslog_channel_s *channel)
   FAR struct syslog_rpmsg_s *priv = &g_syslog_rpmsg;
   irqstate_t flags;
 
-  UNUSED(channel);
-
   flags = enter_critical_section();
 
   if (priv->head - priv->flush > priv->size)
@@ -369,8 +362,6 @@ ssize_t syslog_rpmsg_write(FAR struct syslog_channel_s *channel,
   irqstate_t flags;
   size_t nwritten;
 
-  UNUSED(channel);
-
   flags = enter_critical_section();
   for (nwritten = 1; nwritten <= buflen; nwritten++)
     {
diff --git a/drivers/syslog/syslog_rpmsg_server.c b/drivers/syslog/syslog_rpmsg_server.c
index d57c5c4..2567262 100644
--- a/drivers/syslog/syslog_rpmsg_server.c
+++ b/drivers/syslog/syslog_rpmsg_server.c
@@ -28,7 +28,6 @@
 
 #include <nuttx/kmalloc.h>
 #include <nuttx/rptun/openamp.h>
-#include <nuttx/syslog/syslog.h>
 #include <nuttx/syslog/syslog_rpmsg.h>
 
 #include "syslog.h"
diff --git a/include/nuttx/syslog/syslog_rpmsg.h b/include/nuttx/syslog/syslog_rpmsg.h
index ef16a74..f266d0a 100644
--- a/include/nuttx/syslog/syslog_rpmsg.h
+++ b/include/nuttx/syslog/syslog_rpmsg.h
@@ -26,6 +26,7 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <nuttx/syslog/syslog.h>
 
 /****************************************************************************
  * Public Function Prototypes