[3/5] drivers/bus: use portable macro for weak linking

Message ID 1735009552-31906-4-git-send-email-andremue@linux.microsoft.com (mailing list archive)
State Rejected
Delegated to: David Marchand
Headers
Series use portable macro for weak linking |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andre Muezerie Dec. 24, 2024, 3:05 a.m. UTC
MSVC uses pragmas to indicate weak linking, so the old __rte_weak
attribute needs to made into a macro so that the same syntax can
be used for MSVC and other compilers like gcc.

This patch replaces __rte_weak with macro RTE_WEAK.

Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
---
 drivers/bus/auxiliary/auxiliary_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/bus/auxiliary/auxiliary_common.c b/drivers/bus/auxiliary/auxiliary_common.c
index e6cbc4d356..147009ddab 100644
--- a/drivers/bus/auxiliary/auxiliary_common.c
+++ b/drivers/bus/auxiliary/auxiliary_common.c
@@ -41,8 +41,8 @@  auxiliary_devargs_lookup(const char *name)
  *
  * Stub for OS not supporting auxiliary bus.
  */
-__rte_weak bool
-auxiliary_dev_exists(const char *name)
+bool
+RTE_WEAK(auxiliary_dev_exists)(const char *name)
 {
 	RTE_SET_USED(name);
 	return false;
@@ -53,8 +53,8 @@  auxiliary_dev_exists(const char *name)
  *
  * Stub for OS not supporting auxiliary bus.
  */
-__rte_weak int
-auxiliary_scan(void)
+int
+RTE_WEAK(auxiliary_scan)(void)
 {
 	return 0;
 }