From 6a0dbba62b01791064f74555913723cb63c403d0 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 31 Jan 2022 17:39:18 +0800 Subject: [PATCH] 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 --- 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 6399b47b21d..9d1e24426bb 100644 --- a/drivers/syslog/syslog_rpmsg.c +++ b/drivers/syslog/syslog_rpmsg.c @@ -34,12 +34,9 @@ #include #include -#include #include #include -#include -#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 d57c5c45fef..2567262992d 100644 --- a/drivers/syslog/syslog_rpmsg_server.c +++ b/drivers/syslog/syslog_rpmsg_server.c @@ -28,7 +28,6 @@ #include #include -#include #include #include "syslog.h" diff --git a/include/nuttx/syslog/syslog_rpmsg.h b/include/nuttx/syslog/syslog_rpmsg.h index ef16a74ccac..f266d0a09b3 100644 --- a/include/nuttx/syslog/syslog_rpmsg.h +++ b/include/nuttx/syslog/syslog_rpmsg.h @@ -26,6 +26,7 @@ ****************************************************************************/ #include +#include /**************************************************************************** * Public Function Prototypes