drivers: nxstyle fixes

nxstyle fixes to pass the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea
2021-03-04 18:32:27 -08:00
committed by Xiang Xiao
parent e5b6305f4a
commit ccff570e6f
76 changed files with 3180 additions and 2463 deletions
+7 -7
View File
@@ -50,15 +50,15 @@ static ssize_t syslog_chardev_write(FAR struct file *filep,
static const struct file_operations syslog_fops =
{
NULL, /* open */
NULL, /* close */
NULL, /* read */
NULL, /* open */
NULL, /* close */
NULL, /* read */
syslog_chardev_write, /* write */
NULL, /* seek */
NULL, /* ioctl */
NULL /* poll */
NULL, /* seek */
NULL, /* ioctl */
NULL /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
, NULL /* unlink */
#endif
};
+4 -3
View File
@@ -244,8 +244,8 @@ static int syslog_dev_outputready(void)
{
/* Try again to initialize the device. We may do this repeatedly
* because the log device might be something that was not ready
* the first time that syslog_dev_initialize() was called (such as a
* USB serial device that has not yet been connected or a file in
* the first time that syslog_dev_initialize() was called (such as
* a USB serial device that has not yet been connected or a file in
* an NFS mounted file system that has not yet been mounted).
*/
@@ -515,7 +515,8 @@ ssize_t syslog_dev_write(FAR const char *buffer, size_t buflen)
writelen = (size_t)((uintptr_t)endptr - (uintptr_t)buffer);
if (writelen > 0)
{
nwritten = file_write(&g_syslog_dev.sl_file, buffer, writelen);
nwritten = file_write(&g_syslog_dev.sl_file,
buffer, writelen);
if (nwritten < 0)
{
ret = (int)nwritten;
+2 -1
View File
@@ -55,7 +55,8 @@
int syslog_force(int ch)
{
DEBUGASSERT(g_syslog_channel != NULL && g_syslog_channel->sc_force != NULL);
DEBUGASSERT(g_syslog_channel != NULL &&
g_syslog_channel->sc_force != NULL);
#ifdef CONFIG_SYSLOG_INTBUFFER
/* Flush any characters that may have been added to the interrupt
+11 -9
View File
@@ -43,7 +43,8 @@
/* Extend the size of the interrupt buffer so that a "[truncated]\n"
* indication can be append to the end.
*
* The usable capacity of the interrupt buffer is (CONFIG_SYSLOG_INTBUFSIZE - 1).
* The usable capacity of the interrupt buffer is
* (CONFIG_SYSLOG_INTBUFSIZE - 1).
*/
#define SYSLOG_BUFOVERRUN_MESSAGE "[truncated]\n"
@@ -78,7 +79,8 @@ struct g_syslog_intbuffer_s
****************************************************************************/
static struct g_syslog_intbuffer_s g_syslog_intbuffer;
static const char g_overrun_msg[SYSLOG_BUFOVERRUN_SIZE] = SYSLOG_BUFOVERRUN_MESSAGE;
static const char g_overrun_msg[SYSLOG_BUFOVERRUN_SIZE] =
SYSLOG_BUFOVERRUN_MESSAGE;
/****************************************************************************
* Private Data
@@ -227,16 +229,16 @@ int syslog_add_intbuffer(int ch)
}
else if (inuse < USABLE_INTBUFSIZE)
{
/* Copy one character */
/* Copy one character */
g_syslog_intbuffer.si_buffer[inndx] = (uint8_t)ch;
g_syslog_intbuffer.si_buffer[inndx] = (uint8_t)ch;
/* Increment the IN index, handling wrap-around */
/* Increment the IN index, handling wrap-around */
if (++inndx >= SYSLOG_INTBUFSIZE)
{
inndx -= SYSLOG_INTBUFSIZE;
}
if (++inndx >= SYSLOG_INTBUFSIZE)
{
inndx -= SYSLOG_INTBUFSIZE;
}
g_syslog_intbuffer.si_inndx = (uint16_t)inndx;
ret = OK;
+5 -3
View File
@@ -64,8 +64,9 @@ int syslog_putc(int ch)
#if defined(CONFIG_SYSLOG_INTBUFFER)
if (up_interrupt_context())
{
/* Buffer the character in the interrupt buffer. The interrupt buffer
* will be flushed before the next normal, non-interrupt SYSLOG output.
/* Buffer the character in the interrupt buffer.
* The interrupt buffer will be flushed before the next normal,
* non-interrupt SYSLOG output.
*/
return syslog_add_intbuffer(ch);
@@ -73,7 +74,8 @@ int syslog_putc(int ch)
else
#endif
{
/* Force the character to the SYSLOG device immediately (if possible).
/* Force the character to the SYSLOG device immediately
* (if possible).
* This means that the interrupt data may not be in synchronization
* with output data that may have been buffered by sc_putc().
*/
+2 -1
View File
@@ -84,7 +84,8 @@ static int syslogstream_flush(FAR struct lib_syslogstream_s *stream)
****************************************************************************/
#ifdef CONFIG_SYSLOG_BUFFER
static void syslogstream_addchar(FAR struct lib_syslogstream_s *stream, int ch)
static void syslogstream_addchar(FAR struct lib_syslogstream_s *stream,
int ch)
{
FAR struct iob_s *iob = stream->iob;