Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp639075rdb; Sun, 28 Jan 2024 02:19:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IF04mrd+7smH/EbrZn6c9ZD8cVf9N6rpnQW8ZX1UHtDWhckUVOxOH5R/ZCsF3ipMI5JBVHq X-Received: by 2002:a05:6358:9490:b0:176:916a:9744 with SMTP id i16-20020a056358949000b00176916a9744mr3185540rwb.13.1706437147007; Sun, 28 Jan 2024 02:19:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706437146; cv=pass; d=google.com; s=arc-20160816; b=AUs6dIMasWbO+hop3xjoGuGtKa0NCRKKs2RpQiuoteEDL61UK6asxhj4uDTt3ToaET UvF5d5TTRiMXCItLAez/MDg8uLmUxeV6i96Jadw6ll027Rhs1VhZW3dwaQzClPVWPdv4 64STQFmFsirPpfxiTZW42Yn+0qBFJUPsKbR010pFvP99SCh0anEVTD7WjGXWCHlr5eNX FCfnv10SCZNuYZiaJigTXKtlIPX+B2fa5sClxjxpZJym4+1MhFcotKPR5TfLirSCCxMo rKw03egM+tgq7MCCZZrZu+NNWoJWjZe23KBx8EiDrDZ7lAgHuYmfWz8IU51QV7aCMxZo i5ag== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41585-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id p12-20020a17090adf8c00b00290cd0b42fasi6050851pjv.146.2024.01.28.02.19.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 02:19:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41585-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41585-linux.lists.archive=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 A0315282709 for ; Sun, 28 Jan 2024 10:19:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84A7B1B27D; Sun, 28 Jan 2024 10:18:57 +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 Content-Transfer-Encoding: 8bit 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; } -- 2.43.0