DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: dev@dpdk.org
Cc: Raslan Darawsheh <rasland@nvidia.com>
Subject: [dpdk-dev] [PATCH v2] net/sfc: fix build when assert enabled
Date: Wed, 13 Oct 2021 19:32:19 +0300	[thread overview]
Message-ID: <20211013163219.1933273-1-andrew.rybchenko@oktetlabs.ru> (raw)
In-Reply-To: <20211013152027.2480175-1-ferruh.yigit@intel.com>

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 <rasland@nvidia.com>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 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


  reply	other threads:[~2021-10-13 16:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 15:20 [dpdk-dev] [PATCH] " Ferruh Yigit
2021-10-13 16:32 ` Andrew Rybchenko [this message]
2021-10-13 17:16   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2021-10-13 16:35 ` [dpdk-dev] [PATCH] " Andrew Rybchenko
2021-10-13 16:50   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211013163219.1933273-1-andrew.rybchenko@oktetlabs.ru \
    --to=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=rasland@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).