From 1f23f8b0fecc275c4111e8b69ea3e7b4554b6584 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Wed, 24 Jan 2018 18:10:11 +0000 Subject: [PATCH] Make the trivial imx_soc_family() function an inline in imx_machdep.h. The imx_machdep.c file is on the fast path to non-existance and this would be the only thing left in it after some watchdog changes are completed. --- sys/arm/freescale/imx/imx_machdep.c | 7 ------- sys/arm/freescale/imx/imx_machdep.h | 7 ++++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/arm/freescale/imx/imx_machdep.c b/sys/arm/freescale/imx/imx_machdep.c index 155afee36da2..8e3152d34673 100644 --- a/sys/arm/freescale/imx/imx_machdep.c +++ b/sys/arm/freescale/imx/imx_machdep.c @@ -105,10 +105,3 @@ imx_wdog_init_last_reset(vm_offset_t wdsr_phys) } } -u_int -imx_soc_family(void) -{ - return (imx_soc_type() >> IMXSOC_FAMSHIFT); -} - - diff --git a/sys/arm/freescale/imx/imx_machdep.h b/sys/arm/freescale/imx/imx_machdep.h index 4a74452ff129..0717246495b5 100644 --- a/sys/arm/freescale/imx/imx_machdep.h +++ b/sys/arm/freescale/imx/imx_machdep.h @@ -61,7 +61,12 @@ void imx_wdog_init_last_reset(vm_offset_t _wdsr_phys); #define IMXSOC_FAMSHIFT 28 u_int imx_soc_type(void); -u_int imx_soc_family(void); + +static inline u_int +imx_soc_family(void) +{ + return (imx_soc_type() >> IMXSOC_FAMSHIFT); +} #endif