diff --git a/binfmt/builtin.c b/binfmt/builtin.c index fda996429f..36bae470a9 100644 --- a/binfmt/builtin.c +++ b/binfmt/builtin.c @@ -154,9 +154,8 @@ static int builtin_loadbinary(struct binary_s *binp) * Name: builtin_initialize * * Description: - * Builtin support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialzie in order to register the builtin binary format. + * In order to use the builtin binary format, this function must be called + * during system initialize to register the builtin binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that diff --git a/binfmt/elf.c b/binfmt/elf.c index d4e227c26c..8b0b061627 100644 --- a/binfmt/elf.c +++ b/binfmt/elf.c @@ -321,9 +321,8 @@ errout: * Name: elf_initialize * * Description: - * ELF support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialization in order to register the ELF binary format. + * In order to use the ELF binary format, this function must be called + * during system initialization to register the ELF binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that diff --git a/binfmt/nxflat.c b/binfmt/nxflat.c index 16fdc17e18..ec58cd5382 100644 --- a/binfmt/nxflat.c +++ b/binfmt/nxflat.c @@ -235,9 +235,9 @@ errout: * Name: nxflat_initialize * * Description: - * NXFLAT support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialization in order to register the NXFLAT binary format. + * In order to use the NxFLAT binary format, this function must be called + * during system initialization to register the NXFLAT binary + * format. * * Returned Value: * This is a NuttX internal function so it follows the convention that diff --git a/binfmt/pcode.c b/binfmt/pcode.c index e335d6ca25..c0b6034b68 100644 --- a/binfmt/pcode.c +++ b/binfmt/pcode.c @@ -62,6 +62,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Check configuration. This is not all of the configuration settings that * are required -- only the more obvious. */ @@ -522,9 +523,8 @@ static int pcode_unload(struct binary_s *binp) * Name: pcode_initialize * * Description: - * P-code support is built based on the configuration. However, in order - * to use this binary format, this function must be called during system - * initialization in order to register the P-Code binary format. + * In order to use the P-code binary format, this function must be called + * during system initialization to register the P-Code binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that diff --git a/configs/sim/src/sim_bringup.c b/configs/sim/src/sim_bringup.c index ee613ae4d4..af5ef61420 100644 --- a/configs/sim/src/sim_bringup.c +++ b/configs/sim/src/sim_bringup.c @@ -44,7 +44,6 @@ #include #include -#include #include #include #include diff --git a/configs/stm32f103-minimum/src/stm32_bringup.c b/configs/stm32f103-minimum/src/stm32_bringup.c index e751211aee..7b3cd57e12 100644 --- a/configs/stm32f103-minimum/src/stm32_bringup.c +++ b/configs/stm32f103-minimum/src/stm32_bringup.c @@ -53,8 +53,6 @@ # include #endif -#include - #include "stm32.h" #ifdef CONFIG_STM32_OTGFS diff --git a/configs/stm32l476vg-disco/src/stm32_appinit.c b/configs/stm32l476vg-disco/src/stm32_appinit.c index f921d940b1..3902bebb46 100644 --- a/configs/stm32l476vg-disco/src/stm32_appinit.c +++ b/configs/stm32l476vg-disco/src/stm32_appinit.c @@ -61,7 +61,6 @@ #include #include #include -#include #include #include "stm32l476vg-disco.h" diff --git a/include/nuttx/binfmt/builtin.h b/include/nuttx/binfmt/builtin.h index bb4594bb9a..0c17238262 100644 --- a/include/nuttx/binfmt/builtin.h +++ b/include/nuttx/binfmt/builtin.h @@ -82,9 +82,8 @@ extern "C" * Name: builtin_initialize * * Description: - * Builtin support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialzie in order to register the builtin binary format. + * In order to use the builtin binary format, this function must be called + * during system initialize to register the builtin binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that @@ -108,14 +107,11 @@ int builtin_initialize(void); void builtin_uninitialize(void); -/**************************************************************************** - * Utility Functions Provided to Applications by binfmt/libbuiltin - ****************************************************************************/ /**************************************************************************** * Name: builtin_isavail * * Description: - * Checks for availabiliy of application registerred during compile time. + * Checks for availability of application registered during compile time. * * Input Parameters: * filename - Name of the linked-in binary to be started. @@ -147,9 +143,6 @@ int builtin_isavail(FAR const char *appname); FAR const char *builtin_getname(int index); -/**************************************************************************** - * Data Set Access Functions Provided to Applications by binfmt/libbuiltin - ****************************************************************************/ /**************************************************************************** * Name: builtin_for_index * @@ -176,4 +169,3 @@ FAR const struct builtin_s *builtin_for_index(int index); #endif #endif /* __INCLUDE_NUTTX_BINFMT_BUILTIN_H */ - diff --git a/include/nuttx/binfmt/elf.h b/include/nuttx/binfmt/elf.h index f687bbd071..4176546f5d 100644 --- a/include/nuttx/binfmt/elf.h +++ b/include/nuttx/binfmt/elf.h @@ -158,9 +158,34 @@ extern "C" #endif /**************************************************************************** - * These are APIs exported by libelf (but are used only by the binfmt logic): + * Name: elf_initialize + * + * Description: + * In order to use the ELF binary format, this function must be called + * during system initialization to register the ELF binary format. + * + * Returned Value: + * This is a NuttX internal function so it follows the convention that + * 0 (OK) is returned on success and a negated errno is returned on + * failure. + * ****************************************************************************/ +int elf_initialize(void); + +/**************************************************************************** + * Name: elf_uninitialize + * + * Description: + * Unregister the ELF binary loader + * + * Returned Value: + * None + * + ****************************************************************************/ + +void elf_uninitialize(void); + /**************************************************************************** * Name: elf_init * @@ -239,39 +264,6 @@ int elf_bind(FAR struct elf_loadinfo_s *loadinfo, int elf_unload(struct elf_loadinfo_s *loadinfo); -/**************************************************************************** - * These are APIs used outside of binfmt by NuttX: - ****************************************************************************/ -/**************************************************************************** - * Name: elf_initialize - * - * Description: - * ELF support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialization in order to register the ELF binary format. - * - * Returned Value: - * This is a NuttX internal function so it follows the convention that - * 0 (OK) is returned on success and a negated errno is returned on - * failure. - * - ****************************************************************************/ - -int elf_initialize(void); - -/**************************************************************************** - * Name: elf_uninitialize - * - * Description: - * Unregister the ELF binary loader - * - * Returned Value: - * None - * - ****************************************************************************/ - -void elf_uninitialize(void); - #undef EXTERN #if defined(__cplusplus) } diff --git a/include/nuttx/binfmt/nxflat.h b/include/nuttx/binfmt/nxflat.h index 31b173209e..7b31fa0a63 100644 --- a/include/nuttx/binfmt/nxflat.h +++ b/include/nuttx/binfmt/nxflat.h @@ -130,9 +130,35 @@ extern "C" #endif /**************************************************************************** - * These are APIs exported by libnxflat (and may be used outside of NuttX): + * Name: nxflat_initialize + * + * Description: + * In order to use the NxFLAT binary format, this function must be called + * during system initialization to register the NXFLAT binary + * format. + * + * Returned Value: + * This is a NuttX internal function so it follows the convention that + * 0 (OK) is returned on success and a negated errno is returned on + * failure. + * ****************************************************************************/ +int nxflat_initialize(void); + +/**************************************************************************** + * Name: nxflat_uninitialize + * + * Description: + * Unregister the NXFLAT binary loader + * + * Returned Value: + * None + * + ****************************************************************************/ + +void nxflat_uninitialize(void); + /**************************************************************************** * Name: nxflat_verifyheader * @@ -246,39 +272,6 @@ int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo, int nxflat_unload(struct nxflat_loadinfo_s *loadinfo); -/**************************************************************************** - * These are APIs used internally only by NuttX: - ****************************************************************************/ -/**************************************************************************** - * Name: nxflat_initialize - * - * Description: - * NXFLAT support is built unconditionally. However, in order to - * use this binary format, this function must be called during system - * initialization in order to register the NXFLAT binary format. - * - * Returned Value: - * This is a NuttX internal function so it follows the convention that - * 0 (OK) is returned on success and a negated errno is returned on - * failure. - * - ****************************************************************************/ - -int nxflat_initialize(void); - -/**************************************************************************** - * Name: nxflat_uninitialize - * - * Description: - * Unregister the NXFLAT binary loader - * - * Returned Value: - * None - * - ****************************************************************************/ - -void nxflat_uninitialize(void); - #undef EXTERN #if defined(__cplusplus) } diff --git a/include/nuttx/binfmt/pcode.h b/include/nuttx/binfmt/pcode.h index 7c6b6b3606..dab6ec58fb 100644 --- a/include/nuttx/binfmt/pcode.h +++ b/include/nuttx/binfmt/pcode.h @@ -66,9 +66,8 @@ extern "C" * Name: pcode_initialize * * Description: - * P-code support is built based on the configuration. However, in order - * to use this binary format, this function must be called during system - * initialization in order to register the P-Code binary format. + * In order to use the P-code binary format, this function must be called + * during system initialization to register the P-Code binary format. * * Returned Value: * This is a NuttX internal function so it follows the convention that