aboutsummaryrefslogtreecommitdiff
path: root/core.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2018-05-27 22:44:42 -0400
committerRob Austein <sra@hactrn.net>2018-05-27 22:44:42 -0400
commitaf18760ea95c1f247cafe54262b79f73e8b904d6 (patch)
treeed9f597e06752cbf8781251e9b1be672ec708f01 /core.c
parent78992f6aec779a1dc56429c60bfea276405d7a8c (diff)
Inline hal_core_base().
Diffstat (limited to 'core.c')
-rw-r--r--core.c13
1 files changed, 3 insertions, 10 deletions
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