From af18760ea95c1f247cafe54262b79f73e8b904d6 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 27 May 2018 22:44:42 -0400 Subject: Inline hal_core_base(). --- core.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'core.c') diff --git a/core.c b/core.c index 10f624d..e170210 100644 --- a/core.c +++ b/core.c @@ -103,6 +103,9 @@ static inline hal_core_t *probe_cores(void) { "modexpa7", 7 * CORE_SIZE }, /* ModexpA7 uses eight slots */ }; + if (offsetof(hal_core_t, info) != 0) + return NULL; /* Paranoia, see hal.h */ + if (head != NULL) return head; @@ -302,16 +305,6 @@ void hal_core_free(hal_core_t *core) } } -hal_addr_t hal_core_base(const hal_core_t *core) -{ - return core == NULL ? 0 : core->info.base; -} - -const hal_core_info_t *hal_core_info(const hal_core_t *core) -{ - return core == NULL ? NULL : &core->info; -} - /* * Local variables: * indent-tabs-mode: nil -- cgit v1.2.3