ptp: lan743x: Use spin_lock instead of spin_lock_bh
Subsystems (3)
PATCH 1/1 ptp: lan743x: Use spin_lock instead of spin_lock_bh
lan743x_ptp_request_tx_timestamp uses spin_lock_bh, but it is only called from lan743x_tx_xmit_frame where all IRQs are already disabled.
This fixes the "IRQs not enabled as expected" warning.
Signed-off-by Lucas Tanure <[email protected]>
--- drivers/net/ethernet/microchip/lan743x_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/microchip/lan743x_ptp.c +2 -2
@@ -1712,13 +1712,13 @@ bool lan743x_ptp_request_tx_timestamp(struct lan743x_adapter *adapter)struct lan743x_ptp *ptp = &adapter->ptp;bool result = false; -spin_lock_bh (&ptp->tx_ts_lock); +spin_lock (&ptp->tx_ts_lock);if (ptp->pending_tx_timestamps <LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS ) {/* request granted */ ptp->pending_tx_timestamps++; result = true; } -spin_unlock_bh (&ptp->tx_ts_lock); +spin_unlock (&ptp->tx_ts_lock);return result; }
Signature · 1 line
2.43.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Sun, 28 Jan 2024 10:18:49 +0000 you wrote:
lan743x_ptp_request_tx_timestampusesspin_lock_bh, but it is only called fromlan743x_tx_xmit_framewhere all IRQs are already disabled.This fixes the "IRQs not enabled as expected" warning.
Signed-off-by Lucas Tanure <[email protected]>[...]
Here is the summary with links:
- ptp: lan743x: Use spin_lock instead of spin_lock_bh
https://git.kernel.org/netdev/net-next/c/96b93f08357c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html