Hi Greg, Patch fixes some typos and also few factually incorrect source code comments.
Best Regards, Juha Niskanen
From 6d586d655de5c5385a6ee746c8e45be9c9351f2b Mon Sep 17 00:00:00 2001 From: Juha Niskanen <juha.niska...@haltian.com> Date: Mon, 20 Jan 2020 12:59:49 +0200 Subject: [PATCH] Fix typos and some incorrect comments --- ReleaseNotes | 4 ++-- arch/arm/include/spinlock.h | 6 +++--- arch/arm/src/armv7-r/arm_gicv2.c | 2 +- arch/arm/src/armv7-r/gic.h | 4 ++-- arch/arm/src/cxd56xx/cxd56_scu.c | 2 +- arch/arm/src/kinetis/kinetis_i2c.c | 3 +-- arch/arm/src/lpc43xx/lpc43_i2c.c | 2 +- arch/arm/src/lpc43xx/lpc43_serial.c | 2 +- arch/arm/src/stm32/stm32_hciuart.c | 12 ------------ arch/arm/src/stm32/stm32_hciuart.h | 12 ------------ arch/arm/src/str71x/str71x_prccu.c | 4 ++-- arch/arm/src/tiva/cc13xx/cc13xx_prcm.h | 4 ++-- arch/arm/src/tiva/common/tiva_hciuart.c | 6 ------ arch/arm/src/tiva/tiva_hciuart.h | 12 ------------ arch/avr/src/at90usb/at90usb_usbdev.c | 2 +- arch/risc-v/include/spinlock.h | 8 ++++---- fs/hostfs/hostfs.c | 2 +- fs/vfs/fs_write.c | 2 +- include/nuttx/fs/fs.h | 2 +- include/nuttx/usb/cdcacm.h | 2 +- include/nuttx/wireless/bluetooth/bt_uuid.h | 2 +- libs/libc/pthread/pthread_spinlock.c | 10 +++++----- net/socket/sendto.c | 4 ++-- sched/Kconfig | 2 +- sched/clock/clock_timespec_add.c | 2 +- sched/clock/clock_timespec_subtract.c | 2 +- 26 files changed, 36 insertions(+), 79 deletions(-) diff --git a/ReleaseNotes b/ReleaseNotes index 72b478d..4feea7f 100644 --- a/ReleaseNotes +++ b/ReleaseNotes @@ -21912,7 +21912,7 @@ Additional new features and extended functionality: number as an argument. This makes it possible to have multiple instances of the NX server running on boards that support multiple displays. Also includes updates to boardctl() to accept display - number paramters. From Gregory Nutt. + number parameters. From Gregory Nutt. - Graphics: nx_openwindow() and nxtk_openwindow() now accept an additional 'flag' parameter. This argument is current used only to select a RAM backed, per-window framebuffer. From Gregory Nutt. @@ -26590,7 +26590,7 @@ information): - apps/system/cu/: (1) Fix early exit. getc(stdin) can return 0 the first time around. (2) Set optind to zero. getopt() was being left in a bad state, causing parsing errors on second use. (3) Fix - priority of cu_listen(). (4) Add suppor for -h. From David + priority of cu_listen(). (4) Add support for -h. From David Alessio. - apps/system/lzf/: Check the protection by CONFIG_SYSTEM_LZF != CONFIG_m (not elf binary) instead of CONFIG_KERNEL_BUILD. From diff --git a/arch/arm/include/spinlock.h b/arch/arm/include/spinlock.h index 7566f4c..ff9f41e 100644 --- a/arch/arm/include/spinlock.h +++ b/arch/arm/include/spinlock.h @@ -101,12 +101,12 @@ /* The Type of a spinlock. * - * ARMv6 architecture introuced the concept of exclusive accesses to memory + * ARMv6 architecture introduced the concept of exclusive accesses to memory * locations in the form of the Load-Exclusive (LDREX) and Store-Exclusive * (STREX) instructions in ARM and Thumb instruction sets. ARMv6K extended * this to included byte, halfword, and doubleword variants of LDREX and - * STREX. ARMv7-M supports byte and halfword, but not the doubleword varient - * (ARMv6-M does not support exclusive access) + * STREX. ARMv7-M supports byte and halfword, but not the doubleword variant + * (ARMv6-M does not support exclusive access). * * ARM architectures prior to ARMv6 supported SWP and SWPB instructions that * atomically swap a 32-bit word for byte value between a register and a diff --git a/arch/arm/src/armv7-r/arm_gicv2.c b/arch/arm/src/armv7-r/arm_gicv2.c index f147481..3a47de6 100644 --- a/arch/arm/src/armv7-r/arm_gicv2.c +++ b/arch/arm/src/armv7-r/arm_gicv2.c @@ -503,7 +503,7 @@ int up_prioritize_irq(int irq, int priority) * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent * only to the current CPU. * - * Input Paramters + * Input Parameters * sgi - The SGI interrupt ID (0-15) * cpuset - The set of CPUs to receive the SGI * diff --git a/arch/arm/src/armv7-r/gic.h b/arch/arm/src/armv7-r/gic.h index 2e6042b..355c8e7 100644 --- a/arch/arm/src/armv7-r/gic.h +++ b/arch/arm/src/armv7-r/gic.h @@ -569,12 +569,12 @@ uint32_t *arm_decodeirq(uint32_t *regs); * If CONFIG_SMP is not selected, the cpuset is ignored and SGI is sent * only to the current CPU. * - * Input Paramters + * Input Parameters * sgi - The SGI interrupt ID (0-15) * cpuset - The set of CPUs to receive the SGI * * Returned Value: - * OK is always retured at present. + * OK is always returned at present. * ****************************************************************************/ diff --git a/arch/arm/src/cxd56xx/cxd56_scu.c b/arch/arm/src/cxd56xx/cxd56_scu.c index 9c14a14..cedd085 100644 --- a/arch/arm/src/cxd56xx/cxd56_scu.c +++ b/arch/arm/src/cxd56xx/cxd56_scu.c @@ -2163,7 +2163,7 @@ static int seq_setadjustment(FAR struct seq_s *seq, * Description: * Set MATHFUNC IIR filter feature * - * Input Paramters: + * Input Parameters: * fifo - An instance of FIFO * pos - Where to IIR filter inserted * iir - IIR filter coefficiencies diff --git a/arch/arm/src/kinetis/kinetis_i2c.c b/arch/arm/src/kinetis/kinetis_i2c.c index 11ca2eb..5472c95 100644 --- a/arch/arm/src/kinetis/kinetis_i2c.c +++ b/arch/arm/src/kinetis/kinetis_i2c.c @@ -1395,8 +1395,7 @@ struct i2c_master_s *kinetis_i2cbus_initialize(int port) #endif default: - i2cerr("ERROR: Kinetis I2C Only suppors ports 0 and %d\n", - KINETIS_NI2C - 1); + i2cerr("ERROR: Unsupported I2C port %d\n", port); return NULL; } diff --git a/arch/arm/src/lpc43xx/lpc43_i2c.c b/arch/arm/src/lpc43xx/lpc43_i2c.c index 5f0cf33..087b7ef 100644 --- a/arch/arm/src/lpc43xx/lpc43_i2c.c +++ b/arch/arm/src/lpc43xx/lpc43_i2c.c @@ -450,7 +450,7 @@ struct i2c_master_s *lpc43_i2cbus_initialize(int port) if (port > 1) { - i2cerr("ERROR: lpc I2C Only suppors ports 0 and 1\n"); + i2cerr("ERROR: lpc I2C only supports ports 0 and 1\n"); return NULL; } diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/arch/arm/src/lpc43xx/lpc43_serial.c index 8df1f7e..26311a6 100644 --- a/arch/arm/src/lpc43xx/lpc43_serial.c +++ b/arch/arm/src/lpc43xx/lpc43_serial.c @@ -801,7 +801,7 @@ static int up_interrupt(int irq, void *context, void *arg) * * Supported and un-supported LPC43 RS-485 features: * - * RS-485/EIA-485 Normal Multidrop Mode (NMM) -- NOT suppored + * RS-485/EIA-485 Normal Multidrop Mode (NMM) -- NOT supported * * In this mode, an address is detected when a received byte causes the * USART to set the parity error and generate an interrupt. When the diff --git a/arch/arm/src/stm32/stm32_hciuart.c b/arch/arm/src/stm32/stm32_hciuart.c index aec8442..96741a8 100644 --- a/arch/arm/src/stm32/stm32_hciuart.c +++ b/arch/arm/src/stm32/stm32_hciuart.c @@ -2547,12 +2547,6 @@ const struct btuart_lowerhalf_s *hciuart_instantiate(enum hciuart_devno_e uart) * Performs the low-level, one-time USART initialization. This must be * called before hciuart_instantiate. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ void hciuart_initialize(void) @@ -2609,12 +2603,6 @@ void hciuart_initialize(void) * * This function should be called from a timer or other periodic context. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ #ifdef CONFIG_STM32_HCIUART_RXDMA diff --git a/arch/arm/src/stm32/stm32_hciuart.h b/arch/arm/src/stm32/stm32_hciuart.h index 17b5c7b..c0806ba 100644 --- a/arch/arm/src/stm32/stm32_hciuart.h +++ b/arch/arm/src/stm32/stm32_hciuart.h @@ -86,12 +86,6 @@ const struct btuart_lowerhalf_s *hciuart_instantiate(enum hciuart_devno_e uart); * Performs the low-level, one-time USART initialization. This must be * called before hciuart_instantiate. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ void hciuart_initialize(void); @@ -105,12 +99,6 @@ void hciuart_initialize(void); * * This function should be called from a timer or other periodic context. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ #ifdef CONFIG_STM32_HCIUART_RXDMA diff --git a/arch/arm/src/str71x/str71x_prccu.c b/arch/arm/src/str71x/str71x_prccu.c index 0d9184c..4368c58 100644 --- a/arch/arm/src/str71x/str71x_prccu.c +++ b/arch/arm/src/str71x/str71x_prccu.c @@ -243,7 +243,7 @@ #elif STR71X_PLL1OUT_MUL == 24 # define PLL1MUL STR71X_RCCUPLL1CR_MUL24 #else -# error "Unsupporetd value for STR71X_PLL1OUT_MUL" +# error "Unsupported value for STR71X_PLL1OUT_MUL" #endif #if STR71X_PLL1OUT_DIV == 1 @@ -309,7 +309,7 @@ #elif STR71X_PLL2OUT_MUL == 28 # define PLL2MUL STR71X_PCUPPL2CR_MUL28 #else -# error "Unsupporetd value for STR71X_PLL2OUT_MUL" +# error "Unsupported value for STR71X_PLL2OUT_MUL" #endif #if STR71X_PLL2OUT_DIV == 1 diff --git a/arch/arm/src/tiva/cc13xx/cc13xx_prcm.h b/arch/arm/src/tiva/cc13xx/cc13xx_prcm.h index efcb020..a9e1a47 100644 --- a/arch/arm/src/tiva/cc13xx/cc13xx_prcm.h +++ b/arch/arm/src/tiva/cc13xx/cc13xx_prcm.h @@ -719,7 +719,7 @@ bool prcm_powerdomain_status(uint32_t domains); * system controller in the AON domain a call to this function should always * be followed by a call to prcm_load_set(). * - * Input Paramters: + * Input Parameters: * peripheral - The peripheral to enable. This is an encoded value. See the * PRCRM_PERIPH_* definitions for available encodings. * @@ -749,7 +749,7 @@ void prcm_periph_runenable(uint32_t peripheral); * ensure that the peripheral is not accessed in this interval as this might * cause the system to hang. * - * Input Paramters: + * Input Parameters: * peripheral - The peripheral to enable. This is an encoded value. See the * PRCRM_PERIPH_* definitions for available encodings. * diff --git a/arch/arm/src/tiva/common/tiva_hciuart.c b/arch/arm/src/tiva/common/tiva_hciuart.c index fefe913..eb5f3a3 100644 --- a/arch/arm/src/tiva/common/tiva_hciuart.c +++ b/arch/arm/src/tiva/common/tiva_hciuart.c @@ -1813,12 +1813,6 @@ hciuart_instantiate(enum hciuart_devno_e uart) * Performs the low-level, one-time UART initialization. This must be * called before hciuart_instantiate. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ void hciuart_initialize(void) diff --git a/arch/arm/src/tiva/tiva_hciuart.h b/arch/arm/src/tiva/tiva_hciuart.h index 7b954ef..19d77a8 100644 --- a/arch/arm/src/tiva/tiva_hciuart.h +++ b/arch/arm/src/tiva/tiva_hciuart.h @@ -104,12 +104,6 @@ hciuart_instantiate(enum hciuart_devno_e uart); * Performs the low-level, one-time USART initialization. This must be * called before hciuart_instantiate. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ void hciuart_initialize(void); @@ -123,12 +117,6 @@ void hciuart_initialize(void); * * This function should be called from a timer or other periodic context. * - * Input Paramters: - * None - * - * Returned Value: - * None - * ****************************************************************************/ #ifdef CONFIG_TIVA_HCIUART_RXDMA diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index f9c7cc7..dba4581 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -79,7 +79,7 @@ # define USB_PLL_PSC ((1 << PLLP2) | (1 << PLLP0)) # endif #else -# error "Unsuppored CPU clock" +# error "Unsupported CPU clock" #endif /* Debug ***********************************************************************/ diff --git a/arch/risc-v/include/spinlock.h b/arch/risc-v/include/spinlock.h index a34971b..eb6127c 100644 --- a/arch/risc-v/include/spinlock.h +++ b/arch/risc-v/include/spinlock.h @@ -87,10 +87,10 @@ /* The Type of a spinlock. * - * RISC-V architecture introuced the concept of exclusive accesses to memory - * locations in the form of the Load-Reserved (LR) and Store-Conditional - * (SC) instructions. RV64 supports doubleword aligned data only but others - * supports word aligned data. + * RISC-V architecture (in the standard atomic-instruction extension "A") + * supports exclusive accesses to memory locations in the form of the + * Load-Reserved (LR) and Store-Conditional (SC) instructions. RV64 supports + * doubleword aligned data only but others supports word aligned data. * * RISC-V architecture supports fence instruction to ensure memory ordering */ diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index 4dff06d..e2cec8b 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -929,7 +929,7 @@ static int hostfs_bind(FAR struct inode *blkdriver, FAR const void *data, return -ENOMEM; } - /* The options we suppor are: + /* The options we support are: * "fs=whatever", remote dir */ diff --git a/fs/vfs/fs_write.c b/fs/vfs/fs_write.c index d99ed2d..58986b1 100644 --- a/fs/vfs/fs_write.c +++ b/fs/vfs/fs_write.c @@ -67,7 +67,7 @@ * Equivalent to the standard write() function except that is accepts a * struct file instance instead of a file descriptor. It is functionally * equivalent to write() except that in addition to the differences in - * input paramters: + * input parameters: * * - It does not modify the errno variable, * - It is not a cancellation point, and diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 641a3ce..b4687d0 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -1075,7 +1075,7 @@ ssize_t nx_read(int fd, FAR void *buf, size_t nbytes); * Equivalent to the standard write() function except that is accepts a * struct file instance instead of a file descriptor. It is functionally * equivalent to write() except that in addition to the differences in - * input paramters: + * input parameters: * * - It does not modify the errno variable, * - It is not a cancellation point, and diff --git a/include/nuttx/usb/cdcacm.h b/include/nuttx/usb/cdcacm.h index eba6210..b83c4fd 100644 --- a/include/nuttx/usb/cdcacm.h +++ b/include/nuttx/usb/cdcacm.h @@ -368,7 +368,7 @@ int cdcacm_classobject(int minor, FAR struct usbdev_devinfo_s *devinfo, * * Returned Value: * Zero (OK) means that the driver was successfully registered. On any - * failure, a negated errno value is retured. + * failure, a negated errno value is returned. * ****************************************************************************/ diff --git a/include/nuttx/wireless/bluetooth/bt_uuid.h b/include/nuttx/wireless/bluetooth/bt_uuid.h index 7b956a8..d12cb7c 100644 --- a/include/nuttx/wireless/bluetooth/bt_uuid.h +++ b/include/nuttx/wireless/bluetooth/bt_uuid.h @@ -205,7 +205,7 @@ struct bt_uuid_s * Compares 2 Bluetooth UUIDs, if the types are different both UUIDs are * first converted to 128 bits format before comparing. * - * Input Paramters: + * Input Parameters: * u1 - First Bluetooth UUID to compare * u2 - Second Bluetooth UUID to compare * diff --git a/libs/libc/pthread/pthread_spinlock.c b/libs/libc/pthread/pthread_spinlock.c index 56639dc..e6f736e 100644 --- a/libs/libc/pthread/pthread_spinlock.c +++ b/libs/libc/pthread/pthread_spinlock.c @@ -173,7 +173,7 @@ int pthread_spin_destroy(pthread_spinlock_t *lock) * * Returned Value: * Zero is returned if the lock was successfully acquired. Otherwise one - * of the following errno values are retured: + * of the following errno values are returned: * * EINVAL - 'lock' does not refer to a valid spinlock object * EDEADLOCK - The caller already holds the spinlock @@ -238,7 +238,7 @@ int pthread_spin_lock(pthread_spinlock_t *lock) * * Returned Value: * Zero is returned if the lock was successfully acquired. Otherwise one - * of the following errno values are retured: + * of the following errno values are returned: * * EINVAL - 'lock' does not refer to a valid spinlock object * EBUSY - The spinlock is held by another thread @@ -305,11 +305,11 @@ int pthread_spin_trylock(pthread_spinlock_t *lock) * lock - A reference to the spinlock object to unlock. * * Returned Value: - * Zero is returned if the lock was successfully acquired. Otherwise one - * of the following errno values are retured: + * Zero is returned if the lock was successfully released. Otherwise one + * of the following errno values are returned: * * EINVAL - 'lock' does not refer to a valid spinlock object - * EDEADLOCK - The caller already holds the spinlock + * EPERM - The caller does not hold the spinlock or it is not locked * ****************************************************************************/ diff --git a/net/socket/sendto.c b/net/socket/sendto.c index cfb64df..55efcce 100644 --- a/net/socket/sendto.c +++ b/net/socket/sendto.c @@ -190,8 +190,8 @@ ssize_t psock_sendto(FAR struct socket *psock, FAR const void *buf, * tolen The length of the address structure * * Returned Value: - * On success, returns the number of characters sent. On any failure, a - * negated errno value is returned. One of: + * On success, returns the number of characters sent. On error, + * -1 is returned, and errno is set appropriately: * * EAGAIN or EWOULDBLOCK * The socket is marked non-blocking and the requested operation diff --git a/sched/Kconfig b/sched/Kconfig index 52b9e1d..8fcce87 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -455,7 +455,7 @@ config RR_INTERVAL default 0 ---help--- The round robin timeslice will be set this number of milliseconds; - Round roben scheduling (SCHED_RR) is enabled by setting this + Round robin scheduling (SCHED_RR) is enabled by setting this interval to a positive, non-zero value. config SCHED_SPORADIC diff --git a/sched/clock/clock_timespec_add.c b/sched/clock/clock_timespec_add.c index 08bf634..7c9882b 100644 --- a/sched/clock/clock_timespec_add.c +++ b/sched/clock/clock_timespec_add.c @@ -56,7 +56,7 @@ * * Input Parameters: * ts1 and ts2: The two timespecs to be added - * t23: The location to return the result (may be ts1 or ts2) + * ts3: The location to return the result (may be ts1 or ts2) * * Returned Value: * None diff --git a/sched/clock/clock_timespec_subtract.c b/sched/clock/clock_timespec_subtract.c index 873dd75..c6c547d 100644 --- a/sched/clock/clock_timespec_subtract.c +++ b/sched/clock/clock_timespec_subtract.c @@ -57,7 +57,7 @@ * * Input Parameters: * ts1 and ts2: The two timespecs to be subtracted (ts1 - ts2) - * t23: The location to return the result (may be ts1 or ts2) + * ts3: The location to return the result (may be ts1 or ts2) * * Returned Value: * None -- 2.7.4