From: Ben Hutchings <benh@debian.org>
To: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: [PATCH 5.10] rt: Fix buid issue in be2net
Date: Fri, 28 Mar 2025 21:29:16 +0100 [thread overview]
Message-ID: <Z-cGnAlIvThsPiH8@decadent.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
The problem described here is specific to v5.10-rt.
The function be_cmd_unlock() includes the line:
return spin_unlock_bh(...);
In 5.10-rt, with CONFIG_PREEMPT_RT enabled, spin_unlock_bh() is a
macro that doesn't expand to a valid expression, so this fails to
compile.
A similar issue was recently fixed in at_hdmac. Do the same thing
here: make the spin_unlock_bh() and return 2 separate statements.
Signed-off-by: Ben Hutchings <benh@debian.org>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 9812a9a5d033..b3540b3d2862 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -875,10 +875,12 @@ static int be_cmd_lock(struct be_adapter *adapter)
/* Must be used only in process context */
static void be_cmd_unlock(struct be_adapter *adapter)
{
- if (use_mcc(adapter))
- return spin_unlock_bh(&adapter->mcc_lock);
- else
+ if (use_mcc(adapter)) {
+ spin_unlock_bh(&adapter->mcc_lock);
+ return;
+ } else {
return mutex_unlock(&adapter->mbox_lock);
+ }
}
static struct be_mcc_wrb *be_cmd_copy(struct be_adapter *adapter,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2025-03-28 20:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 20:29 Ben Hutchings [this message]
2025-03-31 9:38 ` [PATCH 5.10] rt: Fix buid issue in be2net Sebastian Andrzej Siewior
2025-03-31 19:55 ` Luis Claudio R. Goncalves
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=Z-cGnAlIvThsPiH8@decadent.org.uk \
--to=benh@debian.org \
--cc=lgoncalv@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.