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 30EF1A0C55; Wed, 13 Oct 2021 18:33:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59798410F5; Wed, 13 Oct 2021 18:32:26 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id CEF01410EF for ; Wed, 13 Oct 2021 18:32:24 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 8B7AD7F5FD; Wed, 13 Oct 2021 19:32:24 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id E94B67F530; Wed, 13 Oct 2021 19:32:20 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru E94B67F530 Authentication-Results: shelob.oktetlabs.ru/E94B67F530; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Raslan Darawsheh Date: Wed, 13 Oct 2021 19:32:19 +0300 Message-Id: <20211013163219.1933273-1-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211013152027.2480175-1-ferruh.yigit@intel.com> References: <20211013152027.2480175-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] net/sfc: fix build when assert enabled 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 Sender: "dev" When 'RTE_ENABLE_ASSERT' is enabled (meson -Dc_args=-DRTE_ENABLE_ASSERT) build fails: ../drivers/net/sfc/sfc_repr.c: In function ‘sfc_repr_start’: ../drivers/net/sfc/sfc_repr.c:251:20: warning: implicit declaration of function ‘sfc_repr_lock_is_locked’; did you mean ‘rte_spinlock_is_locked’? [-Wimplicit-function-declaration] 251 | SFC_ASSERT(sfc_repr_lock_is_locked(sr)); | ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: c85675423f01 ("net/sfc: implement port representor start and stop") Reported-by: Raslan Darawsheh Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/sfc_repr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_repr.c b/drivers/net/sfc/sfc_repr.c index 6ec83873ab..2500b14cb0 100644 --- a/drivers/net/sfc/sfc_repr.c +++ b/drivers/net/sfc/sfc_repr.c @@ -116,7 +116,7 @@ sfc_repr_lock_init(struct sfc_repr *sr) rte_spinlock_init(&sr->lock); } -#ifdef RTE_LIBRTE_SFC_EFX_DEBUG +#if defined(RTE_LIBRTE_SFC_EFX_DEBUG) || defined(RTE_ENABLE_ASSERT) static inline int sfc_repr_lock_is_locked(struct sfc_repr *sr) -- 2.30.2