From 72837b30d816fa36ea43c039455dcb8b2b400267 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 2 Sep 2025 10:27:47 -0500 Subject: [PATCH] bsps/shared/*: Fix old style declaration Newer C versions require that the storage-class specifier like static or _Thread_Local be the first thing in a declaration. --- bsps/shared/freebsd/sys/arm/ti/am335x/am335x_scm_padconf.c | 6 +++--- bsps/shared/grlib/can/grcan.c | 4 ++-- bsps/shared/grlib/tmtc/grtc.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bsps/shared/freebsd/sys/arm/ti/am335x/am335x_scm_padconf.c b/bsps/shared/freebsd/sys/arm/ti/am335x/am335x_scm_padconf.c index e5cb1801e1..ab34621f25 100644 --- a/bsps/shared/freebsd/sys/arm/ti/am335x/am335x_scm_padconf.c +++ b/bsps/shared/freebsd/sys/arm/ti/am335x/am335x_scm_padconf.c @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); .muxmodes[7] = m7, \ } -const static struct ti_pinmux_padstate ti_padstate_devmap[] = { +static const struct ti_pinmux_padstate ti_padstate_devmap[] = { {"output", PADCONF_OUTPUT }, {"output_pullup", PADCONF_OUTPUT_PULLUP }, {"input", PADCONF_INPUT }, @@ -78,7 +78,7 @@ const static struct ti_pinmux_padstate ti_padstate_devmap[] = { { .state = NULL } }; -const static struct ti_pinmux_padconf ti_padconf_devmap[] = { +static const struct ti_pinmux_padconf ti_padconf_devmap[] = { _PIN(0x000, "GPMC_AD0", 32, 7,"gpmc_ad0", "mmc1_dat0", NULL, NULL, NULL, NULL, NULL, "gpio1_0"), _PIN(0x004, "GPMC_AD1", 33, 7,"gpmc_ad1", "mmc1_dat1", NULL, NULL, NULL, NULL, NULL, "gpio1_1"), _PIN(0x008, "GPMC_AD2", 34, 7,"gpmc_ad2", "mmc1_dat2", NULL, NULL, NULL, NULL, NULL, "gpio1_2"), @@ -304,4 +304,4 @@ const struct ti_pinmux_device ti_am335x_pinmux_dev = { .padconf_sate_mask = 0x78, .padstate = ti_padstate_devmap, .padconf = ti_padconf_devmap, -}; \ No newline at end of file +}; diff --git a/bsps/shared/grlib/can/grcan.c b/bsps/shared/grlib/can/grcan.c index 47d86b053b..f50a69b561 100644 --- a/bsps/shared/grlib/can/grcan.c +++ b/bsps/shared/grlib/can/grcan.c @@ -97,7 +97,7 @@ int state2err[4] = { /* STATE_AHBERR */ GRCAN_RET_AHBERR }; -static void __inline__ grcan_hw_reset(struct grcan_regs *regs); +static __inline__ void grcan_hw_reset(struct grcan_regs *regs); static void grcan_hw_config( struct grcan_priv *pDev, @@ -319,7 +319,7 @@ int grcan_device_init(struct grcan_priv *pDev) return 0; } -static void __inline__ grcan_hw_reset(struct grcan_regs *regs) +static __inline__ void grcan_hw_reset(struct grcan_regs *regs) { regs->ctrl = GRCAN_CTRL_RESET; } diff --git a/bsps/shared/grlib/tmtc/grtc.c b/bsps/shared/grlib/tmtc/grtc.c index 4cb9a06ed0..d188ab9bae 100644 --- a/bsps/shared/grlib/tmtc/grtc.c +++ b/bsps/shared/grlib/tmtc/grtc.c @@ -496,7 +496,7 @@ static void grtc_hw_get_defaults(struct grtc_priv *pDev, struct grtc_ioc_config } /* bufsize is given in bytes */ -static int __inline__ grtc_hw_data_avail_upper(unsigned int rrp, unsigned rwp, unsigned int bufsize) +static __inline__ int grtc_hw_data_avail_upper(unsigned int rrp, unsigned rwp, unsigned int bufsize) { if ( rrp == rwp ) return 0; @@ -509,7 +509,7 @@ static int __inline__ grtc_hw_data_avail_upper(unsigned int rrp, unsigned rwp, u } /* bufsize is given in bytes */ -static int __inline__ grtc_hw_data_avail_lower(unsigned int rrp, unsigned rwp, unsigned int bufsize) +static __inline__ int grtc_hw_data_avail_lower(unsigned int rrp, unsigned rwp, unsigned int bufsize) { if ( rrp == rwp ) return 0; @@ -522,7 +522,7 @@ static int __inline__ grtc_hw_data_avail_lower(unsigned int rrp, unsigned rwp, u } /* bufsize is given in bytes */ -static int __inline__ grtc_hw_data_avail(unsigned int rrp, unsigned rwp, unsigned int bufsize) +static __inline__ int grtc_hw_data_avail(unsigned int rrp, unsigned rwp, unsigned int bufsize) { if ( rrp == rwp ) return 0;