From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D877E45F26; Tue, 24 Dec 2024 04:06:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2DB4D402E0; Tue, 24 Dec 2024 04:06:18 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4C8AD402BD for ; Tue, 24 Dec 2024 04:06:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 8320B206ADD9; Mon, 23 Dec 2024 19:06:13 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8320B206ADD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1735009573; bh=2RcxqmC/I6LWjCg69IPCzzIxaimQwyf6GYPwRflTatU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rn7vhuTNwlE1vXgxlQnnDY4k81NeKgXGcWZF/fZYhDmVgN6+5fkCHmBjxsfKRXx2Y ziVlWqdawwtf3QF0nKtLm/VaDMsh1lj8cwZNO2xzozQ8XEXPR1XyCnNRhOcdM8vgrN XBBZlD/GN+gsptwVkCsq4Xbk/PdH/VJdjwq/+cTI= From: Andre Muezerie To: Nagadheeraj Rottela , Srikanth Jampala , Kai Ji Cc: dev@dpdk.org, Andre Muezerie Subject: [PATCH 4/5] drivers/common: use portable macro for weak linking Date: Mon, 23 Dec 2024 19:05:51 -0800 Message-Id: <1735009552-31906-5-git-send-email-andremue@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1735009552-31906-1-git-send-email-andremue@linux.microsoft.com> References: <1735009552-31906-1-git-send-email-andremue@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- drivers/common/nitrox/nitrox_device.c | 16 ++++++++-------- drivers/common/qat/qat_qp.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/common/nitrox/nitrox_device.c b/drivers/common/nitrox/nitrox_device.c index 39edc440a7..6d82b49c46 100644 --- a/drivers/common/nitrox/nitrox_device.c +++ b/drivers/common/nitrox/nitrox_device.c @@ -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; diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index 4bf9bac23e..1a6faa2e18 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -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) { -- 2.47.0.vfs.0.3