board/arch: Remove FAR decorator

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-01-25 01:06:00 +08:00
committed by Petro Karashchenko
parent d23bd35dd3
commit d7ee492fc4
21 changed files with 61 additions and 67 deletions
@@ -85,18 +85,16 @@
* Private Function Prototypes
****************************************************************************/
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
*lower);
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
FAR struct ajoy_sample_s *sample);
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
*lower);
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
ajoy_buttonset_t press, ajoy_buttonset_t release,
ajoy_handler_t handler, FAR void *arg);
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s *lower);
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
struct ajoy_sample_s *sample);
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s *lower);
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
ajoy_buttonset_t press, ajoy_buttonset_t release,
ajoy_handler_t handler, void *arg);
static void ajoy_disable(void);
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg);
static int ajoy_interrupt(int irq, void *context, void *arg);
/****************************************************************************
* Private Data
@@ -135,7 +133,7 @@ static struct file g_adcfile;
/* Current interrupt handler and argument */
static ajoy_handler_t g_ajoyhandler;
static FAR void *g_ajoyarg;
static void *g_ajoyarg;
/****************************************************************************
* Private Functions
@@ -149,8 +147,7 @@ static FAR void *g_ajoyarg;
*
****************************************************************************/
static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
*lower)
static ajoy_buttonset_t ajoy_supported(const struct ajoy_lowerhalf_s *lower)
{
iinfo("Supported: %02x\n", AJOY_SUPPORTED);
return (ajoy_buttonset_t)AJOY_SUPPORTED;
@@ -164,11 +161,11 @@ static ajoy_buttonset_t ajoy_supported(FAR const struct ajoy_lowerhalf_s
*
****************************************************************************/
static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
FAR struct ajoy_sample_s *sample)
static int ajoy_sample(const struct ajoy_lowerhalf_s *lower,
struct ajoy_sample_s *sample)
{
struct adc_msg_s adcmsg[SAM_ADC_NCHANNELS];
FAR struct adc_msg_s *ptr;
struct adc_msg_s *ptr;
ssize_t nread;
ssize_t offset;
int have;
@@ -245,8 +242,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower,
*
****************************************************************************/
static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
*lower)
static ajoy_buttonset_t ajoy_buttons(const struct ajoy_lowerhalf_s *lower)
{
ajoy_buttonset_t ret = 0;
int i;
@@ -278,9 +274,9 @@ static ajoy_buttonset_t ajoy_buttons(FAR const struct ajoy_lowerhalf_s
*
****************************************************************************/
static void ajoy_enable(FAR const struct ajoy_lowerhalf_s *lower,
ajoy_buttonset_t press, ajoy_buttonset_t release,
ajoy_handler_t handler, FAR void *arg)
static void ajoy_enable(const struct ajoy_lowerhalf_s *lower,
ajoy_buttonset_t press, ajoy_buttonset_t release,
ajoy_handler_t handler, void *arg)
{
irqstate_t flags;
ajoy_buttonset_t either = press | release;
@@ -367,7 +363,7 @@ static void ajoy_disable(void)
*
****************************************************************************/
static int ajoy_interrupt(int irq, FAR void *context, FAR void *arg)
static int ajoy_interrupt(int irq, void *context, void *arg)
{
DEBUGASSERT(g_ajoyhandler);
if (g_ajoyhandler)
+2 -2
View File
@@ -57,8 +57,8 @@
int sam_at25_automount(int minor)
{
FAR struct spi_dev_s *spi;
FAR struct mtd_dev_s *mtd;
struct spi_dev_s *spi;
struct mtd_dev_s *mtd;
static bool initialized = false;
int ret;
@@ -84,7 +84,7 @@
#ifdef HAVE_I2CTOOL
static void sam_i2c_register(int bus)
{
FAR struct i2c_master_s *i2c;
struct i2c_master_s *i2c;
int ret;
i2c = sam_i2cbus_initialize(bus);
@@ -104,7 +104,7 @@ uint32_t board_buttons(void)
****************************************************************************/
#if defined(CONFIG_SAMA5_PIOB_IRQ) && defined(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;
@@ -241,7 +241,7 @@ void weak_function sam_netinitialize(void)
****************************************************************************/
#ifdef CONFIG_SAMA5_PIOE_IRQ
int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg,
int arch_phy_irq(const char *intf, xcpt_t handler, void *arg,
phy_enable_t *enable)
{
irqstate_t flags;
@@ -151,7 +151,7 @@ int board_nandflash_config(int cs)
#ifdef HAVE_NAND
int sam_nand_automount(int minor)
{
FAR struct mtd_dev_s *mtd;
struct mtd_dev_s *mtd;
static bool initialized = false;
int ret;
@@ -71,7 +71,7 @@ static uint32_t g_saveregs[XCPTCONTEXT_REGS];
* return the current FPU registers.
*/
void arch_getfpu(FAR uint32_t *fpusave)
void arch_getfpu(uint32_t *fpusave)
{
irqstate_t flags;
@@ -90,7 +90,7 @@ void arch_getfpu(FAR uint32_t *fpusave)
* will compare them and return true if they are identical.
*/
bool arch_cmpfpu(FAR const uint32_t *fpusave1, FAR const uint32_t *fpusave2)
bool arch_cmpfpu(const uint32_t *fpusave1, const uint32_t *fpusave2)
{
return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0;
}
@@ -98,7 +98,7 @@ struct sam_sdmmc_state_s
/* SDMMC device state */
#ifdef CONFIG_SAMA5_SDMMC0
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg);
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg);
static struct sam_sdmmc_state_s g_sdmmc0 =
{
@@ -110,7 +110,7 @@ static struct sam_sdmmc_state_s g_sdmmc0 =
#endif
#ifdef CONFIG_SAMA5_SDMMC1
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg);
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg);
static struct sam_sdmmc_state_s g_sdmmc1 =
{
@@ -175,14 +175,14 @@ static int sam_sdmmc_cardetect(struct sam_sdmmc_state_s *state)
}
#ifdef CONFIG_SAMA5_SDMMC0
static int sam_sdmmc0_cardetect(int irq, void *regs, FAR void *arg)
static int sam_sdmmc0_cardetect(int irq, void *regs, void *arg)
{
return sam_sdmmc_cardetect(&g_sdmmc0);
}
#endif
#ifdef CONFIG_SAMA5_SDMMC1
static int sam_sdmmc1_cardetect(int irq, void *regs, FAR void *arg)
static int sam_sdmmc1_cardetect(int irq, void *regs, void *arg)
{
return sam_sdmmc_cardetect(&g_sdmmc1);
}
+2 -2
View File
@@ -162,14 +162,14 @@ void sam_spi1select(uint32_t devid, bool selected)
****************************************************************************/
#ifdef CONFIG_SAMA5_SPI0
uint8_t sam_spi0status(FAR struct spi_dev_s *dev, uint32_t devid)
uint8_t sam_spi0status(struct spi_dev_s *dev, uint32_t devid)
{
return 0;
}
#endif
#ifdef CONFIG_SAMA5_SPI0
uint8_t sam_spi1status(FAR struct spi_dev_s *dev, uint32_t devid)
uint8_t sam_spi1status(struct spi_dev_s *dev, uint32_t devid)
{
return 0;
}
+3 -3
View File
@@ -340,7 +340,7 @@ int sam_usbhost_initialize(void)
pid = kthread_create("OHCI Monitor", CONFIG_JUPITERNANO_USBHOST_PRIO,
CONFIG_JUPITERNANO_USBHOST_STACKSIZE,
(main_t)ohci_waiter, (FAR char * const *)NULL);
(main_t)ohci_waiter, (char * const *)NULL);
if (pid < 0)
{
uerr("ERROR: Failed to create ohci_waiter task: %d\n", ret);
@@ -362,7 +362,7 @@ int sam_usbhost_initialize(void)
pid = kthread_create("EHCI Monitor", CONFIG_JUPITERNANO_USBHOST_PRIO,
CONFIG_JUPITERNANO_USBHOST_STACKSIZE,
(main_t)ehci_waiter, (FAR char * const *)NULL);
(main_t)ehci_waiter, (char * const *)NULL);
if (pid < 0)
{
uerr("ERROR: Failed to create ehci_waiter task: %d\n", ret);
@@ -518,7 +518,7 @@ xcpt_t sam_setup_overcurrent(xcpt_t handler)
****************************************************************************/
#ifdef CONFIG_USBDEV
void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume)
void sam_usbsuspend(struct usbdev_s *dev, bool resume)
{
uinfo("resume: %d\n", resume);
}