From patchwork Sun Jan 28 10:18:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Tanure X-Patchwork-Id: 193115 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp875774dyb; Sun, 28 Jan 2024 02:19:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFYycf7lxlfVeTjXeqvL/BdELjoXd10DMplwuWsh2wTyhoC1bNsIsVwunDDtQlLxEnL2s1h X-Received: by 2002:a92:d203:0:b0:361:99cf:9ef7 with SMTP id y3-20020a92d203000000b0036199cf9ef7mr4094244ily.2.1706437156189; Sun, 28 Jan 2024 02:19:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706437156; cv=pass; d=google.com; s=arc-20160816; b=Tzlo74baH3RO0qznUbNpbO4oGT23cGqgeZBENLm/djEb2ZAi9I+yfV6pLHLUUxcvr7 zhZS7lzw5aDeqdlcZdN5Yy0G9LPwJ1EbSgR4CWuvf0c1+D7JyNRpnnaBpOb6NA19n36d Gk8Z/yOAs++lgwBdsvmaq8RRpF0Z5l70nrEJN387cOE405UKHUu2j2V5WJvnQJ+IpUJa COU/BqLltLrTdiNgXTCZ88y689PafbYpdhZwcrXxXF49qEnlnjveSTMV/wnv6nD3w2Po wOuIh8uyxRnm9a2LSnKLC7qN8uk8WyG3wBSULu+QC7ad8qzDUyj6CxGWKAR7yvi1ucas k0nA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=+jLClgMgKHAYy8oi26SoamRje703fIGbCXV126plVXY=; fh=KmFO8tjUcs4kDkh2O2JqidgG0PocmnDH4Dbbp5X3IXs=; b=iG5J1lmZ+JgnAFtqHjeSPsYYqShXhKqwTmaDKoTV42M9bE+sOyM2bsh1pr1LIXdTbd egF4XAiYdAmtu57ihQo/g1A9upMqXlMZHAnc+w0Vj/ELKubWt/9qVPuCel7BnO02KF0c gCo10UhteDL8SKMljk7M0Is9Cq1h17gzoaNFA6QsweG75Uvo3XJwbyhWVd0iTag9LD84 ouIQPjis4cXyxF2UV2numUtUQp798BjKEGc98MrhGBl+Ywhb7XYo32lk6OsCIv498WYi 18s2u3pkDKMWYrxZhmjLonJmcIt+qwqaLKxUoZiwi2W5oz17FLchDAICH/z3DkmtoSxy BVfA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-41585-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41585-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r6-20020a632b06000000b005ca5b61ca33si3999061pgr.224.2024.01.28.02.19.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 02:19:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41585-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-41585-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41585-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EDDB4282443 for ; Sun, 28 Jan 2024 10:19:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D5B41EB2C; Sun, 28 Jan 2024 10:18:58 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31E2CDF55; Sun, 28 Jan 2024 10:18:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706437137; cv=none; b=LX5Q34AZhQLjMrISZW45ouMuFH0OKajJCkmyJrGn/QPEoUoWDH9XePCTK1vZK3rhiuLOS1lDuEmbFLb0O/xWVl/oFBD8Vt0Rk1Nh6nZtKaf90ZwEmJy/9egFI3DEUgbGE+5m3WdMpGMWL+WRWkrojV+H9uRNRErKvFTsJpy3zko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706437137; c=relaxed/simple; bh=xY9d5ERXouy1ZaiI+F1+aXQOChBlb7NLWX7kgpBMQkg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IIBJeAYZNdkxFukYxywHvKYT0U3wBSY7bZ5G9zrP/x7aAc9Cbk58Mj2aCWMVL+KZ0zjak8MmSfsMkSLkJ/1BxUG86ypWSxDFiuZ26zwVV//2blwZSTFfoa7VtoTWe/O50gmJgayhcl6RceiN8cpqC8Tgh+SCtBFiFga2qzQKhaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40ef64d8955so747715e9.3; Sun, 28 Jan 2024 02:18:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706437133; x=1707041933; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+jLClgMgKHAYy8oi26SoamRje703fIGbCXV126plVXY=; b=NPRFWsja7jrGluOBwcp6Sp6UcAy4MfJMtatrukG97sa8m0GB++CtBnpP3YV94guOgD CIhkTtJpOU6H2eYnouwRu6OEqcisDZ9oMcOSKJ36YridA3JtplbDMr0iS1Np/BA7A8gX mWLTpAy+tQgSJjbV2OYwC5XmxMPfWRK/Rz3TbBI37EkHyGp1hLxHIjHegLmKzaq5MHSF mKd+W1enDb9WEonNCTudoafkq2XokAb0SXGKZ08MA7LfNMQoTwt40d/nNeZ0BjaieWdd sqwtAAPmcIrViAf0wmLZvoUFC4IF7aGJW326NVIStzdR5U6xKvW80vMfxwEAhHF+NY8t MLyg== X-Gm-Message-State: AOJu0Yy/dSp9vtm6adUNWuYlCKnN2z8AICLzTzooSIlKDAeoycZu9Q+H jLzkqtoBDBx2F54potv6LjHCtgAwZtvfqEdERgempC7gOwENRL8Z X-Received: by 2002:a05:600c:35d6:b0:40e:6703:af8a with SMTP id r22-20020a05600c35d600b0040e6703af8amr2667929wmq.41.1706437133059; Sun, 28 Jan 2024 02:18:53 -0800 (PST) Received: from ryzen.lan (cpc147820-finc19-2-0-cust1005.4-2.cable.virginm.net. [86.16.175.238]) by smtp.gmail.com with ESMTPSA id g9-20020a05600c310900b0040ef2e7041esm1594505wmo.6.2024.01.28.02.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 02:18:52 -0800 (PST) From: Lucas Tanure To: Bryan Whitehead , UNGLinuxDriver@microchip.com, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Lucas Tanure Subject: [PATCH] ptp: lan743x: Use spin_lock instead of spin_lock_bh Date: Sun, 28 Jan 2024 10:18:49 +0000 Message-ID: <20240128101849.107298-1-tanure@linux.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789329047644893669 X-GMAIL-MSGID: 1789329047644893669 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 --- drivers/net/ethernet/microchip/lan743x_ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/lan743x_ptp.c b/drivers/net/ethernet/microchip/lan743x_ptp.c index 2f04bc77a118..2801f08bf1c9 100644 --- a/drivers/net/ethernet/microchip/lan743x_ptp.c +++ b/drivers/net/ethernet/microchip/lan743x_ptp.c @@ -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; }