[4/5] drivers/common: use portable macro for weak linking
Checks
Commit Message
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/common/nitrox/nitrox_device.c | 16 ++++++++--------
drivers/common/qat/qat_qp.c | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
@@ -133,29 +133,29 @@ static struct rte_pci_driver nitrox_pmd = {
.remove = nitrox_pci_remove,
};
-__rte_weak int
-nitrox_sym_pmd_create(struct nitrox_device *ndev)
+int
+RTE_WEAK(nitrox_sym_pmd_create)(struct nitrox_device *ndev)
{
RTE_SET_USED(ndev);
return 0;
}
-__rte_weak int
-nitrox_sym_pmd_destroy(struct nitrox_device *ndev)
+int
+RTE_WEAK(nitrox_sym_pmd_destroy)(struct nitrox_device *ndev)
{
RTE_SET_USED(ndev);
return 0;
}
-__rte_weak int
-nitrox_comp_pmd_create(struct nitrox_device *ndev)
+int
+RTE_WEAK(nitrox_comp_pmd_create)(struct nitrox_device *ndev)
{
RTE_SET_USED(ndev);
return 0;
}
-__rte_weak int
-nitrox_comp_pmd_destroy(struct nitrox_device *ndev)
+int
+RTE_WEAK(nitrox_comp_pmd_destroy)(struct nitrox_device *ndev)
{
RTE_SET_USED(ndev);
return 0;
@@ -945,8 +945,8 @@ qat_cq_get_fw_cipher_crc_cap(struct qat_qp *qp)
}
#endif
-__rte_weak int
-qat_comp_process_response(void **op __rte_unused, uint8_t *resp __rte_unused,
+int
+RTE_WEAK(qat_comp_process_response)(void **op __rte_unused, uint8_t *resp __rte_unused,
void *op_cookie __rte_unused,
uint64_t *dequeue_err_count __rte_unused)
{