linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.10] rt: Fix buid issue in be2net
@ 2025-03-28 20:29 Ben Hutchings
  2025-03-31  9:38 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2025-03-28 20:29 UTC (permalink / raw)
  To: Luis Claudio R. Goncalves; +Cc: linux-rt-users

[-- 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 --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-31 19:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28 20:29 [PATCH 5.10] rt: Fix buid issue in be2net Ben Hutchings
2025-03-31  9:38 ` Sebastian Andrzej Siewior
2025-03-31 19:55   ` Luis Claudio R. Goncalves

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).