diff --git a/arch b/arch index 0c8200c21f7..cc863e71f9f 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit 0c8200c21f76a67e621d364b51e73bda4f6ba28c +Subproject commit cc863e71f9fdf2b418365ff58ec2103dc1abbfcd diff --git a/binfmt/binfmt_exepath.c b/binfmt/binfmt_exepath.c index 1e05d55f3bc..3caf02e40d6 100644 --- a/binfmt/binfmt_exepath.c +++ b/binfmt/binfmt_exepath.c @@ -142,7 +142,7 @@ EXEPATH_HANDLE exepath_init(void) return (EXEPATH_HANDLE)exepath; } - /**************************************************************************** +/**************************************************************************** * Name: exepath_next * * Description: diff --git a/binfmt/symtab_findorderedbyname.c b/binfmt/symtab_findorderedbyname.c index e058bd770c8..27714001941 100644 --- a/binfmt/symtab_findorderedbyname.c +++ b/binfmt/symtab_findorderedbyname.c @@ -129,13 +129,13 @@ symtab_findorderedbyname(FAR const struct symtab_s *symtab, } } - /* low == high... One final check. We might not have actually tested - * the final symtab[] name. - * - * Example: Only the last pass through loop, suppose low = 1, high = 2, - * mid = 1, and symtab[high].sym_name == name. Then we would get here with - * low = 2, high = 2, but symtab[2].sym_name was never tested. - */ + /* low == high... One final check. We might not have actually tested + * the final symtab[] name. + * + * Example: Only the last pass through loop, suppose low = 1, high = 2, + * mid = 1, and symtab[high].sym_name == name. Then we would get here with + * low = 2, high = 2, but symtab[2].sym_name was never tested. + */ return strcmp(name, symtab[low].sym_name) == 0 ? &symtab[low] : NULL; } diff --git a/binfmt/symtab_findorderedbyvalue.c b/binfmt/symtab_findorderedbyvalue.c index 7af0d6a218c..7b2c76e748c 100644 --- a/binfmt/symtab_findorderedbyvalue.c +++ b/binfmt/symtab_findorderedbyvalue.c @@ -114,13 +114,13 @@ symtab_findorderedbyvalue(FAR const struct symtab_s *symtab, } } - /* low == high... One final check. We might not have actually tested - * the final symtab[] name. - * - * Example: Only the last pass through loop, suppose low = 1, high = 2, - * mid = 1, and symtab[high].sym_name == name. Then we would get here with - * low = 2, high = 2, but symtab[2].sym_name was never tested. - */ + /* low == high... One final check. We might not have actually tested + * the final symtab[] name. + * + * Example: Only the last pass through loop, suppose low = 1, high = 2, + * mid = 1, and symtab[high].sym_name == name. Then we would get here with + * low = 2, high = 2, but symtab[2].sym_name was never tested. + */ return value == symtab[low].sym_value ? &symtab[low] : NULL; } diff --git a/configs b/configs index 87c0e8d6124..dbc09272e2e 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 87c0e8d6124f7e0ec849e5430534eedd9495aba9 +Subproject commit dbc09272e2e97c118372075d47281a563dc61db1 diff --git a/drivers/analog/dac.c b/drivers/analog/dac.c index 515fc268424..c4cd10a6afe 100644 --- a/drivers/analog/dac.c +++ b/drivers/analog/dac.c @@ -426,14 +426,14 @@ static ssize_t dac_write(FAR struct file *filep, FAR const char *buffer, size_t nsent += msglen; } - /* We get here after all messages have been added to the FIFO. Check if - * we need to kick of the XMIT sequence. - */ + /* We get here after all messages have been added to the FIFO. Check if + * we need to kick of the XMIT sequence. + */ - if (empty) - { - dac_xmit(dev); - } + if (empty) + { + dac_xmit(dev); + } /* Return the number of bytes that were sent */ diff --git a/drivers/can.c b/drivers/can.c index f37557205bd..3e836ff5c51 100644 --- a/drivers/can.c +++ b/drivers/can.c @@ -698,14 +698,14 @@ static ssize_t can_write(FAR struct file *filep, FAR const char *buffer, nsent += msglen; } - /* We get here after all messages have been added to the FIFO. Check if - * we need to kick of the XMIT sequence. - */ + /* We get here after all messages have been added to the FIFO. Check if + * we need to kick of the XMIT sequence. + */ - if (inactive) - { - can_xmit(dev); - } + if (inactive) + { + can_xmit(dev); + } /* Return the number of bytes that were sent */ diff --git a/drivers/lcd/mio283qt2.c b/drivers/lcd/mio283qt2.c index 6b87c670e52..5e68c953ef5 100644 --- a/drivers/lcd/mio283qt2.c +++ b/drivers/lcd/mio283qt2.c @@ -937,7 +937,7 @@ static inline int mio283qt2_hwinitialize(FAR struct mio283qt2_dev_s *priv) return ret; } - /************************************************************************************* +/************************************************************************************** * Public Functions **************************************************************************************/ diff --git a/drivers/lcd/mio283qt9a.c b/drivers/lcd/mio283qt9a.c index 8ec36a3abdc..2a17fe763ee 100644 --- a/drivers/lcd/mio283qt9a.c +++ b/drivers/lcd/mio283qt9a.c @@ -833,7 +833,7 @@ static inline int mio283qt9a_hwinitialize(FAR struct mio283qt9a_dev_s *priv) return ret; } - /************************************************************************************* +/************************************************************************************** * Public Functions **************************************************************************************/ diff --git a/drivers/lcd/p14201.c b/drivers/lcd/p14201.c index dbd69a271d4..26ded62a283 100644 --- a/drivers/lcd/p14201.c +++ b/drivers/lcd/p14201.c @@ -405,7 +405,7 @@ static const uint8_t g_sleepon[] = static const uint8_t g_horzinc[] = { SSD1329_GDDRAM_REMAP, - (SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP), + (SSD1329_COM_SPLIT|SSD1329_COM_REMAP|SSD1329_NIBBLE_REMAP), }; /* The following set a window that covers the entire display */ diff --git a/drivers/lcd/ra8875.c b/drivers/lcd/ra8875.c index 53fb9736192..cef1157a799 100644 --- a/drivers/lcd/ra8875.c +++ b/drivers/lcd/ra8875.c @@ -1079,7 +1079,7 @@ static inline int ra8875_hwinitialize(FAR struct ra8875_dev_s *priv) return OK; } - /************************************************************************************* +/************************************************************************************** * Public Functions **************************************************************************************/ diff --git a/drivers/lcd/ssd1289.c b/drivers/lcd/ssd1289.c index bcc33483244..8385101191b 100644 --- a/drivers/lcd/ssd1289.c +++ b/drivers/lcd/ssd1289.c @@ -1284,7 +1284,7 @@ static inline int ssd1289_hwinitialize(FAR struct ssd1289_dev_s *priv) return ret; } - /************************************************************************************* +/************************************************************************************** * Public Functions **************************************************************************************/ diff --git a/drivers/lcd/st7567.c b/drivers/lcd/st7567.c index f138e14794d..9e8405c64bb 100644 --- a/drivers/lcd/st7567.c +++ b/drivers/lcd/st7567.c @@ -232,10 +232,10 @@ struct st7567_dev_s uint8_t contrast; uint8_t powered; - /* The ST7567 does not support reading from the display memory in SPI mode. - * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep - * a shadow copy of the framebuffer memory. - */ + /* The ST7567 does not support reading from the display memory in SPI mode. + * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep + * a shadow copy of the framebuffer memory. + */ uint8_t fb[ST7567_FBSIZE]; }; diff --git a/drivers/lcd/ug-2864ambag01.c b/drivers/lcd/ug-2864ambag01.c index 6b8e081b249..7987c3b7c89 100644 --- a/drivers/lcd/ug-2864ambag01.c +++ b/drivers/lcd/ug-2864ambag01.c @@ -287,10 +287,10 @@ struct ug2864ambag01_dev_s bool on; /* true: display is on */ - /* The SH1101A does not support reading from the display memory in SPI mode. - * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep - * a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB. - */ + /* The SH1101A does not support reading from the display memory in SPI mode. + * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep + * a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB. + */ uint8_t fb[UG2864AMBAG01_FBSIZE]; }; diff --git a/drivers/lcd/ug-9664hswag01.c b/drivers/lcd/ug-9664hswag01.c index c649e26ca17..107703a53a1 100644 --- a/drivers/lcd/ug-9664hswag01.c +++ b/drivers/lcd/ug-9664hswag01.c @@ -247,10 +247,10 @@ struct ug_dev_s uint8_t contrast; uint8_t powered; - /* The SSD1305 does not support reading from the display memory in SPI mode. - * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep - * a shadow copy of the framebuffer memory. - */ + /* The SSD1305 does not support reading from the display memory in SPI mode. + * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep + * a shadow copy of the framebuffer memory. + */ uint8_t fb[UG_FBSIZE]; }; diff --git a/drivers/mtd/at45db.c b/drivers/mtd/at45db.c index c9095172a2b..2c8689ab214 100644 --- a/drivers/mtd/at45db.c +++ b/drivers/mtd/at45db.c @@ -640,7 +640,7 @@ static ssize_t at45db_bread(FAR struct mtd_dev_s *mtd, off_t startblock, FAR struct at45db_dev_s *priv = (FAR struct at45db_dev_s *)mtd; ssize_t nbytes; - /* On this device, we can handle the block read just like the byte-oriented read */ + /* On this device, we can handle the block read just like the byte-oriented read */ nbytes = at45db_read(mtd, startblock << priv->pageshift, nblocks << priv->pageshift, buffer); diff --git a/drivers/mtd/mtd_nand.c b/drivers/mtd/mtd_nand.c index 3c333dd4772..2261725d26f 100644 --- a/drivers/mtd/mtd_nand.c +++ b/drivers/mtd/mtd_nand.c @@ -540,7 +540,7 @@ static int nand_writepage(FAR struct nand_dev_s *nand, off_t block, * ECC calculations. */ - else + else #endif { return NAND_WRITEPAGE(nand->raw, block, page, data, NULL); diff --git a/drivers/mtd/mtd_onfi.c b/drivers/mtd/mtd_onfi.c index 5f9781b295b..62b955a81c2 100644 --- a/drivers/mtd/mtd_onfi.c +++ b/drivers/mtd/mtd_onfi.c @@ -88,7 +88,7 @@ #define EBICSA_EBI_DBPDC (1 << 9) #define EBICSA_NAND_D0_ON_D16 (1 << 24) - /* Misc. definitions */ +/* Misc. definitions */ #define MAX_READ_STATUS_COUNT 100000 /* Read status timeout */ #define ONFI_PARAM_TABLE_SIZE 116 /* Not all 256 bytes are useful */ diff --git a/drivers/mtd/st25fl1.c b/drivers/mtd/st25fl1.c index 4265fda326c..2eaf4221d17 100644 --- a/drivers/mtd/st25fl1.c +++ b/drivers/mtd/st25fl1.c @@ -644,9 +644,9 @@ static inline int st25fl1_readid(struct st25fl1_dev_s *priv) default: fdbg("ERROR: Unsupported memory capacity: %02x\n", priv->cmdbuf[2]); return -ENODEV; - } + } - return OK; + return OK; } /************************************************************************************ diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index d9f3644a436..ae2884ed986 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -1257,16 +1257,16 @@ static int dm9x_interrupt(int irq, FAR void *context) ndbg("delay: %dmS speed: %s\n", i, dm9x->dm_b100M ? "100M" : "10M"); } - /* Check if we received an incoming packet */ + /* Check if we received an incoming packet */ - if (isr & DM9X_INT_PR) + if (isr & DM9X_INT_PR) { dm9x_receive(dm9x); } - /* Check if we are able to transmit a packet */ + /* Check if we are able to transmit a packet */ - if (isr & DM9X_INT_PT) + if (isr & DM9X_INT_PT) { dm9x_txdone(dm9x); } diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 34bffa07c75..3d0c43e94dc 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -1615,7 +1615,7 @@ static void enc_pktif(FAR struct enc_driver_s *priv) enc_wrbreg(priv, ENC_ERXRDPTL, (priv->nextpkt)); enc_wrbreg(priv, ENC_ERXRDPTH, (priv->nextpkt) >> 8); - /* Decrement the packet counter indicate we are done with this packet */ + /* Decrement the packet counter indicate we are done with this packet */ enc_bfsgreg(priv, ENC_ECON2, ECON2_PKTDEC); } diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index aa50d035afc..7e50890208e 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -561,9 +561,9 @@ int localhost_initialize(void) #endif #ifdef CONFIG_NET_IPv6 - net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr); - net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr); - net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr); + net_ipv6addr_copy(priv->lo_dev.d_ipv6addr, g_lo_ipv6addr); + net_ipv6addr_copy(priv->lo_dev.d_ipv6draddr, g_lo_ipv6addr); + net_ipv6addr_copy(priv->lo_dev.d_ipv6netmask, g_ipv6_alloneaddr); #endif /* Put the network in the UP state */ diff --git a/drivers/net/slip.c b/drivers/net/slip.c index bbabc1527e8..203f9f70906 100644 --- a/drivers/net/slip.c +++ b/drivers/net/slip.c @@ -183,9 +183,9 @@ struct slip_driver_s * Private Data ****************************************************************************/ - /* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead, - * kmm_malloc() new interface instances as needed. - */ +/* We really should get rid of CONFIG_NET_SLIP_NINTERFACES and, instead, + * kmm_malloc() new interface instances as needed. + */ static struct slip_driver_s g_slip[CONFIG_NET_SLIP_NINTERFACES]; diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index c077ea537fe..bfe043ebf4d 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -161,7 +161,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, pollevent_t events FAR struct pipe_dev_s *pipecommon_allocdev(void) { - struct pipe_dev_s *dev; + FAR struct pipe_dev_s *dev; /* Allocate a private structure to manage the pipe */ diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index b07f655466d..560aa7af22f 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -792,7 +792,7 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen nbuffered = rxbuf->size - rxbuf->tail + rxbuf->head; } - /* Is the level now below the watermark level that we need to report? */ + /* Is the level now below the watermark level that we need to report? */ watermark = (CONFIG_SERIAL_IFLOWCONTROL_LOWER_WATERMARK * rxbuf->size) / 100; if (nbuffered <= watermark) @@ -1170,7 +1170,7 @@ static int uart_close(FAR struct file *filep) uart_givesem(&dev->closesem); return OK; - } +} /************************************************************************************ * Name: uart_open @@ -1443,6 +1443,3 @@ void uart_connected(FAR uart_dev_t *dev, bool connected) irqrestore(flags); } #endif - - - diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index ffa7f7a4c9d..adc193deeb4 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -708,10 +708,10 @@ static int u16550_attach(struct uart_dev_s *dev) * ****************************************************************************/ -static void u16550_detach(struct uart_dev_s *dev) +static void u16550_detach(FAR struct uart_dev_s *dev) { #ifndef CONFIG_SUPPRESS_SERIAL_INTS - struct u16550_s *priv = (struct u16550_s*)dev->priv; + FAR struct u16550_s *priv = (struct u16550_s*)dev->priv; #ifndef CONFIG_ARCH_NOINTC up_disable_irq(priv->irq); #endif diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index bc88eac5bef..fae90a75adf 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c @@ -49,7 +49,7 @@ #ifdef CONFIG_SPI_BITBANG - /**************************************************************************** +/**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* This file holds the static, device-independ portion of the generica SPI- diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index fde47c1c627..a06bdcbdd3d 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -426,14 +426,14 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size DEBUGASSERT(inode && inode->i_private); priv = inode->i_private; - /* Loop until all of the bytes have been written. This function may be - * called from an interrupt handler! Semaphores cannot be used! - * - * The write logic only needs to modify the rl_head index. Therefore, - * there is a difference in the way that rl_head and rl_tail are protected: - * rl_tail is protected with a semaphore; rl_tail is protected by disabling - * interrupts. - */ + /* Loop until all of the bytes have been written. This function may be + * called from an interrupt handler! Semaphores cannot be used! + * + * The write logic only needs to modify the rl_head index. Therefore, + * there is a difference in the way that rl_head and rl_tail are protected: + * rl_tail is protected with a semaphore; rl_tail is protected by disabling + * interrupts. + */ for (nwritten = 0; nwritten < len; nwritten++) { diff --git a/drivers/timers/cs2100-cp.c b/drivers/timers/cs2100-cp.c index 65530678a1c..2fb4f29f92a 100644 --- a/drivers/timers/cs2100-cp.c +++ b/drivers/timers/cs2100-cp.c @@ -199,7 +199,7 @@ static int cs2100_read_reg(FAR const struct cs2100_config_s *config, } } - return ret; + return ret; } #endif diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 564fbf62299..43cc4658154 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -2202,7 +2202,7 @@ static void cdcuart_txint(FAR struct uart_dev_s *dev, bool enable) } #endif - /* Extract references to private data */ + /* Extract references to private data */ priv = (FAR struct cdcacm_dev_s*)dev->priv; diff --git a/drivers/usbdev/composite.c b/drivers/usbdev/composite.c index 0fc6a52a0c7..e23f3c20f6d 100644 --- a/drivers/usbdev/composite.c +++ b/drivers/usbdev/composite.c @@ -146,7 +146,7 @@ const char g_compvendorstr[] = CONFIG_COMPOSITE_VENDORSTR; const char g_compproductstr[] = CONFIG_COMPOSITE_PRODUCTSTR; const char g_compserialstr[] = CONFIG_COMPOSITE_SERIALSTR; - /**************************************************************************** +/**************************************************************************** * Private Functions ****************************************************************************/ /**************************************************************************** diff --git a/drivers/usbdev/pl2303.c b/drivers/usbdev/pl2303.c index 526322cbb49..b978dfb3492 100644 --- a/drivers/usbdev/pl2303.c +++ b/drivers/usbdev/pl2303.c @@ -2218,7 +2218,7 @@ static void usbser_txint(FAR struct uart_dev_s *dev, bool enable) } #endif - /* Extract references to private data */ + /* Extract references to private data */ priv = (FAR struct pl2303_dev_s*)dev->priv; diff --git a/drivers/usbdev/usbmsc_desc.c b/drivers/usbdev/usbmsc_desc.c index e958392f4ef..1a97da82243 100644 --- a/drivers/usbdev/usbmsc_desc.c +++ b/drivers/usbdev/usbmsc_desc.c @@ -260,7 +260,7 @@ int usbmsc_mkstrdesc(uint8_t id, struct usb_strdesc_s *strdesc) return 4; } - case USBMSC_MANUFACTURERSTRID: + case USBMSC_MANUFACTURERSTRID: str = g_mscvendorstr; break; diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index f390289e04a..d7a49fd6710 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -1712,7 +1712,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val) static inline uint32_t usbhost_getle32(const uint8_t *val) { - /* Little endian means LS halfword first in byte stream */ + /* Little endian means LS halfword first in byte stream */ return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val); } diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index 62c659a5b15..0befef80afe 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -1783,7 +1783,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val) static inline uint32_t usbhost_getle32(const uint8_t *val) { - /* Little endian means LS halfword first in byte stream */ + /* Little endian means LS halfword first in byte stream */ return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val); } diff --git a/drivers/usbhost/usbhost_skeleton.c b/drivers/usbhost/usbhost_skeleton.c index 3c2879969a4..cb30aff9ec4 100644 --- a/drivers/usbhost/usbhost_skeleton.c +++ b/drivers/usbhost/usbhost_skeleton.c @@ -742,7 +742,7 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val) static inline uint32_t usbhost_getle32(const uint8_t *val) { - /* Little endian means LS halfword first in byte stream */ + /* Little endian means LS halfword first in byte stream */ return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val); } diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index baefebb5163..288ad99e5ec 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -1481,7 +1481,7 @@ static void usbhost_putbe16(uint8_t *dest, uint16_t val) static inline uint32_t usbhost_getle32(const uint8_t *val) { - /* Little endian means LS halfword first in byte stream */ + /* Little endian means LS halfword first in byte stream */ return (uint32_t)usbhost_getle16(&val[2]) << 16 | (uint32_t)usbhost_getle16(val); } diff --git a/fs/driver/fs_devsyslog.c b/fs/driver/fs_devsyslog.c index 526a9e0b289..991506fe0f9 100644 --- a/fs/driver/fs_devsyslog.c +++ b/fs/driver/fs_devsyslog.c @@ -61,10 +61,10 @@ * Pre-processor Definitions ****************************************************************************/ - /* Open the device/file write-only, try to create (file) it if it doesn't - * exist, if the file that already exists, then append the new log data to - * end of the file. - */ +/* Open the device/file write-only, try to create (file) it if it doesn't + * exist, if the file that already exists, then append the new log data to + * end of the file. + */ #define SYSLOG_OFLAGS (O_WRONLY | O_CREAT | O_APPEND) @@ -348,7 +348,7 @@ int syslog_initialize(void) g_sysdev.sl_state = SYSLOG_OPENED; return OK; - errout_with_inode: +errout_with_inode: inode_release(inode); g_sysdev.sl_state = SYSLOG_FAILURE; return ret; diff --git a/fs/fat/fs_fat32dirent.c b/fs/fat/fs_fat32dirent.c index 4a46ecab95d..9d349c94951 100644 --- a/fs/fat/fs_fat32dirent.c +++ b/fs/fat/fs_fat32dirent.c @@ -463,7 +463,7 @@ static inline int fat_parsesfname(const char **path, dirinfo->fd_name[ndx++] = ch; } - errout: +errout: return -EINVAL; } @@ -552,7 +552,7 @@ static inline int fat_parselfname(const char **path, dirinfo->fd_lfname[ndx++] = ch; } - errout: +errout: dirinfo->fd_lfname[0] = '\0'; return -EINVAL; } diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c index 07a31d2b893..3d700325824 100644 --- a/fs/fat/fs_fat32util.c +++ b/fs/fat/fs_fat32util.c @@ -683,11 +683,11 @@ int fat_mount(struct fat_mountpt_s *fs, bool writeable) return OK; - errout_with_buffer: +errout_with_buffer: fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize); fs->fs_buffer = 0; - errout: +errout: fs->fs_mounted = false; return ret; } diff --git a/fs/fat/fs_writefat.c b/fs/fat/fs_writefat.c index c784a35f6fd..51e71e278d4 100644 --- a/fs/fat/fs_writefat.c +++ b/fs/fat/fs_writefat.c @@ -333,7 +333,7 @@ static inline int mkfatfs_writembr(FAR struct fat_format_s *fmt, /* Write all of the reserved sectors */ memset(var->fv_sect, 0, var->fv_sectorsize); - for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++) + for (sectno = 1; sectno < fmt->ff_rsvdseccount && ret >= 0; sectno++) { ret = DEV_WRITE(var->fv_sect, sectno, 1); } diff --git a/fs/mount/fs_foreachmountpoint.c b/fs/mount/fs_foreachmountpoint.c index b3ab33abc7b..fece2702e58 100644 --- a/fs/mount/fs_foreachmountpoint.c +++ b/fs/mount/fs_foreachmountpoint.c @@ -142,7 +142,7 @@ static int mountpoint_filter(FAR struct inode *node, * Public Functions ****************************************************************************/ - /**************************************************************************** +/**************************************************************************** * Name: foreach_mountpoint * * Description: diff --git a/fs/mount/fs_mount.c b/fs/mount/fs_mount.c index 9c5e6d3fdff..2aa5fc6fafc 100644 --- a/fs/mount/fs_mount.c +++ b/fs/mount/fs_mount.c @@ -381,11 +381,11 @@ int mount(FAR const char *source, FAR const char *target, mountpt_inode->i_private = fshandle; inode_semgive(); - /* We can release our reference to the blkdrver_inode, if the filesystem - * wants to retain the blockdriver inode (which it should), then it must - * have called inode_addref(). There is one reference on mountpt_inode - * that will persist until umount2() is called. - */ + /* We can release our reference to the blkdrver_inode, if the filesystem + * wants to retain the blockdriver inode (which it should), then it must + * have called inode_addref(). There is one reference on mountpt_inode + * that will persist until umount2() is called. + */ #ifdef BDFS_SUPPORT #ifdef NONBDFS_SUPPORT diff --git a/fs/nxffs/nxffs_util.c b/fs/nxffs/nxffs_util.c index 12392aa585c..52354d33f94 100644 --- a/fs/nxffs/nxffs_util.c +++ b/fs/nxffs/nxffs_util.c @@ -121,7 +121,7 @@ void nxffs_wrle16(uint8_t *dest, uint16_t val) uint32_t nxffs_rdle32(FAR const uint8_t *val) { - /* Little endian means LS halfword first in byte stream */ + /* Little endian means LS halfword first in byte stream */ return (uint32_t)nxffs_rdle16(&val[2]) << 16 | (uint32_t)nxffs_rdle16(val); } diff --git a/fs/semaphore/sem_open.c b/fs/semaphore/sem_open.c index 7ba2d93c1ec..e5e46d9ba6d 100644 --- a/fs/semaphore/sem_open.c +++ b/fs/semaphore/sem_open.c @@ -264,9 +264,9 @@ FAR sem_t *sem_open (FAR const char *name, int oflags, ...) return sem; - errout_with_inode: +errout_with_inode: inode_release(inode); - errout_with_lock: +errout_with_lock: set_errno(errcode); sched_unlock(); return (FAR sem_t *)ERROR; diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index 994c30b6639..f57d3dd2a7f 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -2444,7 +2444,7 @@ static int unionfs_stat(FAR struct inode *mountpt, FAR const char *relpath, static int unionfs_getmount(FAR const char *path, FAR struct inode **inode) { - FAR struct inode *minode; + FAR struct inode *minode; /* Find the mountpt */ diff --git a/fs/vfs/fs_mkdir.c b/fs/vfs/fs_mkdir.c index 1add02d44d9..01ed5bb6291 100644 --- a/fs/vfs/fs_mkdir.c +++ b/fs/vfs/fs_mkdir.c @@ -181,9 +181,9 @@ int mkdir(const char *pathname, mode_t mode) return OK; - errout_with_inode: +errout_with_inode: inode_release(inode); - errout: +errout: set_errno(errcode); return ERROR; } diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index 1fb0cb538aa..ed44e47e215 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -201,11 +201,11 @@ int open(const char *path, int oflags, ...) return fd; - errout_with_fd: +errout_with_fd: files_release(fd); - errout_with_inode: +errout_with_inode: inode_release(inode); - errout: +errout: set_errno(ret); return ERROR; } diff --git a/fs/vfs/fs_rename.c b/fs/vfs/fs_rename.c index 820193cf5dc..e6ebfd3d63a 100644 --- a/fs/vfs/fs_rename.c +++ b/fs/vfs/fs_rename.c @@ -245,12 +245,12 @@ int rename(FAR const char *oldpath, FAR const char *newpath) return OK; #ifndef CONFIG_DISABLE_MOUNTPOINT - errout_with_newinode: +errout_with_newinode: inode_release(newinode); #endif - errout_with_oldinode: +errout_with_oldinode: inode_release(oldinode); - errout: +errout: set_errno(errcode); return ERROR; } diff --git a/fs/vfs/fs_unlink.c b/fs/vfs/fs_unlink.c index a05462dec09..126caf2adc3 100644 --- a/fs/vfs/fs_unlink.c +++ b/fs/vfs/fs_unlink.c @@ -225,9 +225,9 @@ int unlink(FAR const char *pathname) inode_release(inode); return OK; - errout_with_inode: +errout_with_inode: inode_release(inode); - errout: +errout: set_errno(errcode); return ERROR; } diff --git a/graphics/nxsu/nx_mousein.c b/graphics/nxsu/nx_mousein.c index 1b3027019cb..374ba804117 100644 --- a/graphics/nxsu/nx_mousein.c +++ b/graphics/nxsu/nx_mousein.c @@ -172,7 +172,7 @@ int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons) y = g_mrange.y - 1; } - /* Look any change in values */ + /* Look any change in values */ if (x != g_mpos.x || y != g_mpos.y || buttons != g_mbutton) { diff --git a/graphics/nxsu/nx_open.c b/graphics/nxsu/nx_open.c index 3f4629f90c4..2c646c8b3e4 100644 --- a/graphics/nxsu/nx_open.c +++ b/graphics/nxsu/nx_open.c @@ -151,7 +151,7 @@ static inline int nxsu_setup(FAR NX_DRIVERTYPE *dev, fe->be.topwnd = &fe->be.bkgd; - /* Initialize the mouse position */ + /* Initialize the mouse position */ #ifdef CONFIG_NX_XYINPUT nxsu_mouseinit(fe->be.vinfo.xres, fe->be.vinfo.yres); diff --git a/graphics/nxterm/nxterm_kbdin.c b/graphics/nxterm/nxterm_kbdin.c index 46c6e200beb..3b53514ec1e 100644 --- a/graphics/nxterm/nxterm_kbdin.c +++ b/graphics/nxterm/nxterm_kbdin.c @@ -418,14 +418,14 @@ void nxterm_kbdin(NXTERM handle, FAR const uint8_t *buffer, uint8_t buflen) return; } - /* Loop until all of the bytes have been written. This function may be - * called from an interrupt handler! Semaphores cannot be used! - * - * The write logic only needs to modify the head index. Therefore, - * there is a difference in the way that head and tail are protected: - * tail is protected with a semaphore; tail is protected by disabling - * interrupts. - */ + /* Loop until all of the bytes have been written. This function may be + * called from an interrupt handler! Semaphores cannot be used! + * + * The write logic only needs to modify the head index. Therefore, + * there is a difference in the way that head and tail are protected: + * tail is protected with a semaphore; tail is protected by disabling + * interrupts. + */ for (nwritten = 0; nwritten < buflen; nwritten++) { diff --git a/libc/fixedmath/lib_fixedmath.c b/libc/fixedmath/lib_fixedmath.c index cf072fd5412..d5dff82243a 100644 --- a/libc/fixedmath/lib_fixedmath.c +++ b/libc/fixedmath/lib_fixedmath.c @@ -144,17 +144,17 @@ b16_t b16mulb16(b16_t m1, b16_t m2) ub16_t ub16mulub16(ub16_t m1, ub16_t m2) { - /* Let: - * - * m1 = m1i*2**16 + m1f (b16) - * m2 = m2i*2**16 + m2f (b16) - * - * Then: - * - * m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32) - * = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16) - * = a*2**16 + b + c*2**-16 - */ + /* Let: + * + * m1 = m1i*2**16 + m1f (b16) + * m2 = m2i*2**16 + m2f (b16) + * + * Then: + * + * m1*m2 = (m1i*m2i)*2**32 + (m1i*m2f + m2i*m1f)*2**16 + m1f*m2f (b32) + * = (m1i*m2i)*2**16 + (m1i*m2f + m2i*m1f) + m1f*m2f*2**-16 (b16) + * = a*2**16 + b + c*2**-16 + */ uint32_t m1i = ((uint32_t)m1 >> 16); uint32_t m2i = ((uint32_t)m1 >> 16); @@ -195,15 +195,15 @@ b16_t b16sqr(b16_t a) ub16_t ub16sqr(ub16_t a) { - /* Let: - * - * m = mi*2**16 + mf (b16) - * - * Then: - * - * m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32) - * = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16) - */ + /* Let: + * + * m = mi*2**16 + mf (b16) + * + * Then: + * + * m*m = (mi*mi)*2**32 + 2*(m1*m2)*2**16 + mf*mf (b32) + * = (mi*mi)*2**16 + 2*(mi*mf) + mf*mf*2**-16 (b16) + */ uint32_t mi = ((uint32_t)a >> 16); uint32_t mf = ((uint32_t)a & 0x0000ffff); @@ -235,16 +235,16 @@ ub16_t ub16divub16(ub16_t num, ub16_t denom) uint32_t numf; uint32_t product; - /* Let: - * - * num = numi*2**16 + numf (b16) - * den = deni*2**16 + denf (b16) - * - * Then: - * - * num/den = numi*2**16 / den + numf / den (b0) - * = numi*2**32 / den + numf*2**16 /den (b16) - */ + /* Let: + * + * num = numi*2**16 + numf (b16) + * den = deni*2**16 + denf (b16) + * + * Then: + * + * num/den = numi*2**16 / den + numf / den (b0) + * = numi*2**32 / den + numf*2**16 /den (b16) + */ /* Check for overflow in the first part of the quotient */ diff --git a/libc/misc/lib_utsname.c b/libc/misc/lib_utsname.c index f61584e963a..ff69aa1af48 100644 --- a/libc/misc/lib_utsname.c +++ b/libc/misc/lib_utsname.c @@ -121,6 +121,6 @@ int uname(FAR struct utsname *name) name->machine[SYS_NAMELEN-1] = '\0'; return ret; - } +} #endif /* (!CONFIG_BUILD_PROTECTED) && !CONFIG_BUILD_KERNEL) || __KERNEL__ */ diff --git a/libc/netdb/lib_gethostbyaddrr.c b/libc/netdb/lib_gethostbyaddrr.c index ca274731741..f32fdc1d29e 100644 --- a/libc/netdb/lib_gethostbyaddrr.c +++ b/libc/netdb/lib_gethostbyaddrr.c @@ -228,7 +228,7 @@ errorout_with_herrnocode: *h_errnop = herrnocode; } - return ERROR; + return ERROR; } #endif @@ -341,7 +341,7 @@ errorout_with_herrnocode: *h_errnop = herrnocode; } - return ERROR; + return ERROR; } /**************************************************************************** diff --git a/libc/netdb/lib_gethostbynamer.c b/libc/netdb/lib_gethostbynamer.c index 6ae638ead28..6b005743cfc 100644 --- a/libc/netdb/lib_gethostbynamer.c +++ b/libc/netdb/lib_gethostbynamer.c @@ -112,7 +112,7 @@ static int lib_numeric_address(FAR const char *name, FAR struct hostent *host, * be big enough). */ - if (buflen <= sizeof(struct hostent_info_s)) + if (buflen <= sizeof(struct hostent_info_s)) { return -ERANGE; } @@ -335,7 +335,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host, * be big enough). */ - if (buflen <= sizeof(struct hostent_info_s)) + if (buflen <= sizeof(struct hostent_info_s)) { return -ERANGE; } @@ -360,7 +360,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent *host, return ret; } - /* Get the address type; verify the address size. */ + /* Get the address type; verify the address size. */ #ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv6 @@ -479,7 +479,7 @@ static int lib_dns_lookup(FAR const char *name, FAR struct hostent *host, * be big enough). */ - if (buflen <= sizeof(struct hostent_info_s)) + if (buflen <= sizeof(struct hostent_info_s)) { return -ERANGE; } @@ -676,7 +676,7 @@ errorout_with_herrnocode: *h_errnop = herrnocode; } - return ERROR; + return ERROR; } #endif /* CONFIG_NETDB_HOSTFILE */ @@ -793,7 +793,7 @@ int gethostbyname_r(FAR const char *name, FAR struct hostent *host, *h_errnop = HOST_NOT_FOUND; } - return ERROR; + return ERROR; #endif } diff --git a/libc/netdb/lib_parsehostfile.c b/libc/netdb/lib_parsehostfile.c index f09c5b85c3c..8913a8a2b24 100644 --- a/libc/netdb/lib_parsehostfile.c +++ b/libc/netdb/lib_parsehostfile.c @@ -279,7 +279,7 @@ ssize_t lib_parse_hostfile(FAR FILE *stream, FAR struct hostent *host, * be big enough). */ - if (buflen <= sizeof(struct hostent_info_s)) + if (buflen <= sizeof(struct hostent_info_s)) { return -ERANGE; } diff --git a/libc/signal/sig_set.c b/libc/signal/sig_set.c index a98d7b7ebd0..bbf42a587b0 100644 --- a/libc/signal/sig_set.c +++ b/libc/signal/sig_set.c @@ -118,7 +118,7 @@ void (*sigset(int signo, void (*disp)(int)))(int) * indicate the error. */ - if (ret == OK) + if (ret == OK) { return oact.sa_handler; } diff --git a/libc/stdio/lib_stdinstream.c b/libc/stdio/lib_stdinstream.c index 4b00888787b..240763613fc 100644 --- a/libc/stdio/lib_stdinstream.c +++ b/libc/stdio/lib_stdinstream.c @@ -64,7 +64,7 @@ static int stdinstream_getc(FAR struct lib_instream_s *this) this->nget++; } - return ret; + return ret; } /**************************************************************************** diff --git a/libc/stdio/lib_stdsistream.c b/libc/stdio/lib_stdsistream.c index 85eaf0fe711..0999f851324 100644 --- a/libc/stdio/lib_stdsistream.c +++ b/libc/stdio/lib_stdsistream.c @@ -64,7 +64,7 @@ static int stdsistream_getc(FAR struct lib_sistream_s *this) this->nget++; } - return ret; + return ret; } /**************************************************************************** diff --git a/libc/time/lib_settimeofday.c b/libc/time/lib_settimeofday.c index a28b634a7e2..ea404b7e039 100644 --- a/libc/time/lib_settimeofday.c +++ b/libc/time/lib_settimeofday.c @@ -83,8 +83,8 @@ int settimeofday(FAR const struct timeval *tv, FAR struct timezone *tz) /* Convert the timeval to a timespec */ - ts.tv_sec = tv->tv_sec; - ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC; + ts.tv_sec = tv->tv_sec; + ts.tv_nsec = tv->tv_usec * NSEC_PER_USEC; /* Let clock_settime do the work */ diff --git a/libc/unistd/lib_chdir.c b/libc/unistd/lib_chdir.c index 969b06a2dac..87353b546d4 100644 --- a/libc/unistd/lib_chdir.c +++ b/libc/unistd/lib_chdir.c @@ -64,14 +64,14 @@ #if 0 static inline void _trimdir(char *path) { - /* Skip any trailing '/' characters (unless it is also the leading '/') */ + /* Skip any trailing '/' characters (unless it is also the leading '/') */ - int len = strlen(path) - 1; - while (len > 0 && path[len] == '/') - { + int len = strlen(path) - 1; + while (len > 0 && path[len] == '/') + { path[len] = '\0'; len--; - } + } } #else # define _trimdir(p) diff --git a/mm/shm/shmdt.c b/mm/shm/shmdt.c index 0ecee2ab301..2215b03785f 100644 --- a/mm/shm/shmdt.c +++ b/mm/shm/shmdt.c @@ -87,7 +87,7 @@ * of the attached shared memory segment and return 0. * * Otherwise, the shared memory segment will not be detached, shmdt() - & will return -1, and errno will be set to indicate the error. + * will return -1, and errno will be set to indicate the error. * * - EINVAL * The value of shmaddr is not the data segment start address of a diff --git a/net/arp/arp_out.c b/net/arp/arp_out.c index a50e9dee683..a815715c63d 100644 --- a/net/arp/arp_out.c +++ b/net/arp/arp_out.c @@ -178,8 +178,8 @@ void arp_out(FAR struct net_driver_s *dev) * addresses=0xff (ff00::/8.) */ - else if (NTOHS(pip->eh_destipaddr[0]) >= 0xe000 && - NTOHS(pip->eh_destipaddr[0]) <= 0xefff) + else if (NTOHS(pip->eh_destipaddr[0]) >= 0xe000 && + NTOHS(pip->eh_destipaddr[0]) <= 0xefff) { /* Build the well-known IPv4 IGMP Ethernet address. The first * three bytes are fixed; the final three variable come from the diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index fbb6bdd6aef..1b19e91a431 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -221,7 +221,7 @@ int arp_send(in_addr_t ipaddr) * addresses=0xff (ff00::/8.) */ - if (NTOHL(ipaddr) >= 0xe0000000 && NTOHL(ipaddr) <= 0xefffffff) + if (NTOHL(ipaddr) >= 0xe0000000 && NTOHL(ipaddr) <= 0xefffffff) { /* We don't need to send the ARP request */ diff --git a/net/arp/arp_timer.c b/net/arp/arp_timer.c index c1b23c4bcd8..b610e7b8a5e 100644 --- a/net/arp/arp_timer.c +++ b/net/arp/arp_timer.c @@ -126,7 +126,7 @@ void arp_timer_initialize(void) /* Create and start the ARP timer */ g_arptimer = wd_create(); - (void)wd_start(g_arptimer, ARPTIMER_WDINTERVAL, arptimer_poll, 0); + (void)wd_start(g_arptimer, ARPTIMER_WDINTERVAL, arptimer_poll, 0); } #endif /* CONFIG_NET_ARP */ diff --git a/net/icmpv6/icmpv6_autoconfig.c b/net/icmpv6/icmpv6_autoconfig.c index 051542ea571..add6e328b56 100644 --- a/net/icmpv6/icmpv6_autoconfig.c +++ b/net/icmpv6/icmpv6_autoconfig.c @@ -301,9 +301,9 @@ static int icmpv6_wait_radvertise(FAR struct net_driver_s *dev, ret = icmpv6_rwait(notify, &delay); - /* icmpv6_wait will return OK if and only if the matching Router - * Advertisement is received. Otherwise, it will return -ETIMEDOUT. - */ + /* icmpv6_wait will return OK if and only if the matching Router + * Advertisement is received. Otherwise, it will return -ETIMEDOUT. + */ return ret; } @@ -368,9 +368,9 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev) /* The interface should be in the down state */ - save = net_lock(); - netdev_ifdown(dev); - net_unlock(save); + save = net_lock(); + netdev_ifdown(dev); + net_unlock(save); /* IPv6 Stateless Autoconfiguration * Reference: http://www.tcpipguide.com/free/t_IPv6AutoconfigurationandRenumbering.htm diff --git a/net/iob/iob_test.c b/net/iob/iob_test.c index 5c58852cff1..871f1e0126d 100644 --- a/net/iob/iob_test.c +++ b/net/iob/iob_test.c @@ -199,10 +199,10 @@ int main(int argc, char **argv) void my_assert(bool value) { - if (!value) - { - fprintf(stderr, "Assertion failed\n"); + if (!value) + { + fprintf(stderr, "Assertion failed\n"); - abort(); - } + abort(); + } } diff --git a/net/local/local_conn.c b/net/local/local_conn.c index c45b49832f6..a369f04b7cb 100644 --- a/net/local/local_conn.c +++ b/net/local/local_conn.c @@ -64,7 +64,7 @@ * ****************************************************************************/ - void local_initialize(void) +void local_initialize(void) { #ifdef CONFIG_NET_LOCAL_STREAM dq_init(&g_local_listeners); diff --git a/net/socket/net_dupsd.c b/net/socket/net_dupsd.c index 6381c45d528..9ebe0b30b79 100644 --- a/net/socket/net_dupsd.c +++ b/net/socket/net_dupsd.c @@ -99,7 +99,7 @@ int net_dupsd(int sockfd, int minsd) psock1 = sockfd_socket(sockfd); - /* Verify that the sockfd corresponds to valid, allocated socket */ + /* Verify that the sockfd corresponds to valid, allocated socket */ if (!psock1 || psock1->s_crefs <= 0) { diff --git a/net/socket/net_sendfile.c b/net/socket/net_sendfile.c index 9bb413cefdb..d28ec93e9bc 100644 --- a/net/socket/net_sendfile.c +++ b/net/socket/net_sendfile.c @@ -744,15 +744,15 @@ ssize_t net_sendfile(int outfd, struct file *infile, off_t *offset, tcp_callback_free(conn, state.snd_ackcb); - errout_datacb: +errout_datacb: tcp_callback_free(conn, state.snd_datacb); - errout_locked: +errout_locked: sem_destroy(&state. snd_sem); net_unlock(save); - errout: +errout: if (err) { diff --git a/net/socket/recvfrom.c b/net/socket/recvfrom.c index 2ee0b5ffda0..43ef798b6d3 100644 --- a/net/socket/recvfrom.c +++ b/net/socket/recvfrom.c @@ -265,8 +265,8 @@ static inline void recvfrom_newtcpdata(FAR struct net_driver_s *dev, * add it to the read-ahead buffers. */ - if (recvlen < dev->d_len) - { + if (recvlen < dev->d_len) + { #ifdef CONFIG_NET_TCP_READAHEAD FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)pstate->rf_sock->s_conn; FAR uint8_t *buffer = (FAR uint8_t *)dev->d_appdata + recvlen; diff --git a/net/socket/socket.c b/net/socket/socket.c index 2c8376e1e7f..93fd41a278d 100644 --- a/net/socket/socket.c +++ b/net/socket/socket.c @@ -185,9 +185,9 @@ static int psock_local_alloc(FAR struct socket *psock) return -ENOMEM; } - /* Set the reference count on the connection structure. This reference - * count will be incremented only if the socket is dup'ed - */ + /* Set the reference count on the connection structure. This reference + * count will be incremented only if the socket is dup'ed + */ DEBUGASSERT(conn->lc_crefs == 0); conn->lc_crefs = 1; diff --git a/net/tcp/tcp_appsend.c b/net/tcp/tcp_appsend.c index b1580112bb9..03ad447464f 100644 --- a/net/tcp/tcp_appsend.c +++ b/net/tcp/tcp_appsend.c @@ -253,7 +253,7 @@ void tcp_rexmit(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn, } #endif /* CONFIG_NET_IPv6 */ - /* If the application has data to be sent, or if the incoming packet had + /* If the application has data to be sent, or if the incoming packet had * new data in it, we must send out a packet. */ diff --git a/net/tcp/tcp_ipselect.c b/net/tcp/tcp_ipselect.c index 9463fe4b30b..6669b3be0c3 100644 --- a/net/tcp/tcp_ipselect.c +++ b/net/tcp/tcp_ipselect.c @@ -76,9 +76,9 @@ void tcp_ipv4_select(FAR struct net_driver_s *dev) IFF_SET_IPv4(dev->d_flags); - /* Set the offset to the beginning of the TCP data payload */ + /* Set the offset to the beginning of the TCP data payload */ - dev->d_appdata = &dev->d_buf[IPv4TCP_HDRLEN + NET_LL_HDRLEN(dev)]; + dev->d_appdata = &dev->d_buf[IPv4TCP_HDRLEN + NET_LL_HDRLEN(dev)]; } #endif /* CONFIG_NET_IPv4 */ @@ -97,9 +97,9 @@ void tcp_ipv6_select(FAR struct net_driver_s *dev) IFF_SET_IPv6(dev->d_flags); - /* Set the offset to the beginning of the TCP data payload */ + /* Set the offset to the beginning of the TCP data payload */ - dev->d_appdata = &dev->d_buf[IPv6TCP_HDRLEN + NET_LL_HDRLEN(dev)]; + dev->d_appdata = &dev->d_buf[IPv6TCP_HDRLEN + NET_LL_HDRLEN(dev)]; } #endif /* CONFIG_NET_IPv6 */ diff --git a/net/tcp/tcp_send_buffered.c b/net/tcp/tcp_send_buffered.c index 34e9100ad07..0a24144ccf1 100644 --- a/net/tcp/tcp_send_buffered.c +++ b/net/tcp/tcp_send_buffered.c @@ -589,7 +589,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, conn->expired++; } } - + /* Move all segments that have been sent but not ACKed to the write * queue again note, the un-ACKed segments are put at the head of the * write_q so they can be resent as soon as possible. @@ -726,7 +726,7 @@ static uint16_t psock_send_interrupt(FAR struct net_driver_s *dev, * retransmitting, then the sequence number will already * be set for this write buffer. */ - + if (WRB_SEQNO(wrb) == (unsigned)-1) { WRB_SEQNO(wrb) = conn->isn + conn->sent; diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c index 4620532342c..c8ee594fbd9 100644 --- a/net/tcp/tcp_send_unbuffered.c +++ b/net/tcp/tcp_send_unbuffered.c @@ -386,7 +386,7 @@ static uint16_t tcpsend_interrupt(FAR struct net_driver_s *dev, /* Fall through to re-send data from the last that was ACKed */ } - /* Check for a loss of connection */ + /* Check for a loss of connection */ else if ((flags & TCP_DISCONN_EVENTS) != 0) { diff --git a/net/udp/udp_ipselect.c b/net/udp/udp_ipselect.c index 7c5227ba258..b11fb00ac63 100644 --- a/net/udp/udp_ipselect.c +++ b/net/udp/udp_ipselect.c @@ -77,9 +77,9 @@ void udp_ipv4_select(FAR struct net_driver_s *dev) IFF_SET_IPv4(dev->d_flags); - /* Set the offset to the beginning of the UDP data payload */ + /* Set the offset to the beginning of the UDP data payload */ - dev->d_appdata = &dev->d_buf[IPv4UDP_HDRLEN + NET_LL_HDRLEN(dev)]; + dev->d_appdata = &dev->d_buf[IPv4UDP_HDRLEN + NET_LL_HDRLEN(dev)]; } #endif /* CONFIG_NET_IPv4 */ @@ -98,9 +98,9 @@ void udp_ipv6_select(FAR struct net_driver_s *dev) IFF_SET_IPv6(dev->d_flags); - /* Set the offset to the beginning of the UDP data payload */ + /* Set the offset to the beginning of the UDP data payload */ - dev->d_appdata = &dev->d_buf[IPv6UDP_HDRLEN + NET_LL_HDRLEN(dev)]; + dev->d_appdata = &dev->d_buf[IPv6UDP_HDRLEN + NET_LL_HDRLEN(dev)]; } #endif /* CONFIG_NET_IPv6 */ diff --git a/sched/group/group_killchildren.c b/sched/group/group_killchildren.c index d549da86580..9ec7465f987 100644 --- a/sched/group/group_killchildren.c +++ b/sched/group/group_killchildren.c @@ -77,7 +77,7 @@ static int group_killchildren_handler(pid_t pid, FAR void *arg) ret = pthread_cancel(pid); } - return ret; + return ret; } /**************************************************************************** diff --git a/sched/sched/sched_timerexpiration.c b/sched/sched/sched_timerexpiration.c index c765c075cb3..c968da6bc82 100644 --- a/sched/sched/sched_timerexpiration.c +++ b/sched/sched/sched_timerexpiration.c @@ -271,9 +271,9 @@ static unsigned int sched_timer_process(unsigned int ticks, bool noswitches) rettime = tmp; } - /* Check for operations specific to scheduling policy of the currently - * active task. - */ + /* Check for operations specific to scheduling policy of the currently + * active task. + */ tmp = sched_process_scheduler(ticks, noswitches); if (tmp > 0 && tmp < cmptime) diff --git a/sched/semaphore/sem_holder.c b/sched/semaphore/sem_holder.c index b8bdd6c2eea..c08f90bb5ac 100644 --- a/sched/semaphore/sem_holder.c +++ b/sched/semaphore/sem_holder.c @@ -780,7 +780,7 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, void sem_initholders(void) { #if CONFIG_SEM_PREALLOCHOLDERS > 0 - int i; + int i; /* Put all of the pre-allocated holder structures into the free list */ diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 7b7fc6215a5..7f6fc14d8ad 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -138,7 +138,7 @@ int task_init(FAR struct tcb_s *tcb, const char *name, int priority, } #endif - /* Associate file descriptors with the new task */ + /* Associate file descriptors with the new task */ #if CONFIG_NFILE_DESCRIPTORS > 0 || CONFIG_NSOCKET_DESCRIPTORS > 0 ret = group_setuptaskfiles(ttcb); diff --git a/sched/task/task_spawn.c b/sched/task/task_spawn.c index 98535078292..02083a19ac2 100644 --- a/sched/task/task_spawn.c +++ b/sched/task/task_spawn.c @@ -216,7 +216,7 @@ errout: static int task_spawn_proxy(int argc, FAR char *argv[]) { - int ret; + int ret; /* Perform file actions and/or set a custom signal mask. We get here only * if the file_actions parameter to task_spawn[p] was non-NULL and/or the diff --git a/tools/cfgdefine.c b/tools/cfgdefine.c index de91882a56c..bb9a81eee2b 100644 --- a/tools/cfgdefine.c +++ b/tools/cfgdefine.c @@ -98,7 +98,7 @@ static const char *dequote_list[] = * Private Functions ****************************************************************************/ - /* Skip over any spaces */ +/* Skip over any spaces */ static char *skip_space(char *ptr) { diff --git a/tools/cfgparser.c b/tools/cfgparser.c index 8ac52a58902..959cf9e5ebf 100644 --- a/tools/cfgparser.c +++ b/tools/cfgparser.c @@ -61,7 +61,7 @@ char line[LINESIZE+1]; * Private Functions ****************************************************************************/ - /* Skip over any spaces */ +/* Skip over any spaces */ static char *skip_space(char *ptr) { diff --git a/tools/mkconfig.c b/tools/mkconfig.c index 038ad5fadaf..70160aa0bb5 100644 --- a/tools/mkconfig.c +++ b/tools/mkconfig.c @@ -53,7 +53,7 @@ * Private Functions ****************************************************************************/ - static inline char *getfilepath(const char *name) +static inline char *getfilepath(const char *name) { snprintf(line, PATH_MAX, "%s/" DEFCONFIG, name); line[PATH_MAX] = '\0'; diff --git a/tools/mkdeps.c b/tools/mkdeps.c index d6819ab25db..91e41471719 100644 --- a/tools/mkdeps.c +++ b/tools/mkdeps.c @@ -115,7 +115,7 @@ static char g_command[MAX_BUFFER]; * Private Functions ****************************************************************************/ - /* MinGW does not seem to provide strtok_r */ +/* MinGW does not seem to provide strtok_r */ #ifndef HAVE_STRTOK_R static char *MY_strtok_r(char *str, const char *delim, char **saveptr)