diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.c b/arch/arm/src/cxd56xx/cxd56_gnss.c index ace24a84b2..0e5e61c9ca 100644 --- a/arch/arm/src/cxd56xx/cxd56_gnss.c +++ b/arch/arm/src/cxd56xx/cxd56_gnss.c @@ -160,6 +160,12 @@ struct cxd56_gnss_shared_info_s uint32_t argv[GNSS_SHARED_INFO_MAX_ARGC]; }; +struct cxd56_devsig_table_s +{ + uint8_t sigtype; + cxd56_cpu1sighandler_t handler; +}; + struct cxd56_gnss_dev_s { sem_t devsem; @@ -2037,7 +2043,9 @@ static FAR char *cxd56_gnss_read_cep_file(FAR FILE *fp, int32_t offset, return buf; - /* send signal to CPU1 in error for just notify completion of read sequence */ + /* Send signal to CPU1 in error for just notify completion of read + * sequence. + */ _err1: free(buf); @@ -2829,62 +2837,50 @@ static int cxd56_gnss_register(FAR const char *devpath) FAR struct cxd56_gnss_dev_s *priv; int i; int ret; - static struct + + static struct cxd56_devsig_table_s devsig_table[] = { - uint8_t sigtype; - cxd56_cpu1sighandler_t handler; - } devsig_table[] = - { { CXD56_CPU1_DATA_TYPE_GNSS, cxd56_gnss_default_sighandler }, - { CXD56_CPU1_DATA_TYPE_AGPS, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_RTK, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_GPSEPHEMERIS, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_GLNEPHEMERIS, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_SPECTRUM, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_PVTLOG, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_CPUFIFOAPI, cxd56_gnss_cpufifoapi_signalhandler }, - { CXD56_CPU1_DATA_TYPE_SBAS, cxd56_gnss_common_signalhandler }, - { CXD56_CPU1_DATA_TYPE_DCREPORT, cxd56_gnss_common_signalhandler } - }; + }; priv = (FAR struct cxd56_gnss_dev_s *)kmm_malloc( sizeof(struct cxd56_gnss_dev_s)); diff --git a/arch/arm/src/cxd56xx/cxd56_usbdev.c b/arch/arm/src/cxd56xx/cxd56_usbdev.c index ba282d1b8b..ccb3de858c 100644 --- a/arch/arm/src/cxd56xx/cxd56_usbdev.c +++ b/arch/arm/src/cxd56xx/cxd56_usbdev.c @@ -563,7 +563,9 @@ static const struct usbdev_ops_s g_devops = .pullup = cxd56_pullup, }; -/* There is only one, single, pre-allocated instance of the driver structure */ +/* There is only one, single, pre-allocated instance of the driver + * structure. + */ static struct cxd56_usbdev_s g_usbdev; @@ -1622,7 +1624,9 @@ static int cxd56_epinterrupt(int irq, FAR void *context) cxd56_txdmacomplete(privep); - /* Clear NAK to raise IN interrupt for send next IN packets */ + /* Clear NAK to raise IN interrupt for send next IN + * packets. + */ putreg32(ctrl | USB_CNAK, CXD56_USB_IN_EP_CONTROL(n)); } @@ -1718,7 +1722,9 @@ static int cxd56_epinterrupt(int irq, FAR void *context) priv->ep0datlen += len; } - /* Dispatch to cxd56_ep0setup if received all OUT data */ + /* Dispatch to cxd56_ep0setup if received all OUT + * data. + */ if (priv->ep0datlen == priv->ep0reqlen) { @@ -1791,7 +1797,9 @@ static int cxd56_epinterrupt(int irq, FAR void *context) if (!(stat & USB_INT_MRXFIFOEMPTY)) { - /* Flush Receive FIFO and clear NAK to finish status stage */ + /* Flush Receive FIFO and clear NAK to finish status + * stage. + */ putreg32(ctrl | USB_MRXFLUSH, CXD56_USB_OUT_EP_CONTROL(n)); @@ -2467,7 +2475,9 @@ static int cxd56_epsubmit(FAR struct usbdev_ep_s *ep, if (priv->ctrl.req == USB_REQ_SETCONFIGURATION || priv->ctrl.req == USB_REQ_SETINTERFACE) { - /* Nothing to transfer -- exit success, with zero bytes transferred */ + /* Nothing to transfer -- exit success, with zero bytes + * transferred + */ usbtrace(TRACE_COMPLETE(privep->epphy), privreq->req.xfrd); cxd56_reqcomplete(privep, OK); diff --git a/binfmt/libnxflat/libnxflat_bind.c b/binfmt/libnxflat/libnxflat_bind.c index 4267264f43..01de7df901 100644 --- a/binfmt/libnxflat/libnxflat_bind.c +++ b/binfmt/libnxflat/libnxflat_bind.c @@ -43,8 +43,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) @@ -57,14 +57,6 @@ # define nxflat_dumpbuffer(m,b,n) #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -75,7 +67,8 @@ * Description: * Perform the NXFLAT_RELOC_TYPE_REL32I binding: * - * Meaning: Object file contains a 32-bit offset into I-Space at the offset. + * Meaning: Object file contains a 32-bit offset into I-Space at the + * offset. * Fixup: Add mapped I-Space address to the offset. * * Returned Value: @@ -114,7 +107,8 @@ static inline int nxflat_bindrel32i(FAR struct nxflat_loadinfo_s *loadinfo, * Description: * Perform the NXFLAT_RELOC_TYPE_REL32D binding: * - * Meaning: Object file contains a 32-bit offset into D-Space at the offset. + * Meaning: Object file contains a 32-bit offset into D-Space at the + * offset. * Fixup: Add allocated D-Space address to the offset. * * Returned Value: @@ -175,10 +169,13 @@ static inline int nxflat_bindrel32id(FAR struct nxflat_loadinfo_s *loadinfo, if (offset < loadinfo->dsize) { - addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); + addr = (FAR uint32_t *)(offset + loadinfo->dspace->region); binfo(" Before: %08x\n", *addr); - *addr += ((uint32_t)loadinfo->ispace - (uint32_t)(loadinfo->dspace->region)); + + *addr += ((uint32_t)loadinfo->ispace - + (uint32_t)(loadinfo->dspace->region)); binfo(" After: %08x\n", *addr); + return OK; } else @@ -268,36 +265,42 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) switch (NXFLAT_RELOC_TYPE(reloc.r_info)) { /* NXFLAT_RELOC_TYPE_REL32I Meaning: Object file contains a 32-bit - * offset into I-Space at the offset. - * Fixup: Add mapped I-Space address to the + * offset into I-Space at the * offset. + * Fixup: Add mapped I-Space address + * to the offset. */ case NXFLAT_RELOC_TYPE_REL32I: { - result = nxflat_bindrel32i(loadinfo, NXFLAT_RELOC_OFFSET(reloc.r_info)); + result = nxflat_bindrel32i(loadinfo, + NXFLAT_RELOC_OFFSET(reloc.r_info)); } break; - /* NXFLAT_RELOC_TYPE_REL32D Meaning: Object file contains a 32-bit offset - * into D-Space at the offset. - * Fixup: Add allocated D-Space address to the + /* NXFLAT_RELOC_TYPE_REL32D Meaning: Object file contains a 32-bit + * offset into D-Space at the * offset. + * Fixup: Add allocated D-Space address + * to the offset. */ case NXFLAT_RELOC_TYPE_REL32D: { - result = nxflat_bindrel32d(loadinfo, NXFLAT_RELOC_OFFSET(reloc.r_info)); + result = nxflat_bindrel32d(loadinfo, + NXFLAT_RELOC_OFFSET(reloc.r_info)); } break; - /* NXFLAT_RELOC_TYPE_REL32ID Meaning: Object file contains a 32-bit offset - * into I-Space at the offset that will - * unfortunately be references relative - * to the GOT - * Fixup: Add allocated the mapped I-Space - * address MINUS the allocated D-Space - * address to the offset. + /* NXFLAT_RELOC_TYPE_REL32ID Meaning: Object file contains a 32-bit + * offset into I-Space at the + * offset that will unfortunately + * be references relative to the + * GOT + * Fixup: Add allocated the mapped + * I-Space address MINUS the + * allocated D-Space address to + * the offset. */ #ifdef NXFLAT_RELOC_TYPE_REL32ID @@ -436,7 +439,8 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, for (i = 0; i < nimports; i++) { binfo("Import[%d] (%08p) offset: %08x func: %08x\n", - i, &imports[i], imports[i].i_funcname, imports[i].i_funcaddress); + i, &imports[i], imports[i].i_funcname, + imports[i].i_funcaddress); /* Get a pointer to the imported symbol name. The name itself * lies in the TEXT segment. But the reference to the name @@ -518,10 +522,10 @@ static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) int ret; #endif - /* .bss resides within the D-Space allocation. If CONFIG_ARCH_ADDRENV=y, then - * that D-Space allocation lies in an address environment that may not be - * in place. So, in that case, we must call nxflat_addrenv_select to - * temporarily instantiate that address space before the .bss can be + /* .bss resides within the D-Space allocation. If CONFIG_ARCH_ADDRENV=y, + * then that D-Space allocation lies in an address environment that may + * not be in place. So, in that case, we must call nxflat_addrenv_select + * to temporarily instantiate that address space before the .bss can be * accessed. */ @@ -564,8 +568,8 @@ static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) * Description: * Bind the imported symbol names in the loaded module described by * 'loadinfo' using the exported symbol values provided by 'symtab'. - * After binding the module, clear the BSS region (which held the relocation - * data) in preparation for execution. + * After binding the module, clear the BSS region (which held the + * relocation data) in preparation for execution. * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on @@ -578,7 +582,8 @@ int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo, { /* Bind the imported symbol, absolute relocations separately. This is done * before the standard relocations because that logic may modify the - * import list (for the better hopefully, but we don't want to depend on it). + * import list (for the better hopefully, but we don't want to depend on + * it). */ int ret = nxflat_bindimports(loadinfo, exports, nexports); diff --git a/fs/procfs/fs_procfsmeminfo.c b/fs/procfs/fs_procfsmeminfo.c index d1f0decfc2..661d65599e 100644 --- a/fs/procfs/fs_procfsmeminfo.c +++ b/fs/procfs/fs_procfsmeminfo.c @@ -281,8 +281,10 @@ static ssize_t meminfo_read(FAR struct file *filep, FAR char *buffer, /* The first line is the headers */ - linesize = snprintf(procfile->line, MEMINFO_LINELEN, - " total used free largest\n"); + linesize = + snprintf(procfile->line, MEMINFO_LINELEN, + " total used free largest\n"); + copysize = procfs_memcpy(procfile->line, linesize, buffer, buflen, &offset); totalsize = copysize; diff --git a/include/arpa/inet.h b/include/arpa/inet.h index afb9d064a4..ae46379bb7 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -104,7 +104,8 @@ in_addr_t inet_netof(struct in_addr in); struct in_addr inet_makeaddr(in_addr_t net, in_addr_t host); int inet_pton(int af, FAR const char *src, FAR void *dst); -const char *inet_ntop(int af, FAR const void *src, FAR char *dst, socklen_t size); +const char *inet_ntop(int af, FAR const void *src, FAR char *dst, + socklen_t size); #undef EXTERN #ifdef __cplusplus diff --git a/include/nuttx/compiler.h b/include/nuttx/compiler.h index aef87bb58a..1dd5b84f42 100644 --- a/include/nuttx/compiler.h +++ b/include/nuttx/compiler.h @@ -604,7 +604,9 @@ # undef CONFIG_HAVE_CXX14 -/* ISO C11 supports anonymous (unnamed) structures and unions. Does ICCARM? */ +/* ISO C11 supports anonymous (unnamed) structures and unions. Does + * ICCARM? + */ # undef CONFIG_HAVE_ANONYMOUS_STRUCT # undef CONFIG_HAVE_ANONYMOUS_UNION diff --git a/include/signal.h b/include/signal.h index 95f95a31a3..5045c2a73b 100644 --- a/include/signal.h +++ b/include/signal.h @@ -38,6 +38,7 @@ /******************************************************************************** * Pre-processor Definitions ********************************************************************************/ + /* Signal set management definitions and macros. */ #define NULL_SIGNAL_SET ((sigset_t)0x00000000) @@ -258,7 +259,7 @@ #endif /******************************************************************************** - * Public Type Definitions + * Public Types ********************************************************************************/ /* This defines a set of 32 signals (numbered 0 through 31). @@ -401,12 +402,20 @@ int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *value); #else /* __INCLUDE_SIGNAL_H */ -#include - /* Avoid circular dependencies by assuring that simple type definitions are * available in any inclusion ordering. */ +/******************************************************************************** + * Included Files + ********************************************************************************/ + +#include + +/******************************************************************************** + * Public Types + ********************************************************************************/ + #ifndef __SIGSET_T_DEFINED typedef uint32_t sigset_t; # define __SIGSET_T_DEFINED 1 diff --git a/include/stdlib.h b/include/stdlib.h index 16912dfc59..004fe01f59 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -79,7 +79,7 @@ struct mallinfo int uordblks; /* This is the total size of memory occupied by * chunks handed out by malloc. */ int fordblks; /* This is the total size of memory occupied - * by free (not in use) chunks.*/ + * by free (not in use) chunks. */ }; /* Structure type returned by the div() function. */ diff --git a/libs/libc/net/lib_inetntoa.c b/libs/libc/net/lib_inetntoa.c index e4078eb63d..bc7d334c6e 100644 --- a/libs/libc/net/lib_inetntoa.c +++ b/libs/libc/net/lib_inetntoa.c @@ -41,8 +41,8 @@ * Description: * The inet_ntoa() function converts the Internet host address given in * network byte order to a string in standard numbers-and-dots notation. - * The string is returned in a statically allocated buffer, which subsequent - * calls will overwrite. + * The string is returned in a statically allocated buffer, which + * subsequent calls will overwrite. * ****************************************************************************/