[RFC,v2,01/10] bus/auxiliary: remove weak symbols
Commit Message
Rather than use weak symbols, expose stubs symbols when needed.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/bus/auxiliary/auxiliary_common.c | 6 ++++--
drivers/bus/auxiliary/meson.build | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
@@ -36,12 +36,13 @@ auxiliary_devargs_lookup(const char *name)
return NULL;
}
+#ifndef AUXILIARY_OS_SUPPORTED
/*
* Test whether the auxiliary device exist.
*
* Stub for OS not supporting auxiliary bus.
*/
-__rte_weak bool
+bool
auxiliary_dev_exists(const char *name)
{
RTE_SET_USED(name);
@@ -53,11 +54,12 @@ auxiliary_dev_exists(const char *name)
*
* Stub for OS not supporting auxiliary bus.
*/
-__rte_weak int
+int
auxiliary_scan(void)
{
return 0;
}
+#endif /* AUXILIARY_OS_SUPPORTED */
/*
* Update a device's devargs being scanned.
@@ -7,6 +7,7 @@ sources = files(
'auxiliary_params.c',
)
if is_linux
+ cflags += '-DAUXILIARY_OS_SUPPORTED'
sources += files(
'linux/auxiliary.c',
)