[nxstyle]: fix Inconsistency in function headers style

added to the end of the header a new line *

added space

Doc Function Headers
https://nuttx.apache.org/docs/latest/contributing/coding_style.html#function-headers

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18 2025-05-19 11:28:11 +02:00 committed by Xiang Xiao
parent 641e8daaef
commit 9520f5bfc8
21 changed files with 84 additions and 43 deletions

View file

@ -484,7 +484,8 @@ static int cxd56_i2c_interrupt(int irq, void *context, void *arg)
* if the interrupt occurs when the writing request.
* Actual receiving data is in RX_FULL interrupt handler.
*
* TODO : The argument "last" is not used.
* TODO : The argument "last" is not used.
*
****************************************************************************/
static int cxd56_i2c_receive(struct cxd56_i2cdev_s *priv, int last)
@ -588,8 +589,9 @@ static int cxd56_i2c_send(struct cxd56_i2cdev_s *priv, int last)
* Description:
* Perform a sequence of I2C transfers
*
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
*
****************************************************************************/
static int cxd56_i2c_transfer(struct i2c_master_s *dev,
@ -833,7 +835,7 @@ out:
cxd56_i2c_clock_gate_enable(priv->port);
/* Release the port for re-use by other clients */
/* Release the port for reuse by other clients */
nxmutex_unlock(&priv->lock);
return ret;

View file

@ -209,6 +209,7 @@ void efm32_flash_unlock(void)
* -EBUSY - Busy timeout.
* -EINVAL - Operation tried to access a non-flash area.
* -EACCES - Operation tried to access a locked area of the flash.
*
****************************************************************************/
int __ramfunc__ msc_load_verify_address(uint32_t *address)

View file

@ -149,7 +149,7 @@ static void gd32_gpio_clock_enable(uint32_t port_base)
regaddr = GD32_RCU_AHB1EN;
/* Check clock if alreay enable. */
/* Check clock if already enable. */
if (rcu_en != (rcu_en & getreg32(regaddr)))
{
@ -213,6 +213,7 @@ static inline bool gd32_gpio_input_get(uint32_t port_base, uint32_t pin)
*
* Description:
* Configure a GPIO pin as the Alternative function.
*
****************************************************************************/
static void gd32_gpio_af_config(uint32_t cfgset, uint32_t port_base,
@ -246,6 +247,7 @@ static void gd32_gpio_af_config(uint32_t cfgset, uint32_t port_base,
*
* Description:
* Configure a GPIO pin's Alternative function as reset value.
*
****************************************************************************/
static void gd32_gpio_af_unconfig(uint32_t cfgset, uint32_t port_base,

View file

@ -252,6 +252,7 @@ EXTERN const uint32_t g_gpio_base[GD32_NGPIO_PORTS];
* Return value:
* OK on success
* A negated errno value on invalid port or mode.
*
****************************************************************************/
int gd32_gpio_config(uint32_t cfgset);

View file

@ -652,6 +652,7 @@ void gd32_rcu_ckout0_config(uint32_t src, uint32_t div)
* Description:
* Configure the CK_OUT0 clock source and divider. CK_OUT0 is connected
* to PC9. PC9 should be configured in alternate function mode.
*
****************************************************************************/
void gd32_rcu_ckout1_config(uint32_t src, uint32_t div)

View file

@ -81,6 +81,7 @@ void gd32_clockconfig(void);
* Description:
* Configure the CK_OUT0 clock source and divider. CK_OUT0 is connected
* to PA8. PA8 should be configured in alternate function mode.
*
****************************************************************************/
void gd32_rcu_ckout0_config(uint32_t src, uint32_t div);
@ -91,6 +92,7 @@ void gd32_rcu_ckout0_config(uint32_t src, uint32_t div);
* Description:
* Configure the CK_OUT0 clock source and divider. CK_OUT0 is connected
* to PC9. PC9 should be configured in alternate function mode.
*
****************************************************************************/
void gd32_rcu_ckout1_config(uint32_t src, uint32_t div);

View file

@ -395,6 +395,7 @@ static int lc823450_ioctl(struct mtd_dev_s *dev, int cmd,
*
* Precondition:
* Semaphore has been taken.
*
****************************************************************************/
static int mtd_mediainitialize(struct lc823450_mtd_dev_s *dev)
@ -504,6 +505,7 @@ exit_with_error:
*
* Precondition:
* Semaphore has been taken.
*
****************************************************************************/
static struct mtd_dev_s *lc823450_mtd_allocdev(uint32_t channel)

View file

@ -1923,6 +1923,7 @@ void usbdev_msc_stop(void)
*
* return value : 0 : charger was not detected.
* !0 : charger was detected.
*
****************************************************************************/
int usbdev_is_usbcharger(void)

View file

@ -42,7 +42,7 @@
*
* This lower-half supports multiple drivers (/dev/adc0, /dev/adc1, etc.)
* that each may read data from any of the ADC ports. The driver reads
* whichever ADC ports are needed by ANY of ther drivers in strict
* whichever ADC ports are needed by ANY of the drivers in strict
* round-robin fashion, passing the converted values to the drivers that
* needed it. Data is only passed if the driver is open.
*
@ -50,7 +50,7 @@
*
* This code reads the ADC ports at full speed. At the time this comment
* was written, the upper-half will throw away any converted values it
* receives when the buffer is full; therefor, if the data is not read
* receives when the buffer is full; therefore, if the data is not read
* for a while, the returned values may be stale when finally read. You
* can use the ANIOC_RESET_FIFO ioctl call to flush this stale data.
****************************************************************************/
@ -130,7 +130,7 @@ static int my_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg);
static const struct adc_ops_s g_adcops =
{
.ao_bind = my_bind, /* Called first during initialization. */
.ao_reset = my_reset, /* Called second during intialization. */
.ao_reset = my_reset, /* Called second during initialization. */
.ao_setup = my_setup, /* Called during first open. */
.ao_shutdown = my_shutdown, /* Called during last close. */
.ao_rxint = my_rxint, /* Called to enable/disable interrupts. */
@ -159,6 +159,7 @@ static uint8_t g_active_count = 0;
* all ADC devices.
*
* Note: This is called from inside an interrupt service routine.
*
****************************************************************************/
static int interrupt_handler(int irq, void *context, void *arg)
@ -239,6 +240,7 @@ static int interrupt_handler(int irq, void *context, void *arg)
* the conversion.
*
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void get_next_channel(void)
@ -321,6 +323,7 @@ static void get_next_channel(void)
* It also makes sure ADC reads are taking place
*
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void add_device(struct adc_dev_s *dev)
@ -378,6 +381,7 @@ static void add_device(struct adc_dev_s *dev)
* This function is called to unlink the device from the device list.
*
* Note: This is called from inside a critical section.
*
****************************************************************************/
void remove_device(struct adc_dev_s *dev)
@ -483,6 +487,7 @@ static void my_reset(struct adc_dev_s *dev)
* We don't do anything here.
*
* Note: This is called from inside a critical section.
*
****************************************************************************/
static int my_setup(struct adc_dev_s *dev)
@ -517,6 +522,7 @@ static int my_setup(struct adc_dev_s *dev)
* more devices are active.
*
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void my_shutdown(struct adc_dev_s *dev)
@ -534,7 +540,8 @@ static void my_shutdown(struct adc_dev_s *dev)
* Description:
* Call to enable or disable ADC RX interrupts
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void my_rxint(struct adc_dev_s *dev, bool enable)
@ -557,7 +564,7 @@ static void my_rxint(struct adc_dev_s *dev, bool enable)
* Name: my_ioctl
*
* Description:
* All ioctl calls will be routed through this method
* All ioctl calls will be routed through this method
*
****************************************************************************/

View file

@ -78,7 +78,7 @@ typedef struct dma_info_s
* to one less than the total number of BITS to be transmitted.
*
* The Y register is the input bit count register. It too must be set
* to one less thant the total number of bits to be read.
* to one less than the total number of bits to be read.
*
* The PIO's state machine is set up to auto-pull data from the input
* fifo whenever the output shift register is empty. This happens at
@ -640,7 +640,7 @@ static int my_read(struct gspi_dev_s *gspi,
* word we set X to 31.
*
* We load Y with the number of bits to read. This is based on the
* byte count in "length" which we round up to a 32-bit boundry so the
* byte count in "length" which we round up to a 32-bit boundary so the
* pio program will be sure to autopush the final data to the output fifo.
*
* This is slightly magical. The way we load the X is to first
@ -775,6 +775,7 @@ static int my_read(struct gspi_dev_s *gspi,
*
* Description:
* Initialize the cyw43439 private data and PIO communication.
*
****************************************************************************/
gspi_dev_t *rp2040_cyw_setup(uint8_t gpio_on,
@ -853,6 +854,7 @@ gspi_dev_t *rp2040_cyw_setup(uint8_t gpio_on,
*
* Description:
* Deinitialize the cyw43439 PIO communication.
*
****************************************************************************/
void rp2040_cyw_remove(gspi_dev_t *gspi)

View file

@ -496,8 +496,10 @@ static int rp2040_flash_ioctl(struct mtd_dev_s *dev,
/****************************************************************************
* Name: rp2040_flash_initialize
*
* Description: Bind a block mode driver that uses the built-in rp2040
* flash programming commands for read/write access to unused flash.
* Description:
* Bind a block mode driver that uses the built-in rp2040
* flash programming commands for read/write access to unused flash.
*
****************************************************************************/
struct mtd_dev_s *rp2040_flash_mtd_initialize(void)

View file

@ -513,8 +513,9 @@ static int rp2040_i2c_send(struct rp2040_i2cdev_s *priv, int last)
* Description:
* Perform a sequence of I2C transfers
*
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
*
****************************************************************************/
static int rp2040_i2c_transfer(struct i2c_master_s *dev,
@ -756,7 +757,7 @@ out:
out_without_reinit:
/* Release the port for re-use by other clients */
/* Release the port for reuse by other clients */
nxmutex_unlock(&priv->lock);
return ret;

View file

@ -42,7 +42,7 @@
*
* This lower-half supports multiple drivers (/dev/adc0, /dav/dca1, etc.)
* that each may read data from any of the ADC ports. The driver reads
* whichever ADC ports are needed by ANY of ther drivers in strict
* whichever ADC ports are needed by ANY of the drivers in strict
* round-robin fashion, passing the converted values to the drivers that
* needed it. Data is only passed if the driver is open.
*
@ -50,7 +50,7 @@
*
* This code reads the ADC ports at full speed. At the time this comment
* was written, the upper-half will throw away any converted values it
* receives when the buffer is full; therefor, if the data is not read
* receives when the buffer is full; therefore, if the data is not read
* for a while, the returned values may be stale when finally read. You
* can use the ANIOC_RESET_FIFO ioctl call to flush this stale data.
****************************************************************************/
@ -134,7 +134,7 @@ static int my_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg);
static const struct adc_ops_s g_adcops =
{
.ao_bind = my_bind, /* Called first during initialization. */
.ao_reset = my_reset, /* Called second during intialization. */
.ao_reset = my_reset, /* Called second during initialization. */
.ao_setup = my_setup, /* Called during first open. */
.ao_shutdown = my_shutdown, /* Called during last close. */
.ao_rxint = my_rxint, /* Called to enable/disable interrupts. */
@ -162,7 +162,8 @@ static uint8_t g_active_count = 0;
* ADC interrupt handler. Note that this one handler is shared between
* all ADC devices.
*
* Note: This is called from inside an interrupt service routine.
* Note: This is called from inside an interrupt service routine.
*
****************************************************************************/
static int interrupt_handler(int irq, void *context, void *arg)
@ -242,7 +243,8 @@ static int interrupt_handler(int irq, void *context, void *arg)
* Update g_current_channel to point to next channel in use and start
* the conversion.
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void get_next_channel(void)
@ -324,7 +326,8 @@ static void get_next_channel(void)
* This function is called to link the device int the device list.
* It also makes sure ADC reads are taking place
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void add_device(struct adc_dev_s *dev)
@ -381,7 +384,8 @@ static void add_device(struct adc_dev_s *dev)
* Description:
* This function is called to unlink the device from the device list.
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
void remove_device(struct adc_dev_s *dev)
@ -486,7 +490,8 @@ static void my_reset(struct adc_dev_s *dev)
*
* We don't do anything here.
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
static int my_setup(struct adc_dev_s *dev)
@ -516,11 +521,12 @@ static int my_setup(struct adc_dev_s *dev)
* Name: my_shutdown
*
* Description:
* This is called to shutdown an ADC device. It unlinks the
* device from out local chain and turns off ADC interrupts if no
* more devices are active.
* This is called to shutdown an ADC device. It unlinks the
* device from out local chain and turns off ADC interrupts if no
* more devices are active.
*
* Note: This is called from inside a critical section.
*
* Note: This is called from inside a critical section.
****************************************************************************/
static void my_shutdown(struct adc_dev_s *dev)
@ -538,7 +544,8 @@ static void my_shutdown(struct adc_dev_s *dev)
* Description:
* Call to enable or disable ADC RX interrupts
*
* Note: This is called from inside a critical section.
* Note: This is called from inside a critical section.
*
****************************************************************************/
static void my_rxint(struct adc_dev_s *dev, bool enable)
@ -561,7 +568,7 @@ static void my_rxint(struct adc_dev_s *dev, bool enable)
* Name: my_ioctl
*
* Description:
* All ioctl calls will be routed through this method
* All ioctl calls will be routed through this method
*
****************************************************************************/
@ -599,6 +606,7 @@ static int my_ioctl(struct adc_dev_s *dev,
* Returned Value:
* An opaque pointer that can be passed to rp23xx_adc_release on
* success or NULL (with errno set) on failure
*
****************************************************************************/
int rp23xx_adc_setup(const char *path,

View file

@ -396,7 +396,8 @@ static int rp23xx_i2c_interrupt(int irq, void *context, void *arg)
* if the interrupt occurs when the writing request.
* Actual receiving data is in RX_FULL interrupt handler.
*
* TODO : The argument "last" is not used.
* TODO : The argument "last" is not used.
*
****************************************************************************/
static int rp23xx_i2c_receive(struct rp23xx_i2cdev_s *priv, int last)
@ -757,7 +758,7 @@ out:
out_without_reinit:
/* Release the port for re-use by other clients */
/* Release the port for reuse by other clients */
nxmutex_unlock(&priv->lock);
return ret;

View file

@ -661,8 +661,9 @@ int s32k1xx_flexio_i2cbus_uninitialize(struct i2c_master_s *dev)
* Description:
* Perform a sequence of I2C transfers
*
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
* TODO: Multiple i2c_msg_s read operations with the same address are not
* currently guaranteed.
*
****************************************************************************/
static int s32k1xx_flexio_i2c_transfer(struct i2c_master_s *dev,

View file

@ -110,6 +110,7 @@ static int sam_timerisr(int irq, uint32_t *regs, void *arg)
*
* Assumptions:
* Called from within critical section or interrupt context.
*
****************************************************************************/
#ifdef CONFIG_CLOCK_ADJTIME

View file

@ -1546,7 +1546,7 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
* 3) All of the TX descriptors are in flight.
*
* This last case is obscure. It is due to that fact that each packet
* that we receive can generate an unstoppable transmisson. So we have
* that we receive can generate an unstoppable transmission. So we have
* to stop receiving when we can not longer transmit. In this case, the
* transmit logic should also have disabled further RX interrupts.
*/
@ -1814,7 +1814,7 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
}
/* We are finished with the RX buffer. NOTE: If the buffer is
* re-used for transmission, the dev->d_buf field will have been
* reused for transmission, the dev->d_buf field will have been
* nullified.
*/
@ -4398,6 +4398,7 @@ int up_rtc_settime(const struct timespec *tp)
*
* Assumptions:
* Called from within a critical section.
*
****************************************************************************/
int up_rtc_adjtime(long ppb)

View file

@ -753,6 +753,7 @@ static inline bool stm32_rcc_enablepll(void)
* Pre-conditions:
* rcc_reset() and rcc_resetbkp() have been called and the HSI is
* the MCU's SYSCLK.
*
****************************************************************************/
static void stm32_stdclockconfig(void)

View file

@ -410,6 +410,7 @@ static void flash_lock_opt(void)
*
* -EFAULT: Block number provided falls outside of the ranges specified in
* reference manual.
*
****************************************************************************/
static int flash_verify_blocknum(size_t block)
@ -451,6 +452,7 @@ static int flash_verify_blocknum(size_t block)
* This function assumes the block number has already been verified. Take
* care to make sure the block number is valid for the specific chip using
* flash_verify_blocknum() first.
*
****************************************************************************/
static uint32_t flash_block_address(size_t block)

View file

@ -120,6 +120,7 @@ bool stm32l5_pwr_enableusv(bool set);
*
* Returned Value:
* True: The bit was previously set.
*
****************************************************************************/
bool stm32l5_pwr_vddio2_valid(bool set);

View file

@ -79,7 +79,7 @@
* not by the mailbox used to send the remote frame. (The Tiva hardware uses
* the mailbox with the lowest number first.)
*
* This number is zero-indexed, althought the Command Request Register isn't.
* This number is zero-indexed, although the Command Request Register isn't.
*/
#define TIVA_CAN_TX_FIFO_START (TIVA_CAN_NUM_MBOXES - CONFIG_TIVA_CAN_TX_FIFO_DEPTH)
@ -355,7 +355,7 @@ static void tivacan_reset(struct can_dev_s *dev)
#endif
if (modnum > 1)
{
canerr("ERROR: tried to reset nonexistant module CAN%d\n",
canerr("ERROR: tried to reset nonexistent module CAN%d\n",
canmod->modnum);
}
@ -390,6 +390,7 @@ static void tivacan_reset(struct can_dev_s *dev)
*
* Returned value:
* Zero on success, or a negated errno on failure.
*
****************************************************************************/
static int tivacan_setup(struct can_dev_s *dev)
@ -952,14 +953,14 @@ static int tivacan_ioctl(struct can_dev_s *dev, int cmd,
case CANIOC_SET_BITTIMING:
{
/* REVIST: This is VERY crude--there's no guarantees that rounding
/* REVISIT: This is VERY crude-there's no guarantees that rounding
* won't cause problems with the prescaler selection.
* However, NuttX's interface here is kinda sub-optimal anyway--
* However, NuttX's interface here is kinda sub-optimal anyway
* the choice of TSEG1, TSEG2, and SJW depend on the system clock
* and the prescaler value, so there should be an ioctl for
* the driver to take physical parameters like delay time and
* crystal frequency tolerances into account and calculate the
* timing parameters automagically... This could be implemented
* timing parameters automagically. This could be implemented
* in the upper half driver.
*/
@ -1082,7 +1083,7 @@ static int tivacan_ioctl(struct can_dev_s *dev, int cmd,
{
/* RX default fifo pointer removed when a filter is added. Do not
* allow filters to be "removed" before they're added. Also do not
* allow unusued filter FIFOs to be added.
* allow unused filter FIFOs to be added.
*/
if (arg < 0