diff --git a/arch/risc-v/src/common/riscv_addrenv_kstack.c b/arch/risc-v/src/common/riscv_addrenv_kstack.c index c0fd0f0a15..357e035f79 100644 --- a/arch/risc-v/src/common/riscv_addrenv_kstack.c +++ b/arch/risc-v/src/common/riscv_addrenv_kstack.c @@ -59,7 +59,7 @@ * ****************************************************************************/ -int up_addrenv_kstackalloc(FAR struct tcb_s *tcb) +int up_addrenv_kstackalloc(struct tcb_s *tcb) { DEBUGASSERT(tcb && tcb->xcp.kstack == NULL); @@ -91,7 +91,7 @@ int up_addrenv_kstackalloc(FAR struct tcb_s *tcb) * ****************************************************************************/ -int up_addrenv_kstackfree(FAR struct tcb_s *tcb) +int up_addrenv_kstackfree(struct tcb_s *tcb) { DEBUGASSERT(tcb); diff --git a/arch/risc-v/src/common/riscv_saveusercontext.c b/arch/risc-v/src/common/riscv_saveusercontext.c index ef3d42da93..b5431d8290 100644 --- a/arch/risc-v/src/common/riscv_saveusercontext.c +++ b/arch/risc-v/src/common/riscv_saveusercontext.c @@ -44,7 +44,7 @@ * ****************************************************************************/ -int up_saveusercontext(FAR void *saveregs) +int up_saveusercontext(void *saveregs) { return sys_call1(SYS_save_context, (uintptr_t)saveregs); } diff --git a/arch/risc-v/src/esp32c3/esp32c3_oneshot_lowerhalf.c b/arch/risc-v/src/esp32c3/esp32c3_oneshot_lowerhalf.c index 9ed59372e2..77b5ec7944 100644 --- a/arch/risc-v/src/esp32c3/esp32c3_oneshot_lowerhalf.c +++ b/arch/risc-v/src/esp32c3/esp32c3_oneshot_lowerhalf.c @@ -115,7 +115,7 @@ static void esp32c3_oneshot_lh_handler(void *arg) struct esp32c3_oneshot_lowerhalf_s *priv = (struct esp32c3_oneshot_lowerhalf_s *)arg; oneshot_callback_t callback; - FAR void *cb_arg; + void *cb_arg; DEBUGASSERT(priv != NULL); DEBUGASSERT(priv->callback != NULL); diff --git a/arch/risc-v/src/mpfs/mpfs_allocateheap.c b/arch/risc-v/src/mpfs/mpfs_allocateheap.c index 692203ad88..1af53b4be4 100755 --- a/arch/risc-v/src/mpfs/mpfs_allocateheap.c +++ b/arch/risc-v/src/mpfs/mpfs_allocateheap.c @@ -87,9 +87,9 @@ ****************************************************************************/ #ifdef CONFIG_BUILD_KERNEL -void up_allocate_kheap(FAR void **heap_start, size_t *heap_size) +void up_allocate_kheap(void **heap_start, size_t *heap_size) #else -void up_allocate_heap(FAR void **heap_start, size_t *heap_size) +void up_allocate_heap(void **heap_start, size_t *heap_size) #endif /* CONFIG_BUILD_KERNEL */ { #if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP) diff --git a/arch/risc-v/src/mpfs/mpfs_ethernet.c b/arch/risc-v/src/mpfs/mpfs_ethernet.c index 30f75f84e8..1c687a6bd0 100644 --- a/arch/risc-v/src/mpfs/mpfs_ethernet.c +++ b/arch/risc-v/src/mpfs/mpfs_ethernet.c @@ -468,7 +468,7 @@ static int mpfs_interrupt_0(int irq, void *context, void *arg) return OK; } -static int mpfs_interrupt_1(int irq, void *context, FAR void *arg) +static int mpfs_interrupt_1(int irq, void *context, void *arg) { struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg; UNUSED(priv); @@ -479,7 +479,7 @@ static int mpfs_interrupt_1(int irq, void *context, FAR void *arg) return 0; } -static int mpfs_interrupt_2(int irq, void *context, FAR void *arg) +static int mpfs_interrupt_2(int irq, void *context, void *arg) { struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg; UNUSED(priv); @@ -490,7 +490,7 @@ static int mpfs_interrupt_2(int irq, void *context, FAR void *arg) return 0; } -static int mpfs_interrupt_3(int irq, void *context, FAR void *arg) +static int mpfs_interrupt_3(int irq, void *context, void *arg) { struct mpfs_ethmac_s *priv = (struct mpfs_ethmac_s *)arg; UNUSED(priv); diff --git a/arch/risc-v/src/mpfs/mpfs_usb.c b/arch/risc-v/src/mpfs/mpfs_usb.c index b82951d1eb..1e47fbbf2c 100755 --- a/arch/risc-v/src/mpfs/mpfs_usb.c +++ b/arch/risc-v/src/mpfs/mpfs_usb.c @@ -2098,7 +2098,7 @@ static int mpfs_getframe(struct usbdev_s *dev) return frameno; } -void mpfs_usb_suspend(FAR struct usbdev_s *dev, bool resume) +void mpfs_usb_suspend(struct usbdev_s *dev, bool resume) { } diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_bringup.c b/boards/risc-v/bl602/bl602evb/src/bl602_bringup.c index 0902541f76..7e5ac4e8e7 100644 --- a/boards/risc-v/bl602/bl602evb/src/bl602_bringup.c +++ b/boards/risc-v/bl602/bl602evb/src/bl602_bringup.c @@ -96,7 +96,7 @@ extern int bl602_net_initialize(void); #if defined(CONFIG_BL602_BLE_CONTROLLER) struct bthci_s { - FAR struct bt_driver_s drv; + struct bt_driver_s drv; int id; int fd; sq_entry_t link; @@ -115,16 +115,16 @@ struct uart_env_tag struct uart_rxchannel rx; }; -static FAR struct bthci_s *hci_dev; -static FAR struct circbuf_s circbuf_rd; +static struct bthci_s *hci_dev; +static struct circbuf_s circbuf_rd; static struct uart_env_tag uart_env; -static int bthci_send(FAR struct bt_driver_s *drv, +static int bthci_send(struct bt_driver_s *drv, enum bt_buf_type_e type, - FAR void *data, + void *data, size_t len); -static int bthci_open(FAR struct bt_driver_s *drv); -static void bthci_close(FAR struct bt_driver_s *drv); +static int bthci_open(struct bt_driver_s *drv); +static void bthci_close(struct bt_driver_s *drv); static int bthci_receive(uint8_t *data, uint32_t len); static int bthci_register(void); @@ -180,12 +180,12 @@ static void ble_uart_write(const uint8_t *bufptr, return; } -static int bthci_send(FAR struct bt_driver_s *drv, +static int bthci_send(struct bt_driver_s *drv, enum bt_buf_type_e type, - FAR void *data, + void *data, size_t len) { - FAR char *hdr = (FAR char *)data - drv->head_reserve; + char *hdr = (char *)data - drv->head_reserve; void (*callback)(void *, uint8_t) = NULL; void *dummy = NULL; int nlen; @@ -247,7 +247,7 @@ static int bthci_send(FAR struct bt_driver_s *drv, return nlen; } -static void bthci_close(FAR struct bt_driver_s *drv) +static void bthci_close(struct bt_driver_s *drv) { } @@ -283,19 +283,19 @@ static int bthci_receive(uint8_t *data, uint32_t len) len - H4_HEADER_SIZE); } -static int bthci_open(FAR struct bt_driver_s *drv) +static int bthci_open(struct bt_driver_s *drv) { return OK; } -static FAR struct bthci_s *bthci_alloc(void) +static struct bthci_s *bthci_alloc(void) { /* Register the driver with the Bluetooth stack */ - FAR struct bthci_s *dev; - FAR struct bt_driver_s *drv; + struct bthci_s *dev; + struct bt_driver_s *drv; - dev = (FAR struct bthci_s *)kmm_zalloc(sizeof(*dev)); + dev = (struct bthci_s *)kmm_zalloc(sizeof(*dev)); if (dev == NULL) { return NULL; @@ -371,7 +371,7 @@ int bl602_bringup(void) struct oneshot_lowerhalf_s *os = NULL; #endif #if defined(CONFIG_BL602_SPIFLASH) - FAR struct mtd_dev_s *mtd_part = NULL; + struct mtd_dev_s *mtd_part = NULL; const char *path = "/dev/mtdflash"; #endif #ifdef CONFIG_I2C @@ -538,7 +538,7 @@ int bl602_bringup(void) #ifdef CONFIG_RTC_DRIVER /* Instantiate the BL602 lower-half RTC driver */ - FAR struct rtc_lowerhalf_s *lower; + struct rtc_lowerhalf_s *lower; lower = bl602_rtc_lowerhalf_initialize(); if (!lower) diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c b/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c index a0129f7746..285d6ae406 100644 --- a/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c +++ b/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c @@ -62,14 +62,14 @@ struct bl602_gpint_dev_s * Private Function Prototypes ****************************************************************************/ -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpin_read(struct gpio_dev_s *dev, bool *value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); -static int gpio_setpintype(FAR struct gpio_dev_s *dev, +static int gpint_enable(struct gpio_dev_s *dev, bool enable); +static int gpio_setpintype(struct gpio_dev_s *dev, enum gpio_pintype_e gp_pintype); /**************************************************************************** @@ -262,8 +262,8 @@ static void bl602_gpio_intclear(uint8_t gpio_pin, uint8_t int_clear) static int bl602_gpio_interrupt(int irq, void *context, void *arg) { - FAR struct bl602_gpint_dev_s *bl602xgpint = - (FAR struct bl602_gpint_dev_s *)arg; + struct bl602_gpint_dev_s *bl602xgpint = + (struct bl602_gpint_dev_s *)arg; uint32_t time_out = 0; uint8_t gpio_pin; @@ -310,11 +310,11 @@ static int bl602_gpio_interrupt(int irq, void *context, void *arg) * ****************************************************************************/ -static int gpio_setpintype(FAR struct gpio_dev_s *dev, +static int gpio_setpintype(struct gpio_dev_s *dev, enum gpio_pintype_e gp_pintype) { - FAR struct bl602_gpint_dev_s *bl602xgpint = - (FAR struct bl602_gpint_dev_s *)dev; + struct bl602_gpint_dev_s *bl602xgpint = + (struct bl602_gpint_dev_s *)dev; uint8_t gpio_pin; uint8_t pintype = bl602xgpint->bl602gpio.gpio.gp_pintype; @@ -392,10 +392,10 @@ static int gpio_setpintype(FAR struct gpio_dev_s *dev, * ****************************************************************************/ -static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpin_read(struct gpio_dev_s *dev, bool *value) { - FAR struct bl602_gpio_dev_s *bl602xgpio = - (FAR struct bl602_gpio_dev_s *)dev; + struct bl602_gpio_dev_s *bl602xgpio = + (struct bl602_gpio_dev_s *)dev; DEBUGASSERT(bl602xgpio != NULL && value != NULL); gpioinfo("Reading...\n"); @@ -412,10 +412,10 @@ static int gpin_read(FAR struct gpio_dev_s *dev, FAR bool *value) * ****************************************************************************/ -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct bl602_gpio_dev_s *bl602xgpio = - (FAR struct bl602_gpio_dev_s *)dev; + struct bl602_gpio_dev_s *bl602xgpio = + (struct bl602_gpio_dev_s *)dev; DEBUGASSERT(bl602xgpio != NULL && value != NULL); DEBUGASSERT(bl602xgpio->id < BOARD_NGPIOOUT); @@ -437,10 +437,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) * ****************************************************************************/ -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct bl602_gpio_dev_s *bl602xgpio = - (FAR struct bl602_gpio_dev_s *)dev; + struct bl602_gpio_dev_s *bl602xgpio = + (struct bl602_gpio_dev_s *)dev; DEBUGASSERT(bl602xgpio != NULL); DEBUGASSERT(bl602xgpio->id < BOARD_NGPIOOUT); @@ -459,10 +459,10 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value) * ****************************************************************************/ -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpint_read(struct gpio_dev_s *dev, bool *value) { - FAR struct bl602_gpint_dev_s *bl602xgpint = - (FAR struct bl602_gpint_dev_s *)dev; + struct bl602_gpint_dev_s *bl602xgpint = + (struct bl602_gpint_dev_s *)dev; DEBUGASSERT(bl602xgpint != NULL && value != NULL); DEBUGASSERT(bl602xgpint->bl602gpio.id < BOARD_NGPIOINT); @@ -481,10 +481,10 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) * ****************************************************************************/ -static int gpint_attach(FAR struct gpio_dev_s *dev, pin_interrupt_t callback) +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback) { - FAR struct bl602_gpint_dev_s *bl602xgpint = - (FAR struct bl602_gpint_dev_s *)dev; + struct bl602_gpint_dev_s *bl602xgpint = + (struct bl602_gpint_dev_s *)dev; uint8_t gpio_pin = (g_gpiointinputs[bl602xgpint->bl602gpio.id] & GPIO_PIN_MASK) >> @@ -511,10 +511,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, pin_interrupt_t callback) * ****************************************************************************/ -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +static int gpint_enable(struct gpio_dev_s *dev, bool enable) { - FAR struct bl602_gpint_dev_s *bl602xgpint = - (FAR struct bl602_gpint_dev_s *)dev; + struct bl602_gpint_dev_s *bl602xgpint = + (struct bl602_gpint_dev_s *)dev; if (enable) { diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spi.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spi.c index 178720d1e8..9030f6c9fd 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spi.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spi.c @@ -46,7 +46,7 @@ #ifdef CONFIG_ESP32C3_SPI2 -uint8_t esp32c3_spi2_status(FAR struct spi_dev_s *dev, uint32_t devid) +uint8_t esp32c3_spi2_status(struct spi_dev_s *dev, uint32_t devid) { uint8_t status = 0; @@ -61,7 +61,7 @@ uint8_t esp32c3_spi2_status(FAR struct spi_dev_s *dev, uint32_t devid) #if defined(CONFIG_ESP32C3_SPI2) && defined(CONFIG_SPI_CMDDATA) -int esp32c3_spi2_cmddata(FAR struct spi_dev_s *dev, uint32_t devid, bool cmd) +int esp32c3_spi2_cmddata(struct spi_dev_s *dev, uint32_t devid, bool cmd) { if (devid == SPIDEV_DISPLAY(0)) { diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spidev.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spidev.c index 2320a03965..f55215d01b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spidev.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spidev.c @@ -47,7 +47,7 @@ int board_spidev_initialize(int port) { int ret; - FAR struct spi_dev_s *spi; + struct spi_dev_s *spi; syslog(LOG_INFO, "Initializing /dev/spi%d...\n", port); diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spislavedev.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spislavedev.c index 69bf48e60c..3869f9f568 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spislavedev.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_board_spislavedev.c @@ -55,7 +55,7 @@ int board_spislavedev_initialize(int bus) { int ret; - FAR struct spi_slave_ctrlr_s *ctrlr; + struct spi_slave_ctrlr_s *ctrlr; spiinfo("Initializing /dev/spislv%d...\n", bus); diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gc9a01.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gc9a01.c index 06d3435dea..74381f6ea3 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gc9a01.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gc9a01.c @@ -115,7 +115,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { g_lcd = gc9a01_lcdinitialize(g_spidev); if (!g_lcd) diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gpio.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gpio.c index 2fdb5cb063..13576e6f1f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gpio.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_gpio.c @@ -82,15 +82,15 @@ struct esp32c3gpint_dev_s ****************************************************************************/ #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); #endif #if BOARD_NGPIOINT > 0 -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_read(struct gpio_dev_s *dev, bool *value); +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback); -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable); +static int gpint_enable(struct gpio_dev_s *dev, bool enable); #endif /**************************************************************************** @@ -144,10 +144,10 @@ static struct esp32c3gpint_dev_s g_gpint[BOARD_NGPIOINT]; ****************************************************************************/ #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct esp32c3gpio_dev_s *esp32c3gpio = - (FAR struct esp32c3gpio_dev_s *)dev; + struct esp32c3gpio_dev_s *esp32c3gpio = + (struct esp32c3gpio_dev_s *)dev; DEBUGASSERT(esp32c3gpio != NULL && value != NULL); DEBUGASSERT(esp32c3gpio->id < BOARD_NGPIOOUT); @@ -161,10 +161,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) * Name: gpout_write ****************************************************************************/ -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct esp32c3gpio_dev_s *esp32c3gpio = - (FAR struct esp32c3gpio_dev_s *)dev; + struct esp32c3gpio_dev_s *esp32c3gpio = + (struct esp32c3gpio_dev_s *)dev; DEBUGASSERT(esp32c3gpio != NULL); DEBUGASSERT(esp32c3gpio->id < BOARD_NGPIOOUT); @@ -182,8 +182,8 @@ static int gpout_write(FAR struct gpio_dev_s *dev, bool value) #if BOARD_NGPIOINT > 0 static int esp32c3gpio_interrupt(int irq, void *context, void *arg) { - FAR struct esp32c3gpint_dev_s *esp32c3gpint = - (FAR struct esp32c3gpint_dev_s *)arg; + struct esp32c3gpint_dev_s *esp32c3gpint = + (struct esp32c3gpint_dev_s *)arg; DEBUGASSERT(esp32c3gpint != NULL && esp32c3gpint->callback != NULL); gpioinfo("Interrupt! callback=%p\n", esp32c3gpint->callback); @@ -197,10 +197,10 @@ static int esp32c3gpio_interrupt(int irq, void *context, void *arg) * Name: gpint_read ****************************************************************************/ -static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpint_read(struct gpio_dev_s *dev, bool *value) { - FAR struct esp32c3gpint_dev_s *esp32c3gpint = - (FAR struct esp32c3gpint_dev_s *)dev; + struct esp32c3gpint_dev_s *esp32c3gpint = + (struct esp32c3gpint_dev_s *)dev; DEBUGASSERT(esp32c3gpint != NULL && value != NULL); DEBUGASSERT(esp32c3gpint->esp32c3gpio.id < BOARD_NGPIOINT); @@ -214,11 +214,11 @@ static int gpint_read(FAR struct gpio_dev_s *dev, FAR bool *value) * Name: gpint_attach ****************************************************************************/ -static int gpint_attach(FAR struct gpio_dev_s *dev, +static int gpint_attach(struct gpio_dev_s *dev, pin_interrupt_t callback) { - FAR struct esp32c3gpint_dev_s *esp32c3gpint = - (FAR struct esp32c3gpint_dev_s *)dev; + struct esp32c3gpint_dev_s *esp32c3gpint = + (struct esp32c3gpint_dev_s *)dev; int irq = ESP32C3_PIN2IRQ(g_gpiointinputs[esp32c3gpint->esp32c3gpio.id]); int ret; @@ -245,10 +245,10 @@ static int gpint_attach(FAR struct gpio_dev_s *dev, * Name: gpint_enable ****************************************************************************/ -static int gpint_enable(FAR struct gpio_dev_s *dev, bool enable) +static int gpint_enable(struct gpio_dev_s *dev, bool enable) { - FAR struct esp32c3gpint_dev_s *esp32c3gpint = - (FAR struct esp32c3gpint_dev_s *)dev; + struct esp32c3gpint_dev_s *esp32c3gpint = + (struct esp32c3gpint_dev_s *)dev; int irq = ESP32C3_PIN2IRQ(g_gpiointinputs[esp32c3gpint->esp32c3gpio.id]); if (enable) diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_i2c.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_i2c.c index b7db9698e4..6896c01917 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_i2c.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_i2c.c @@ -53,7 +53,7 @@ int board_i2c_init(void) int ret = OK; #ifdef CONFIG_ESP32C3_I2C0 - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; i2c = esp32c3_i2cbus_initialize(0); diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_oneshot.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_oneshot.c index 60a40c5737..3ac14d0b8e 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_oneshot.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_oneshot.c @@ -54,7 +54,7 @@ int board_oneshot_init(int timer, uint16_t resolution) { int ret = OK; - FAR struct oneshot_lowerhalf_s *os_lower = NULL; + struct oneshot_lowerhalf_s *os_lower = NULL; os_lower = oneshot_initialize(timer, resolution); if (os_lower != NULL) diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c index 0c244bd774..8d40796925 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_spiflash.c @@ -139,7 +139,7 @@ static const struct ota_partition_s g_ota_partition_table[] = #ifdef CONFIG_ESP32C3_HAVE_OTA_PARTITION static int init_ota_partitions(void) { - FAR struct mtd_dev_s *mtd; + struct mtd_dev_s *mtd; #ifdef CONFIG_BCH char blockdev[18]; #endif @@ -193,7 +193,7 @@ static int init_ota_partitions(void) ****************************************************************************/ #if defined (CONFIG_ESP32C3_SPIFLASH_SMARTFS) -static int setup_smartfs(int smartn, FAR struct mtd_dev_s *mtd, +static int setup_smartfs(int smartn, struct mtd_dev_s *mtd, const char *mnt_pt) { int ret = OK; @@ -254,7 +254,7 @@ static int setup_smartfs(int smartn, FAR struct mtd_dev_s *mtd, ****************************************************************************/ #if defined (CONFIG_ESP32C3_SPIFLASH_LITTLEFS) -static int setup_littlefs(const char *path, FAR struct mtd_dev_s *mtd, +static int setup_littlefs(const char *path, struct mtd_dev_s *mtd, const char *mnt_pt, int priv) { int ret = OK; @@ -303,7 +303,7 @@ static int setup_littlefs(const char *path, FAR struct mtd_dev_s *mtd, ****************************************************************************/ #if defined (CONFIG_ESP32C3_SPIFLASH_SPIFFS) -static int setup_spiffs(const char *path, FAR struct mtd_dev_s *mtd, +static int setup_spiffs(const char *path, struct mtd_dev_s *mtd, const char *mnt_pt, int priv) { int ret = OK; @@ -346,7 +346,7 @@ static int setup_spiffs(const char *path, FAR struct mtd_dev_s *mtd, ****************************************************************************/ #if defined (CONFIG_ESP32C3_SPIFLASH_NXFFS) -static int setup_nxffs(FAR struct mtd_dev_s *mtd, const char *mnt_pt) +static int setup_nxffs(struct mtd_dev_s *mtd, const char *mnt_pt) { int ret = OK; @@ -386,7 +386,7 @@ static int setup_nxffs(FAR struct mtd_dev_s *mtd, const char *mnt_pt) static int init_wifi_partition(void) { int ret = OK; - FAR struct mtd_dev_s *mtd; + struct mtd_dev_s *mtd; mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_WIFI_MTD_OFFSET, CONFIG_ESP32C3_WIFI_MTD_SIZE, @@ -451,7 +451,7 @@ static int init_wifi_partition(void) static int init_storage_partition(void) { int ret = OK; - FAR struct mtd_dev_s *mtd; + struct mtd_dev_s *mtd; mtd = esp32c3_spiflash_alloc_mtdpart(CONFIG_ESP32C3_STORAGE_MTD_OFFSET, CONFIG_ESP32C3_STORAGE_MTD_SIZE, diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7735.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7735.c index b12b928f8e..3e191f223d 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7735.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7735.c @@ -115,7 +115,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { g_lcd = st7735_lcdinitialize(g_spidev); if (!g_lcd) diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7789.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7789.c index de5b92c9bd..0c8588a0bc 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7789.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_st7789.c @@ -115,7 +115,7 @@ int board_lcd_initialize(void) * ****************************************************************************/ -FAR struct lcd_dev_s *board_lcd_getdev(int devno) +struct lcd_dev_s *board_lcd_getdev(int devno) { g_lcd = st7789_lcdinitialize(g_spidev); if (!g_lcd) diff --git a/boards/risc-v/fe310/hifive1-revb/src/fe310_buttons.c b/boards/risc-v/fe310/hifive1-revb/src/fe310_buttons.c index 1ea7043f86..384ea75a19 100644 --- a/boards/risc-v/fe310/hifive1-revb/src/fe310_buttons.c +++ b/boards/risc-v/fe310/hifive1-revb/src/fe310_buttons.c @@ -131,7 +131,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL; ASSERT(id == 0); diff --git a/boards/risc-v/k210/maix-bit/src/k210_gpio.c b/boards/risc-v/k210/maix-bit/src/k210_gpio.c index 0e631dc491..6ccc5b441a 100644 --- a/boards/risc-v/k210/maix-bit/src/k210_gpio.c +++ b/boards/risc-v/k210/maix-bit/src/k210_gpio.c @@ -66,8 +66,8 @@ struct k210gpio_dev_s ****************************************************************************/ #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value); -static int gpout_write(FAR struct gpio_dev_s *dev, bool value); +static int gpout_read(struct gpio_dev_s *dev, bool *value); +static int gpout_write(struct gpio_dev_s *dev, bool value); #endif /**************************************************************************** @@ -102,10 +102,10 @@ static struct k210gpio_dev_s g_gpout[BOARD_NGPIOOUT]; ****************************************************************************/ #if BOARD_NGPIOOUT > 0 -static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) +static int gpout_read(struct gpio_dev_s *dev, bool *value) { - FAR struct k210gpio_dev_s *k210gpio = - (FAR struct k210gpio_dev_s *)dev; + struct k210gpio_dev_s *k210gpio = + (struct k210gpio_dev_s *)dev; DEBUGASSERT(k210gpio != NULL && value != NULL); DEBUGASSERT(k210gpio->id < BOARD_NGPIOOUT); @@ -119,10 +119,10 @@ static int gpout_read(FAR struct gpio_dev_s *dev, FAR bool *value) * Name: gpout_write ****************************************************************************/ -static int gpout_write(FAR struct gpio_dev_s *dev, bool value) +static int gpout_write(struct gpio_dev_s *dev, bool value) { - FAR struct k210gpio_dev_s *k210gpio = - (FAR struct k210gpio_dev_s *)dev; + struct k210gpio_dev_s *k210gpio = + (struct k210gpio_dev_s *)dev; DEBUGASSERT(k210gpio != NULL); DEBUGASSERT(k210gpio->id < BOARD_NGPIOOUT); diff --git a/boards/risc-v/litex/arty_a7/src/litex_automount.c b/boards/risc-v/litex/arty_a7/src/litex_automount.c index 6a4f065841..4abdce06b8 100644 --- a/boards/risc-v/litex/arty_a7/src/litex_automount.c +++ b/boards/risc-v/litex/arty_a7/src/litex_automount.c @@ -51,10 +51,10 @@ struct litex_automount_state_s { - volatile automount_handler_t handler; /* Upper half handler */ - FAR void *arg; /* Handler argument */ - bool enable; /* Fake interrupt enable */ - bool pending; /* Set if there an event while disabled */ + volatile automount_handler_t handler; /* Upper half handler */ + void *arg; /* Handler argument */ + bool enable; /* Fake interrupt enable */ + bool pending; /* Set if there an event while disabled */ }; /* This structure represents the static configuration of an automounter */ @@ -65,20 +65,20 @@ struct litex_automount_config_s * struct automount_lower_s to struct litex_automount_config_s */ - struct automount_lower_s lower; /* Publicly visible part */ - uint8_t mmcsd; /* MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO */ - FAR struct litex_automount_state_s *state; /* Changeable state */ + struct automount_lower_s lower; /* Publicly visible part */ + uint8_t mmcsd; /* MB1_MMCSD_SLOTNO or MB2_MMCSD_SLOTNO */ + struct litex_automount_state_s *state; /* Changeable state */ }; /**************************************************************************** * Private Function Prototypes ****************************************************************************/ -static int litex_attach(FAR const struct automount_lower_s *lower, - automount_handler_t isr, FAR void *arg); -static void litex_enable(FAR const struct automount_lower_s *lower, +static int litex_attach(const struct automount_lower_s *lower, + automount_handler_t isr, void *arg); +static void litex_enable(const struct automount_lower_s *lower, bool enable); -static bool litex_inserted(FAR const struct automount_lower_s *lower); +static bool litex_inserted(const struct automount_lower_s *lower); /**************************************************************************** * Private Data @@ -126,15 +126,15 @@ static const struct litex_automount_config_s g_mb1_mmcsdconfig = * ****************************************************************************/ -static int litex_attach(FAR const struct automount_lower_s *lower, - automount_handler_t isr, FAR void *arg) +static int litex_attach(const struct automount_lower_s *lower, + automount_handler_t isr, void *arg) { - FAR const struct litex_automount_config_s *config; - FAR struct litex_automount_state_s *state; + const struct litex_automount_config_s *config; + struct litex_automount_state_s *state; /* Recover references to our structure */ - config = (FAR struct litex_automount_config_s *)lower; + config = (struct litex_automount_config_s *)lower; DEBUGASSERT(config && config->state); state = config->state; @@ -165,16 +165,16 @@ static int litex_attach(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static void litex_enable(FAR const struct automount_lower_s *lower, +static void litex_enable(const struct automount_lower_s *lower, bool enable) { - FAR const struct litex_automount_config_s *config; - FAR struct litex_automount_state_s *state; + const struct litex_automount_config_s *config; + struct litex_automount_state_s *state; irqstate_t flags; /* Recover references to our structure */ - config = (FAR struct litex_automount_config_s *)lower; + config = (struct litex_automount_config_s *)lower; DEBUGASSERT(config && config->state); state = config->state; @@ -216,11 +216,11 @@ static void litex_enable(FAR const struct automount_lower_s *lower, * ****************************************************************************/ -static bool litex_inserted(FAR const struct automount_lower_s *lower) +static bool litex_inserted(const struct automount_lower_s *lower) { - FAR const struct litex_automount_config_s *config; + const struct litex_automount_config_s *config; - config = (FAR struct litex_automount_config_s *)lower; + config = (struct litex_automount_config_s *)lower; DEBUGASSERT(config && config->state); return litex_cardinserted(config->mmcsd); @@ -246,7 +246,7 @@ static bool litex_inserted(FAR const struct automount_lower_s *lower) int litex_automount_initialize(void) { - FAR void *handle; + void *handle; finfo("Initializing automounter(s)\n"); @@ -290,8 +290,8 @@ int litex_automount_initialize(void) void litex_automount_event(int slotno, bool inserted) { - FAR const struct litex_automount_config_s *config; - FAR struct litex_automount_state_s *state; + const struct litex_automount_config_s *config; + struct litex_automount_state_s *state; #ifdef CONFIG_LITEX_SDIO_MOUNT_MOUNTPOINT /* Is this a change in the MB1 MMCSD slot insertion state? */ diff --git a/boards/risc-v/mpfs/common/src/mpfs_emmcsd.c b/boards/risc-v/mpfs/common/src/mpfs_emmcsd.c index b6fea4e772..25a0ed09d6 100644 --- a/boards/risc-v/mpfs/common/src/mpfs_emmcsd.c +++ b/boards/risc-v/mpfs/common/src/mpfs_emmcsd.c @@ -35,7 +35,7 @@ * Private Data ****************************************************************************/ -static FAR struct sdio_dev_s *g_sdio_dev; +static struct sdio_dev_s *g_sdio_dev; /**************************************************************************** * Public Functions diff --git a/boards/risc-v/mpfs/common/src/mpfs_i2c.c b/boards/risc-v/mpfs/common/src/mpfs_i2c.c index 4fa701a1a7..22aa84a433 100644 --- a/boards/risc-v/mpfs/common/src/mpfs_i2c.c +++ b/boards/risc-v/mpfs/common/src/mpfs_i2c.c @@ -55,7 +55,7 @@ int mpfs_board_i2c_init(void) #ifdef CONFIG_I2C_DRIVER int bus = 0; #endif - FAR struct i2c_master_s *i2c; + struct i2c_master_s *i2c; #endif #ifdef CONFIG_MPFS_I2C0 diff --git a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_buttons.c b/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_buttons.c index 542b3ea197..3471c6fddd 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_buttons.c +++ b/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_buttons.c @@ -120,7 +120,7 @@ uint32_t board_buttons(void) ****************************************************************************/ #ifdef CONFIG_ARCH_IRQBUTTONS -int board_button_irq(int id, xcpt_t irqhandler, FAR void *arg) +int board_button_irq(int id, xcpt_t irqhandler, void *arg) { int ret = -EINVAL;