diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.c b/arch/arm/src/cxd56xx/cxd56_gnss.c index 1e77474034..d48d02007e 100644 --- a/arch/arm/src/cxd56xx/cxd56_gnss.c +++ b/arch/arm/src/cxd56xx/cxd56_gnss.c @@ -916,7 +916,8 @@ static int cxd56_gnss_save_backup_data(FAR struct file *filep, return -ENOMEM; } - fd = nx_open(CONFIG_CXD56_GNSS_BACKUP_FILENAME, O_WRONLY | O_CREAT | O_TRUNC); + fd = nx_open(CONFIG_CXD56_GNSS_BACKUP_FILENAME, + O_WRONLY | O_CREAT | O_TRUNC); if (fd < 0) { kmm_free(buf); diff --git a/arch/x86_64/include/intel64/irq.h b/arch/x86_64/include/intel64/irq.h index 09eac52956..e820f48b23 100644 --- a/arch/x86_64/include/intel64/irq.h +++ b/arch/x86_64/include/intel64/irq.h @@ -94,7 +94,7 @@ #define IRQ14 46 /* Primary ATA channel */ #define IRQ15 47 /* Secondary ATA channel */ -#define IRQ_ERROR 51 /* APIC Error */ +#define IRQ_ERROR 51 /* APIC Error */ #define IRQ_SPURIOUS 0xff /* Spurious Interrupts */ #define NR_IRQS 48 diff --git a/binfmt/libnxflat/libnxflat_init.c b/binfmt/libnxflat/libnxflat_init.c index ce6202bc6e..62472a1987 100644 --- a/binfmt/libnxflat/libnxflat_init.c +++ b/binfmt/libnxflat/libnxflat_init.c @@ -55,8 +55,8 @@ * Pre-processor Definitions ****************************************************************************/ -/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be - * defined or CONFIG_NXFLAT_DUMPBUFFER does nothing. +/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to + * be defined or CONFIG_NXFLAT_DUMPBUFFER does nothing. */ #if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT) @@ -137,8 +137,8 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo) { /* This is not an error because we will be called to attempt loading * EVERY binary. Returning -ENOEXEC simply informs the system that - * the file is not an NXFLAT file. Besides, if there is something worth - * complaining about, nnxflat_verifyheader() has already + * the file is not an NXFLAT file. Besides, if there is something + * worth complaining about, nnxflat_verifyheader() has already * done so. */ diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_fillpage.c b/boards/arm/lpc31xx/ea3131/src/lpc31_fillpage.c index 90161e5a50..85e565e59f 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_fillpage.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_fillpage.c @@ -187,12 +187,12 @@ struct pg_source_s }; #endif -/* State structured needd to support paging through the M25P* MTD interface. */ +/* State structured support paging through the M25P* MTD interface. */ #if defined(CONFIG_PAGING_M25PX) || defined(CONFIG_PAGING_AT45DB) struct pg_source_s { - /* If interrupts or DMA are used, then we will have to defer initialization */ + /* If interrupts/DMA are used, then we will have to defer initialization */ bool initialized; /* TRUE: we are initialized */ @@ -333,7 +333,8 @@ static inline void lpc31_initsrc(void) DEBUGASSERT(ret >= 0); capacity = g_pgsrc.geo.erasesize*g_pgsrc.geo.neraseblocks; pginfo("capacity: %d\n", capacity); - DEBUGASSERT(capacity >= (CONFIG_EA3131_PAGING_BINOFFSET + PG_TEXT_VSIZE)); + DEBUGASSERT(capacity >= + CONFIG_EA3131_PAGING_BINOFFSET + PG_TEXT_VSIZE); #endif /* We are now initialized */ @@ -397,7 +398,8 @@ static inline void lpc31_initsrc(void) * Assumptions: * - This function is called from the normal tasking context (but * interrupts siabled). The implementation must take whatever actions - * are necessary to assure that the operation is safe within this context. + * are necessary to assure that the operation is safe within this + * context. * - Upon return, the caller will sleep waiting for the page fill callback * to occur. The callback function will perform the wakeup. * @@ -419,7 +421,8 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) #endif pginfo("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); - DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); + DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && + tcb->xcp.far < PG_PAGED_VEND); /* If BINPATH is defined, then it is the full path to a file on a mounted * file system. In this case initialization will be deferred until the @@ -459,7 +462,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) * virtual address. File offset 0 corresponds to PG_LOCKED_VBASE. */ - offset = (off_t)tcb->xcp.far - PG_LOCKED_VBASE + CONFIG_EA3131_PAGING_BINOFFSET; + offset = tcb->xcp.far - PG_LOCKED_VBASE + CONFIG_EA3131_PAGING_BINOFFSET; /* Read the page at the correct offset into the SPI FLASH device */ @@ -483,7 +486,8 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback) { pginfo("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); - DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); + DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && + tcb->xcp.far < PG_PAGED_VEND); #if defined(CONFIG_PAGING_BINPATH) # error "File system-based paging must always be implemented with blocking calls" @@ -517,17 +521,17 @@ void weak_function lpc31_pginitialize(void) * lpc31_spidev_initialize(void); * - Set up resources to support up_fillpage() operation. For example, * perhaps the text image is stored in a named binary file. - * In this case, the virtual text addresses might map to offsets into that - * file. - * - Do whatever else is necessary to make up_fillpage() ready for the first - * time that it is called. + * In this case, the virtual text addresses might map to offsets into + * that file. + * - Do whatever else is necessary to make up_fillpage() ready for the + * first time that it is called. * * In reality, however, this function is not very useful: * This function is called from a low level (before nx_start() is even - * called), it may not be possible to perform file system operations or even - * to get debug output yet. Therefore, to keep life simple, initialization - * will be deferred in all cases until the first time that up_fillpage() - * is called. + * called), it may not be possible to perform file system operations or + * even to get debug output yet. Therefore, to keep life simple, + * initialization will be deferred in all cases until the first time that + * up_fillpage() is called. */ } diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_fillpage.c b/boards/arm/lpc31xx/ea3152/src/lpc31_fillpage.c index e15b35d9e6..eb9d75d84f 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_fillpage.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_fillpage.c @@ -186,12 +186,12 @@ struct pg_source_s }; #endif -/* State structured needd to support paging through the M25P* MTD interface. */ +/* State structured support paging through the M25P* MTD interface. */ #if defined(CONFIG_PAGING_M25PX) || defined(CONFIG_PAGING_AT45DB) struct pg_source_s { - /* If interrupts or DMA are used, then we will have to defer initialization */ + /* If interrupts/DMA are used, then we will have to defer initialization */ bool initialized; /* TRUE: we are initialized */ @@ -333,7 +333,8 @@ static inline void lpc31_initsrc(void) DEBUGASSERT(ret >= 0); capacity = g_pgsrc.geo.erasesize*g_pgsrc.geo.neraseblocks; pginfo("capacity: %d\n", capacity); - DEBUGASSERT(capacity >= (CONFIG_EA3152_PAGING_BINOFFSET + PG_TEXT_VSIZE)); + DEBUGASSERT(capacity >= + CONFIG_EA3152_PAGING_BINOFFSET + PG_TEXT_VSIZE); #endif /* We are now initialized */ @@ -397,7 +398,8 @@ static inline void lpc31_initsrc(void) * Assumptions: * - This function is called from the normal tasking context (but * interrupts disabled). The implementation must take whatever actions - * are necessary to assure that the operation is safe within this context. + * are necessary to assure that the operation is safe within this + * context. * - Upon return, the caller will sleep waiting for the page fill callback * to occur. The callback function will perform the wakeup. * @@ -419,7 +421,8 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) #endif pginfo("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); - DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); + DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && + tcb->xcp.far < PG_PAGED_VEND); /* If BINPATH is defined, then it is the full path to a file on a mounted * file system. @@ -460,7 +463,7 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage) * virtual address. File offset 0 corresponds to PG_LOCKED_VBASE. */ - offset = (off_t)tcb->xcp.far - PG_LOCKED_VBASE + CONFIG_EA3152_PAGING_BINOFFSET; + offset = tcb->xcp.far - PG_LOCKED_VBASE + CONFIG_EA3152_PAGING_BINOFFSET; /* Read the page at the correct offset into the SPI FLASH device */ @@ -484,7 +487,8 @@ int up_fillpage(FAR struct tcb_s *tcb, FAR void *vpage, up_pgcallback_t pg_callback) { pginfo("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); - DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && tcb->xcp.far < PG_PAGED_VEND); + DEBUGASSERT(tcb->xcp.far >= PG_PAGED_VBASE && + tcb->xcp.far < PG_PAGED_VEND); #if defined(CONFIG_PAGING_BINPATH) # error "File system-based paging must always be implemented with blocking calls" @@ -519,17 +523,17 @@ void weak_function lpc31_pginitialize(void) * lpc31_spidev_initialize(void); * - Set up resources to support up_fillpage() operation. * For example, perhaps the text image is stored in a named binary file. - * In this case, the virtual text addresses might map to offsets into that - * file. - * - Do whatever else is necessary to make up_fillpage() ready for the first - * time that it is called. + * In this case, the virtual text addresses might map to offsets into + * that file. + * - Do whatever else is necessary to make up_fillpage() ready for the + * first time that it is called. * * In reality, however, this function is not very useful: * This function is called from a low level (before nx_start() is even - * called), it may not be possible to perform file system operations or even - * to get debug output yet. Therefore, to keep life simple, initialization - * will be deferred in all cases until the first time that up_fillpage() is - * called. + * called), it may not be possible to perform file system operations or + * even to get debug output yet. Therefore, to keep life simple, + * initialization will be deferred in all cases until the first time that + * up_fillpage() is called. */ } diff --git a/boards/arm/stm32/photon/src/stm32_rgbled.c b/boards/arm/stm32/photon/src/stm32_rgbled.c index 83e7f94e37..41270822b3 100644 --- a/boards/arm/stm32/photon/src/stm32_rgbled.c +++ b/boards/arm/stm32/photon/src/stm32_rgbled.c @@ -57,7 +57,8 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/* Configuration ********************************************************************/ + +/* Configuration ************************************************************/ #define HAVE_RGBLED 1 diff --git a/boards/z80/ez80/z20x/src/w25_main.c b/boards/z80/ez80/z20x/src/w25_main.c index 85133c969a..77dfcb0e36 100644 --- a/boards/z80/ez80/z20x/src/w25_main.c +++ b/boards/z80/ez80/z20x/src/w25_main.c @@ -621,7 +621,9 @@ static int w25_wait_keypress(FAR char *keyset, int nseconds) { char tmpch; - /* Read handling retries. We get out of this loop if a key is press. */ + /* Read handling retries. + * We get out of this loop if a key is press. + */ for (; ; ) { diff --git a/drivers/lcd/tda19988.c b/drivers/lcd/tda19988.c index 32505ab914..7e13a0de39 100644 --- a/drivers/lcd/tda19988.c +++ b/drivers/lcd/tda19988.c @@ -159,8 +159,10 @@ static ssize_t tda19988_read(FAR struct file *filep, FAR char *buffer, size_t buflen); static ssize_t tda19988_write(FAR struct file *filep, FAR const char *buffer, size_t buflen); -static off_t tda19988_seek(FAR struct file *filep, off_t offset, int whence); -static int tda19988_ioctl(FAR struct file *filep, int cmd, unsigned long arg); +static off_t tda19988_seek(FAR struct file *filep, off_t offset, + int whence); +static int tda19988_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); static int tda19988_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup); #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS @@ -664,7 +666,8 @@ static int tda19988_fetch_edid_block(FAR struct tda1988_dev_s *priv, /* Block 0 */ tda19988_hdmi_putreg(priv, HDMI_EDID_DEV_ADDR_REG, 0xa0); - tda19988_hdmi_putreg(priv, HDMI_EDID_OFFSET_REG, (block & 1) != 0 ? 128 : 0); + tda19988_hdmi_putreg(priv, HDMI_EDID_OFFSET_REG, + (block & 1) != 0 ? 128 : 0); tda19988_hdmi_putreg(priv, HDMI_EDID_SEGM_ADDR_REG, 0x60); tda19988_hdmi_putreg(priv, HDMI_EDID_DDC_SEGM_REG, block >> 1); @@ -787,7 +790,6 @@ done: * ****************************************************************************/ - static ssize_t tda19988_read_internal(FAR struct tda1988_dev_s *priv, off_t offset, FAR uint8_t *buffer, size_t buflen) @@ -973,8 +975,8 @@ static ssize_t tda19988_read(FAR struct file *filep, FAR char *buffer, * Standard character driver write method. * * Returned Value: - * The number of bytes written is returned on success; A negated errno value - * is returned on any failure. + * The number of bytes written is returned on success; A negated errno + * value is returned on any failure. * ****************************************************************************/ @@ -1072,6 +1074,7 @@ static off_t tda19988_seek(FAR struct file *filep, off_t offset, int whence) break; default: + /* Return EINVAL if the whence argument is invalid */ pos = (off_t)-EINVAL; @@ -1558,17 +1561,22 @@ static int tda19988_hdmi_putreg16(priv, HDMI_CTRL_MUX_VS_LINE_STRT_1_MSB_REG, vs1_line_start); - tda19988_hdmi_putreg16(priv, HDMI_CTRL_MUX_VS_PIX_STRT_1_MSB_REG, vs1_pix_start); - tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_LINE_END_1_MSB_REG, vs1_line_end); + tda19988_hdmi_putreg16(priv, HDMI_CTRL_MUX_VS_PIX_STRT_1_MSB_REG, + vs1_pix_start); + tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_LINE_END_1_MSB_REG, + vs1_line_end); tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_PIX_END_1_MSB_REG, vs1_pix_stop); tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_LINE_STRT_2_MSB_REG, vs2_line_start); - tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_PIX_STRT_2_MSB_REG, vs2_pix_start); - tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_LINE_END_2_MSB_REG, vs2_line_end); + tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_PIX_STRT_2_MSB_REG, + vs2_pix_start); + tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_LINE_END_2_MSB_REG, + vs2_line_end); tda19988_hdmi_putreg16(priv, HDMI_CTRL_VS_PIX_END_2_MSB_REG, vs2_pix_stop); tda19988_hdmi_putreg16(priv, HDMI_CTRL_HS_PIX_START_MSB_REG, hs_pix_start); tda19988_hdmi_putreg16(priv, HDMI_CTRL_HS_PIX_STOP_MSB_REG, hs_pix_stop); - tda19988_hdmi_putreg16(priv, HDMI_CTRL_VWIN_START_1_MSB_REG, vwin1_line_start); + tda19988_hdmi_putreg16(priv, HDMI_CTRL_VWIN_START_1_MSB_REG, + vwin1_line_start); tda19988_hdmi_putreg16(priv, HDMI_CTRL_VWIN_END_1_MSB_REG, vwin1_line_end); tda19988_hdmi_putreg16(priv, HDMI_CTRL_VWIN_START_2_MSB_REG, vwin2_line_start); @@ -1659,7 +1667,8 @@ TDA19988_HANDLE tda19988_register(FAR const char *devpath, /* Allocate an instance of the TDA19988 driver */ - priv = (FAR struct tda1988_dev_s *)kmm_zalloc(sizeof(struct tda1988_dev_s)); + priv = (FAR struct tda1988_dev_s *) + kmm_zalloc(sizeof(struct tda1988_dev_s)); if (priv == NULL) { lcderr("ERROR: Failed to allocate device structure\n"); diff --git a/fs/mmap/fs_rammap.c b/fs/mmap/fs_rammap.c index 8140938935..c830903036 100644 --- a/fs/mmap/fs_rammap.c +++ b/fs/mmap/fs_rammap.c @@ -103,8 +103,8 @@ void rammap_initialize(void) * offset The offset into the file to map * * Returned Value: - * On success, rammmap() returns a pointer to the mapped area. On error, the - * value MAP_FAILED is returned, and errno is set appropriately. + * On success, rammmap() returns a pointer to the mapped area. On error, + * the value MAP_FAILED is returned, and errno is set appropriately. * * EBADF * 'fd' is not a valid file descriptor. diff --git a/fs/vfs/fs_select.c b/fs/vfs/fs_select.c index 56c9ca4a31..440d71f54b 100644 --- a/fs/vfs/fs_select.c +++ b/fs/vfs/fs_select.c @@ -168,7 +168,9 @@ int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, incr = 1; } - /* The exceptfds set holds the set of FDs that are watched for exceptions */ + /* The exceptfds set holds the set of FDs that are watched for + * exceptions + */ if (exceptfds && FD_ISSET(fd, exceptfds)) { diff --git a/graphics/nxmu/nxmu_server.c b/graphics/nxmu/nxmu_server.c index e457a3d8ea..84bf8b27a0 100644 --- a/graphics/nxmu/nxmu_server.c +++ b/graphics/nxmu/nxmu_server.c @@ -205,7 +205,8 @@ static inline int nxmu_setup(FAR const char *mqname, FAR NX_DRIVERTYPE *dev, attr.mq_msgsize = NX_MXSVRMSGLEN; attr.mq_flags = 0; - ret = nxmq_open(mqname, O_RDONLY | O_CREAT, 0666, &attr, &nxmu->conn.crdmq); + ret = nxmq_open(mqname, O_RDONLY | O_CREAT, + 0666, &attr, &nxmu->conn.crdmq); if (ret < 0) { gerr("ERROR: nxmq_open(%s) failed: %d\n", mqname, ret); diff --git a/include/nuttx/power/battery_monitor.h b/include/nuttx/power/battery_monitor.h index 456ba5bf06..fb808fdd65 100644 --- a/include/nuttx/power/battery_monitor.h +++ b/include/nuttx/power/battery_monitor.h @@ -284,7 +284,7 @@ struct battery_monitor_operations_s int (*soc)(struct battery_monitor_dev_s *dev, b16_t *value); - /* Get the battery pack Couloumb count value*/ + /* Get the battery pack Couloumb count value */ int (*coulombs)(struct battery_monitor_dev_s *dev, int *value); @@ -307,7 +307,9 @@ struct battery_monitor_operations_s int (*setlimits)(struct battery_monitor_dev_s *dev, struct battery_monitor_limits_s *limits); - /* Set the state of charge/discharge switches to allow battery to source/sink power */ + /* Set the state of charge/discharge switches to allow battery to + * source/sink power + */ int (*chgdsg)(struct battery_monitor_dev_s *dev, struct battery_monitor_switches_s *sw); @@ -328,7 +330,7 @@ struct battery_monitor_dev_s /* Fields required by the upper-half driver */ FAR const struct battery_monitor_operations_s *ops; /* Battery operations */ - sem_t batsem; /* Enforce mutually exclusive access */ + sem_t batsem; /* Enforce mutually exclusive access */ /* Data fields specific to the lower-half driver may follow */ }; @@ -413,13 +415,10 @@ int battery_monitor_register(FAR const char *devpath, #if defined(CONFIG_I2C) && defined(CONFIG_I2C_BQ769X0) struct i2c_master_s; -FAR struct battery_monitor_dev_s *bq769x0_initialize(FAR struct i2c_master_s *i2c, - uint8_t addr, - uint32_t frequency, - bool crc, - uint8_t cellcount, - uint8_t chip, - uint32_t sense_r); +FAR struct battery_monitor_dev_s * +bq769x0_initialize(FAR struct i2c_master_s *i2c, + uint8_t addr, uint32_t frequency, bool crc, + uint8_t cellcount, uint8_t chip, uint32_t sense_r); #endif #undef EXTERN diff --git a/net/route/net_fileroute.c b/net/route/net_fileroute.c index bd370dcb4b..77235f2ce8 100644 --- a/net/route/net_fileroute.c +++ b/net/route/net_fileroute.c @@ -155,7 +155,7 @@ int net_routesize(FAR const char *path, size_t entrysize) if (ret == -ENOENT) { - /* The routing table file has not been created. Return size zero. */ + /* The routing table file has not been created. Return zero. */ return 0; } @@ -308,7 +308,7 @@ int net_openroute_ipv6(int oflags, FAR struct file *filep) * Read one route entry from the IPv4/IPv6 routing table. * * Input Parameters: - * filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly] + * filep - File instance obtained by net_openroute_ipv{4|6}[_rdonly] * route - Location to return the next route read from the file * * Returned Value: @@ -421,7 +421,7 @@ ssize_t net_readroute_ipv6(FAR struct file *filep, * Write one route entry to the IPv4/IPv6 routing table. * * Input Parameters: - * filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly] + * filep - File instance obtained by net_openroute_ipv{4|6}[_rdonly] * route - Location to return the next route read from the file * * Returned Value: @@ -533,7 +533,7 @@ ssize_t net_writeroute_ipv6(FAR struct file *filep, * Seek to a specific entry entry to the IPv4/IPv6 routing table. * * Input Parameters: - * filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly] + * filep - File instance obtained by net_openroute_ipv{4|6}[_rdonly] * index - The index of the routing table entry to seek to. * * Returned Value: @@ -821,7 +821,7 @@ int net_unlockroute_ipv6(void) * Close the IPv4/IPv6 routing table. * * Input Parameters: - * filep - Detached file instance obtained by net_openroute_ipv{4|6}[_rdonly] + * filep - File instance obtained by net_openroute_ipv{4|6}[_rdonly] * * Returned Value: * Zero (OK) is returned on success. A negated errno value is returned on