diff --git a/arch/arm/src/common/up_releasestack.c b/arch/arm/src/common/up_releasestack.c index c177418ecb..5588e4233f 100644 --- a/arch/arm/src/common/up_releasestack.c +++ b/arch/arm/src/common/up_releasestack.c @@ -50,6 +50,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration */ #undef HAVE_KERNEL_HEAP diff --git a/arch/or1k/src/common/up_releasestack.c b/arch/or1k/src/common/up_releasestack.c index 59d6567ba6..9ef5598db0 100644 --- a/arch/or1k/src/common/up_releasestack.c +++ b/arch/or1k/src/common/up_releasestack.c @@ -50,6 +50,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration */ #undef HAVE_KERNEL_HEAP diff --git a/drivers/usbhost/usbhost_cdcacm.c b/drivers/usbhost/usbhost_cdcacm.c index cbabbc5c5a..cb5c20d374 100644 --- a/drivers/usbhost/usbhost_cdcacm.c +++ b/drivers/usbhost/usbhost_cdcacm.c @@ -455,7 +455,9 @@ static struct usbhost_cdcacm_s g_prealloc[CONFIG_USBHOST_CDCACM_NPREALLOC]; static FAR struct usbhost_freestate_s *g_freelist; #endif -/* This is a bitmap that is used to allocate device minor numbers /dev/ttyACM[n]. */ +/* This is a bitmap that is used to allocate device + * minor numbers /dev/ttyACM[n]. + */ static uint32_t g_devinuse; @@ -1109,7 +1111,9 @@ static void usbhost_rxdata_work(FAR void *arg) while (priv->rxena && !priv->disconnected) #endif { - /* Stop now if there is no room for another character in the RX buffer. */ + /* Stop now if there is no room for another + * character in the RX buffer. + */ if (nexthead == rxbuf->tail) { @@ -1938,11 +1942,15 @@ usbhost_create(FAR struct usbhost_hubport_s *hport, priv->usbclass.connect = usbhost_connect; priv->usbclass.disconnected = usbhost_disconnected; - /* The initial reference count is 1... One reference is held by the driver */ + /* The initial reference count is 1... + * One reference is held by the driver + */ priv->crefs = 1; - /* Initialize semaphores (this works okay in the interrupt context) */ + /* Initialize semaphores + * (this works okay in the interrupt context) + */ nxsem_init(&priv->exclsem, 0, 1); diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index b56a3bbdb0..fa9f60b4d1 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -416,7 +416,9 @@ static const uint8_t encoding[USBHID_NUMENCODINGS] = KEYCODE_F11, KEYCODE_F12, KEYCODE_PRTSCRN, KEYCODE_SCROLLLOCK, - /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */ + /* 0x48-0x4f: Pause,Insert,Home,PageUp, + * DeleteForward,End,PageDown,RightArrow + */ KEYCODE_PAUSE, KEYCODE_INSERT, KEYCODE_HOME, KEYCODE_PAGEUP, @@ -469,7 +471,9 @@ static const uint8_t encoding[USBHID_NUMENCODINGS] = KEYCODE_COPY, KEYCODE_PASTE, KEYCODE_FIND, KEYCODE_MUTE, - /* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,=,International1 */ + /* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,, + * =,International1 + */ KEYCODE_VOLUP, KEYCODE_VOLDOWN, KEYCODE_LCAPSLOCK, KEYCODE_LNUMLOCK, @@ -1481,7 +1485,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); - /* Did we already find what we needed from a preceding interface? */ + /* Did we already find what we needed + * from a preceding interface? + */ if ((found & USBHOST_RQDFOUND) == USBHOST_RQDFOUND) { @@ -1605,7 +1611,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if (found == USBHOST_ALLFOUND) { - /* Yes.. then break out of the loop and use the preceding interface */ + /* Yes.. then break out of the loop + * and use the preceding interface + */ done = true; } @@ -1681,7 +1689,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) char devname[DEV_NAMELEN]; int ret; - /* Set aside a transfer buffer for exclusive use by the keyboard class driver */ + /* Set aside a transfer buffer for exclusive + * use by the keyboard class driver + */ ret = usbhost_tdalloc(priv); if (ret < 0) @@ -1731,7 +1741,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) (FAR char * const *)NULL); if (priv->pollpid < 0) { - /* Failed to started the poll thread... probably due to memory resources */ + /* Failed to started the poll thread... + * probably due to memory resources + */ usbhost_givesem(&g_exclsem); ret = (int)priv->pollpid; diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index 83eefaf921..b98e96c58c 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -237,7 +237,9 @@ struct usbhost_state_s struct usbhost_class_s usbclass; - /* This is an instance of the USB host driver bound to this class instance */ + /* This is an instance of the USB host driver + * bound to this class instance + */ struct usbhost_driver_s *drvr; @@ -1173,7 +1175,9 @@ static int usbhost_mouse_poll(int argc, char *argv[]) priv->sample.valid = true; - /* Indicate the availability of new sample data for this ID */ + /* Indicate the availability of new sample data + * for this ID + */ priv->sample.id = priv->id; #else @@ -1498,7 +1502,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, uinfo("Interface descriptor\n"); DEBUGASSERT(remaining >= USB_SIZEOF_IFDESC); - /* Did we already find what we needed from a preceding interface? */ + /* Did we already find what we needed from + * a preceding interface? + */ if ((found & USBHOST_ALLFOUND) == USBHOST_ALLFOUND) { @@ -1588,7 +1594,9 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, if (found == USBHOST_ALLFOUND) { - /* Yes.. then break out of the loop and use the preceding interface */ + /* Yes.. then break out of the loop + * and use the preceding interface + */ done = true; } @@ -1646,7 +1654,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) char devname[DEV_NAMELEN]; int ret; - /* Set aside a transfer buffer for exclusive use by the mouse class driver */ + /* Set aside a transfer buffer for exclusive + * use by the mouse class driver + */ ret = usbhost_tdalloc(priv); if (ret < 0) @@ -1696,7 +1706,9 @@ static inline int usbhost_devinit(FAR struct usbhost_state_s *priv) (FAR char * const *)NULL); if (priv->pollpid < 0) { - /* Failed to started the poll thread... probably due to memory resources */ + /* Failed to started the poll thread... + * probably due to memory resources + */ usbhost_givesem(&g_exclsem); ret = priv->pollpid; diff --git a/drivers/usbhost/usbhost_storage.c b/drivers/usbhost/usbhost_storage.c index 84da89199b..1d0308d3f4 100644 --- a/drivers/usbhost/usbhost_storage.c +++ b/drivers/usbhost/usbhost_storage.c @@ -1241,7 +1241,9 @@ static inline int usbhost_initvolume(FAR struct usbhost_state_s *priv) DEBUGASSERT(priv != NULL); - /* Set aside a transfer buffer for exclusive use by the mass storage driver */ + /* Set aside a transfer buffer for exclusive + * use by the mass storage driver + */ ret = usbhost_talloc(priv); if (ret < 0) @@ -1729,7 +1731,9 @@ static FAR struct usbhost_class_s * priv->crefs = 1; - /* Initialize semaphores (this works okay in the interrupt context) */ + /* Initialize semaphores + * (this works okay in the interrupt context) + */ nxsem_init(&priv->exclsem, 0, 1); diff --git a/include/nuttx/kmalloc.h b/include/nuttx/kmalloc.h index a011655ce4..a1d5170e35 100644 --- a/include/nuttx/kmalloc.h +++ b/include/nuttx/kmalloc.h @@ -150,8 +150,8 @@ extern "C" #endif #else -/* Otherwise, the kernel-space allocators are declared in include/nuttx/mm/mm.h - * and we can call them directly. +/* Otherwise, the kernel-space allocators are declared in + * include/nuttx/mm/mm.h and we can call them directly. */ #endif @@ -168,6 +168,7 @@ extern "C" * unprivileged code. * ****************************************************************************/ + /* Functions defined in group/group_malloc.c ********************************/ FAR void *group_malloc(FAR struct task_group_s *group, size_t nbytes); diff --git a/include/nuttx/mm/mm.h b/include/nuttx/mm/mm.h index afbe549e3e..bc215bda0b 100644 --- a/include/nuttx/mm/mm.h +++ b/include/nuttx/mm/mm.h @@ -1,7 +1,8 @@ /**************************************************************************** * include/nuttx/mm/mm.h * - * Copyright (C) 2007-2009, 2013-2014, 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2013-2014, 2017 Gregory Nutt. + * All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -52,6 +53,7 @@ ****************************************************************************/ /* Configuration ************************************************************/ + /* If the MCU has a small (16-bit) address capability, then we will use * a smaller chunk header that contains 16-bit size/offset information. * We will also use the smaller header on MCUs with wider addresses if @@ -111,6 +113,7 @@ #endif /* Chunk Header Definitions *************************************************/ + /* These definitions define the characteristics of allocator * * MM_MIN_SHIFT is used to define MM_MIN_CHUNK. @@ -185,10 +188,10 @@ /* Determines the size of the chunk size/offset type */ #ifdef CONFIG_MM_SMALL - typedef uint16_t mmsize_t; +typedef uint16_t mmsize_t; # define MMSIZE_MAX UINT16_MAX #else - typedef uint32_t mmsize_t; +typedef uint32_t mmsize_t; # define MMSIZE_MAX UINT32_MAX #endif @@ -366,12 +369,12 @@ void mm_takesemaphore(FAR struct mm_heap_s *heap); int mm_trysemaphore(FAR struct mm_heap_s *heap); void mm_givesemaphore(FAR struct mm_heap_s *heap); -/* Functions contained in umm_sem.c ****************************************/ +/* Functions contained in umm_sem.c *****************************************/ int umm_trysemaphore(void); void umm_givesemaphore(void); -/* Functions contained in kmm_sem.c ****************************************/ +/* Functions contained in kmm_sem.c *****************************************/ #ifdef CONFIG_MM_KERNEL_HEAP int kmm_trysemaphore(void); diff --git a/include/nuttx/wqueue.h b/include/nuttx/wqueue.h index 49988cb148..f4e7260166 100644 --- a/include/nuttx/wqueue.h +++ b/include/nuttx/wqueue.h @@ -66,8 +66,8 @@ * (which runs at the lowest of priority and may not be appropriate * if memory reclamation is of high priority). If CONFIG_SCHED_HPWORK * is enabled, then the following options can also be used: - * CONFIG_SCHED_HPNTHREADS - The number of thread in the high-priority queue's - * thread pool. Default: 1 + * CONFIG_SCHED_HPNTHREADS - The number of thread in the high-priority + * queue's thread pool. Default: 1 * CONFIG_SCHED_HPWORKPRIORITY - The execution priority of the high- * priority worker thread. Default: 224 * CONFIG_SCHED_HPWORKSTACKSIZE - The stack size allocated for the worker @@ -379,8 +379,8 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker, * * Description: * Cancel previously queued work. This removes work from the work queue. - * After work has been cancelled, it may be re-queue by calling work_queue() - * again. + * After work has been cancelled, it may be re-queue by calling + * work_queue() again. * * Input Parameters: * qid - The work queue ID diff --git a/libs/libc/misc/lib_stream.c b/libs/libc/misc/lib_stream.c index 72c87eabd1..6d05d1db3e 100644 --- a/libs/libc/misc/lib_stream.c +++ b/libs/libc/misc/lib_stream.c @@ -1,7 +1,8 @@ /**************************************************************************** * libs/libc/misc/lib_stream.c * - * Copyright (C) 2007, 2011, 2013-2014, 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011, 2013-2014, 2017 Gregory Nutt. + * All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -89,7 +90,7 @@ void lib_stream_initialize(FAR struct task_group_s *group) /* Initialize each FILE structure */ for (i = 0; i < CONFIG_NFILE_STREAMS; i++) - { + { FAR struct file_struct *stream = &list->sl_streams[i]; /* Clear the IOB */ diff --git a/mm/mm_heap/mm_free.c b/mm/mm_heap/mm_free.c index 8b55b57e42..fbe093de3b 100644 --- a/mm/mm_heap/mm_free.c +++ b/mm/mm_heap/mm_free.c @@ -151,7 +151,8 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem) * index past the tail chunk because it is always allocated. */ - andbeyond = (FAR struct mm_allocnode_s *)((FAR char *)next + next->size); + andbeyond = (FAR struct mm_allocnode_s *) + ((FAR char *)next + next->size); /* Remove the next node. There must be a predecessor, * but there may not be a successor node. @@ -167,7 +168,8 @@ void mm_free(FAR struct mm_heap_s *heap, FAR void *mem) /* Then merge the two chunks */ node->size += next->size; - andbeyond->preceding = node->size | (andbeyond->preceding & MM_ALLOC_BIT); + andbeyond->preceding = node->size | + (andbeyond->preceding & MM_ALLOC_BIT); next = (FAR struct mm_freenode_s *)andbeyond; } diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c index ed3fefd32d..6310c98952 100644 --- a/mm/mm_heap/mm_malloc.c +++ b/mm/mm_heap/mm_malloc.c @@ -203,7 +203,8 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size) { /* Get a pointer to the next node in physical memory */ - next = (FAR struct mm_freenode_s *)(((FAR char *)node) + node->size); + next = (FAR struct mm_freenode_s *) + (((FAR char *)node) + node->size); /* Create the remainder node */ diff --git a/mm/mm_heap/mm_sem.c b/mm/mm_heap/mm_sem.c index 0c34bf2436..abe41e2b7c 100644 --- a/mm/mm_heap/mm_sem.c +++ b/mm/mm_heap/mm_sem.c @@ -51,6 +51,10 @@ # include #endif +#ifdef MONITOR_MM_SEMAPHORE +# include +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -86,7 +90,6 @@ /* Define MONITOR_MM_SEMAPHORE to enable semaphore state monitoring */ #ifdef MONITOR_MM_SEMAPHORE -# include # define msemerr _err # define msemwarn _warn # define mseminfo _info diff --git a/net/bluetooth/bluetooth_container.c b/net/bluetooth/bluetooth_container.c index 0e5c19022d..0bb0754d99 100644 --- a/net/bluetooth/bluetooth_container.c +++ b/net/bluetooth/bluetooth_container.c @@ -130,9 +130,9 @@ void bluetooth_container_initialize(void) * None * * Returned Value: - * A reference to the allocated container structure. All user fields in this - * structure have been zeroed. On a failure to allocate, NULL is - * returned. + * A reference to the allocated container structure. + * All user fields in this structure have been zeroed. + * On a failure to allocate, NULL is returned. * * Assumptions: * The caller has locked the network. diff --git a/net/ieee802154/ieee802154_container.c b/net/ieee802154/ieee802154_container.c index 8ff70d0225..9e20b2d7a3 100644 --- a/net/ieee802154/ieee802154_container.c +++ b/net/ieee802154/ieee802154_container.c @@ -130,9 +130,9 @@ void ieee802154_container_initialize(void) * None * * Returned Value: - * A reference to the allocated container structure. All user fields in this - * structure have been zeroed. On a failure to allocate, NULL is - * returned. + * A reference to the allocated container structure. + * All user fields in this structure have been zeroed. + * On a failure to allocate, NULL is returned. * * Assumptions: * The caller has locked the network. diff --git a/net/igmp/igmp_group.c b/net/igmp/igmp_group.c index b74e675053..df840baeb6 100644 --- a/net/igmp/igmp_group.c +++ b/net/igmp/igmp_group.c @@ -2,7 +2,8 @@ * net/igmp/igmp_group.c * IGMP group data structure management logic * - * Copyright (C) 2010, 2013-2014, 2016, 2018 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013-2014, 2016, 2018 Gregory Nutt. + * All rights reserved. * Author: Gregory Nutt * * The NuttX implementation of IGMP was inspired by the IGMP add-on for the @@ -20,21 +21,21 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of CITEL Technologies Ltd nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ @@ -224,7 +225,8 @@ FAR struct igmp_group_s *igmp_grpallocfind(FAR struct net_driver_s *dev, * ****************************************************************************/ -void igmp_grpfree(FAR struct net_driver_s *dev, FAR struct igmp_group_s *group) +void igmp_grpfree(FAR struct net_driver_s *dev, + FAR struct igmp_group_s *group) { grpinfo("Free: %p flags: %02x\n", group, group->flags); diff --git a/net/mld/mld_group.c b/net/mld/mld_group.c index 3a543ad962..3266e94a5b 100644 --- a/net/mld/mld_group.c +++ b/net/mld/mld_group.c @@ -14,21 +14,21 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of CITEL Technologies Ltd nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * 3. Neither the name of CITEL Technologies Ltd nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY CITEL TECHNOLOGIES AND CONTRIBUTORS ``AS IS'' * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * ARE DISCLAIMED. IN NO EVENT SHALL CITEL TECHNOLOGIES OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ diff --git a/net/sixlowpan/sixlowpan_reassbuf.c b/net/sixlowpan/sixlowpan_reassbuf.c index c8f0e2a52c..329e904688 100644 --- a/net/sixlowpan/sixlowpan_reassbuf.c +++ b/net/sixlowpan/sixlowpan_reassbuf.c @@ -62,9 +62,9 @@ * Private Data ****************************************************************************/ -/* The g_free_reass is a list of reassembly buffer structures that are available for - * general use. The number of messages in this list is a system configuration - * item. Protected only by the network lock. +/* The g_free_reass is a list of reassembly buffer structures that are + * available for general use. The number of messages in this list is a + * system configuration item. Protected only by the network lock. */ static FAR struct sixlowpan_reassbuf_s *g_free_reass; @@ -75,7 +75,8 @@ static FAR struct sixlowpan_reassbuf_s *g_active_reass; /* Pool of pre-allocated reassembly buffer structures */ -static struct sixlowpan_reassbuf_s g_metadata_pool[CONFIG_NET_6LOWPAN_NREASSBUF]; +static struct sixlowpan_reassbuf_s + g_metadata_pool[CONFIG_NET_6LOWPAN_NREASSBUF]; /**************************************************************************** * Public Functions @@ -98,7 +99,7 @@ static struct sixlowpan_reassbuf_s g_metadata_pool[CONFIG_NET_6LOWPAN_NREASSBUF] ****************************************************************************/ static bool sixlowpan_compare_fragsrc(FAR struct sixlowpan_reassbuf_s *reass, - FAR const struct netdev_varaddr_s *fragsrc) + FAR const struct netdev_varaddr_s *fragsrc) { /* The addresses cannot match if they are not the same size */ @@ -245,8 +246,8 @@ void sixlowpan_reass_initialize(void) FAR struct sixlowpan_reassbuf_s *reass; int i; - /* Initialize g_free_reass, the list of reassembly buffer structures that are - * available for allocation. + /* Initialize g_free_reass, the list of reassembly buffer structures that + * are available for allocation. */ g_free_reass = NULL; @@ -314,8 +315,8 @@ FAR struct sixlowpan_reassbuf_s * #ifdef CONFIG_NET_6LOWPAN_REASS_STATIC reass = NULL; #else - /* If we cannot get a reassembly buffer instance from the free list, then we - * will have to allocate one from the kernel memory pool. + /* If we cannot get a reassembly buffer instance from the free list, + * then we will have to allocate one from the kernel memory pool. */ reass = (FAR struct sixlowpan_reassbuf_s *) @@ -428,8 +429,8 @@ void sixlowpan_reass_free(FAR struct sixlowpan_reassbuf_s *reass) sixlowpan_remove_active(reass); - /* If this is a pre-allocated reassembly buffer structure, then just put it back - * in the free list. + /* If this is a pre-allocated reassembly buffer structure, then just put it + * back in the free list. */ if (reass->rb_pool == REASS_POOL_PREALLOCATED) diff --git a/sched/group/group_leave.c b/sched/group/group_leave.c index 4394dc2436..0194000dbf 100644 --- a/sched/group/group_leave.c +++ b/sched/group/group_leave.c @@ -311,7 +311,8 @@ static inline void group_release(FAR struct task_group_s *group) ****************************************************************************/ #ifdef HAVE_GROUP_MEMBERS -static inline void group_removemember(FAR struct task_group_s *group, pid_t pid) +static inline void group_removemember(FAR struct task_group_s *group, + pid_t pid) { irqstate_t flags; int i; diff --git a/sched/init/nx_start.c b/sched/init/nx_start.c index 1557bc3efa..c74b09944a 100644 --- a/sched/init/nx_start.c +++ b/sched/init/nx_start.c @@ -193,7 +193,9 @@ volatile dq_queue_t g_waitingforfill; #endif #ifdef CONFIG_SIG_SIGSTOP_ACTION -/* This is the list of all tasks that have been stopped via SIGSTOP or SIGSTP */ +/* This is the list of all tasks that have been stopped + * via SIGSTOP or SIGSTP + */ volatile dq_queue_t g_stoppedtasks; #endif diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 658367aa99..d748439050 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -94,10 +94,10 @@ static const char g_pthreadname[] = ""; * This functions sets up parameters in the Task Control Block (TCB) in * preparation for starting a new thread. * - * pthread_argsetup() is called from task_init() and nxtask_start() to create - * a new task (with arguments cloned via strdup) or pthread_create() which - * has one argument passed by value (distinguished by the pthread boolean - * argument). + * pthread_argsetup() is called from task_init() and nxtask_start() to + * create a new task (with arguments cloned via strdup) or pthread_create() + * which has one argument passed by value (distinguished by the pthread + * boolean argument). * * Input Parameters: * tcb - Address of the new task's TCB @@ -260,7 +260,8 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, /* Allocate a TCB for the new task. */ - ptcb = (FAR struct pthread_tcb_s *)kmm_zalloc(sizeof(struct pthread_tcb_s)); + ptcb = (FAR struct pthread_tcb_s *) + kmm_zalloc(sizeof(struct pthread_tcb_s)); if (!ptcb) { serr("ERROR: Failed to allocate TCB\n"); diff --git a/sched/sched/sched_sporadic.c b/sched/sched/sched_sporadic.c index 06271b2d16..33e6439b7c 100644 --- a/sched/sched/sched_sporadic.c +++ b/sched/sched/sched_sporadic.c @@ -1037,7 +1037,9 @@ int sched_sporadic_resume(FAR struct tcb_s *tcb) unrealized = now - sporadic->eventtime; - /* Ignore very short pre-emptions that are below our timing resolution. */ + /* Ignore very short pre-emptions that are below + * our timing resolution. + */ if (unrealized > 0) { diff --git a/wireless/bluetooth/bt_buf.c b/wireless/bluetooth/bt_buf.c index 03b3225271..4c70b88d55 100644 --- a/wireless/bluetooth/bt_buf.c +++ b/wireless/bluetooth/bt_buf.c @@ -12,30 +12,31 @@ * All rights reserved. * * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: + * modification, are permitted provided that the following conditions + * are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its - * contributors may be used to endorse or promote products derived from this - * software without specific prior written permission. + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ /**************************************************************************** @@ -300,7 +301,8 @@ FAR struct bt_buf_s *bt_buf_alloc(enum bt_buf_type_e type, */ leave_critical_section(flags); - buf = (FAR struct bt_buf_s *)kmm_malloc((sizeof (struct bt_buf_s))); + buf = (FAR struct bt_buf_s *) + kmm_malloc((sizeof (struct bt_buf_s))); /* Check if we successfully allocated the buffer structure */ diff --git a/wireless/ieee802154/ieee802154_primitive.c b/wireless/ieee802154/ieee802154_primitive.c index b8bb865e58..35f03f6abf 100644 --- a/wireless/ieee802154/ieee802154_primitive.c +++ b/wireless/ieee802154/ieee802154_primitive.c @@ -51,9 +51,10 @@ * Pre-processor Definitions ****************************************************************************/ -/* NOTE: The CONFIG_IEEE802154_PRIMITIVE_IRQRESERVE options is marked as marked - * 'experimental' and with the default 0 zero because there are no interrupt - * level allocations performed by the current IEEE 802.15.4 MAC code. +/* NOTE: The CONFIG_IEEE802154_PRIMITIVE_IRQRESERVE options is marked as + * marked 'experimental' and with the default 0 zero because there are no + * interrupt level allocations performed by the current IEEE 802.15.4 MAC + * code. */ #if !defined(CONFIG_IEEE802154_PRIMITIVE_PREALLOC) || \ @@ -101,8 +102,8 @@ struct ieee802154_priv_primitive_s #if CONFIG_IEEE802154_PRIMITIVE_PREALLOC > 0 #if CONFIG_IEEE802154_PRIMITIVE_PREALLOC > CONFIG_IEEE802154_PRIMITIVE_IRQRESERVE /* The g_primfree is a list of primitive structures that are available for - * general use. The number of messages in this list is a system configuration - * item. + * general use. The number of messages in this list is a system + * configuration item. */ static struct ieee802154_priv_primitive_s *g_primfree; @@ -118,7 +119,8 @@ static struct ieee802154_priv_primitive_s *g_primfree_irq; /* Pool of pre-allocated primitive structures */ -static struct ieee802154_priv_primitive_s g_primpool[CONFIG_IEEE802154_PRIMITIVE_PREALLOC]; +static struct ieee802154_priv_primitive_s + g_primpool[CONFIG_IEEE802154_PRIMITIVE_PREALLOC]; #endif /* CONFIG_IEEE802154_PRIMITIVE_PREALLOC > 0 */ static bool g_poolinit = false; @@ -159,8 +161,8 @@ void ieee802154_primitivepool_initialize(void) int remaining = CONFIG_IEEE802154_PRIMITIVE_PREALLOC; #if CONFIG_IEEE802154_PRIMITIVE_PREALLOC > CONFIG_IEEE802154_PRIMITIVE_IRQRESERVE - /* Initialize g_primfree, the list of primitive structures that are available - * for general use. + /* Initialize g_primfree, the list of primitive structures that are + * available for general use. */ g_primfree = NULL; @@ -228,9 +230,9 @@ void ieee802154_primitivepool_initialize(void) * None * * Returned Value: - * A reference to the allocated primitive structure. All user fields in this - * structure have been zeroed. On a failure to allocate, NULL is - * returned. + * A reference to the allocated primitive structure. + * All user fields in this structure have been zeroed. + * On a failure to allocate, NULL is returned. * ****************************************************************************/ @@ -317,7 +319,9 @@ FAR struct ieee802154_primitive_s *ieee802154_primitive_allocate(void) return NULL; } - /* Remember that this primitive structure was dynamically allocated */ + /* Remember that this primitive structure + * was dynamically allocated + */ pool = POOL_PRIMITIVE_DYNAMIC; } @@ -341,8 +345,8 @@ FAR struct ieee802154_primitive_s *ieee802154_primitive_allocate(void) * Name: ieee802154_primitive_free * * Description: - * The ieee802154_primitive_free function will return a primitive structure to - * the free pool of messages if it was a pre-allocated primitive + * The ieee802154_primitive_free function will return a primitive structure + * to the free pool of messages if it was a pre-allocated primitive * structure. If the primitive structure was allocated dynamically it will * be deallocated. * diff --git a/wireless/pktradio/pktradio_metadata.c b/wireless/pktradio/pktradio_metadata.c index 67ef3bf23d..d43f3288a1 100644 --- a/wireless/pktradio/pktradio_metadata.c +++ b/wireless/pktradio/pktradio_metadata.c @@ -55,9 +55,9 @@ * Private Data ****************************************************************************/ -/* The g_free_metadata is a list of meta-data structures that are available for - * general use. The number of messages in this list is a system configuration - * item. +/* The g_free_metadata is a list of meta-data structures that are available + * for general use. The number of messages in this list is a system + * configuration item. */ static FAR struct pktradio_metadata_s *g_free_metadata; @@ -140,8 +140,8 @@ void pktradio_metadata_initialize(void) * None * * Returned Value: - * A reference to the allocated metadata structure. All user fields in this - * structure have been zeroed. On a failure to allocate, NULL is + * A reference to the allocated metadata structure. All user fields in + * this structure have been zeroed. On a failure to allocate, NULL is * returned. * ****************************************************************************/ @@ -185,10 +185,10 @@ FAR struct pktradio_metadata_s *pktradio_metadata_allocate(void) if (metadata != NULL) { - /* Zero and tag the allocated meta-data structure. */ + /* Zero and tag the allocated meta-data structure. */ - memset(metadata, 0, sizeof(struct pktradio_metadata_s)); - metadata->pm_pool = pool; + memset(metadata, 0, sizeof(struct pktradio_metadata_s)); + metadata->pm_pool = pool; } return metadata;