Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2164362imm; Tue, 2 Oct 2018 22:40:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV61bWDhJDEgzjcCnkC1Y305gDZY2v31aTPodSmH1N7jbWujLjMUvef5emR8CfiquO+IIdXEA X-Received: by 2002:a17:902:6848:: with SMTP id f8-v6mr20117546pln.27.1538545243252; Tue, 02 Oct 2018 22:40:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545243; cv=none; d=google.com; s=arc-20160816; b=AsI3OCqNzHKZgDjDLxuMle9SztQgVIGi9CCuR9Jhun4BoYS9jSSO2zNLIIEqsXeomB 37cqHYZWZFQGAg7/s3XmQZ6WUxnBBeS1qB/xdpr/M+KFq5nKyCYPidUILhB8OYvcowwV 6oXt2x7UEbAAeRKutDju6oVzrOoRZzoJbOSgZDaWwxaHAzIZg7EjfpL+tgUrtX8H4V8+ Mb1OpbO6M+uEGJ1NZQIJ97PaW60oDb7sTQ1giNkcYbgVAtO5dJfgwqzVkncw1wMu2UdO /GLRf7tnXnDHBFTF5EciNF9k6u390kSIoAmS+nfu83VNjznTbw2ilcZ23NE7s7qieb0F g9tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :reply-to:references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rhaUw2vr+1oEhwDIxV+ggRivRUm4V+5UiVodftIxguw=; b=xtd7oOikgcWHKoYzpc9LNcuD3zq1dpC1xMUTRTM6tmTR0qMS8NHyy085LPvzhZOfg3 syv/VByNDigfbzyIV6GTIuNHigb+Se+/+GTIh4HX324bH4qBug1WMm8GsuRpMmR1NTBU 6qnn1Bd5/Rxvehdo6CgoIVkQkr4xZYZTv8PhTo9eIGl4yBe43ScVPVlW8FbEOgvzot2w 2iZupbBzmOssj/6tZI1oMhjabuVYFJyxhrnx6OzJeH+elbvlSLRpFEHy7Ta7S50M60sE SfW8qs8qXOdXFYfqxkWh8RwdLS8CpGq0oXuZfPZOGzRbJSc9O6Cup2LSZ+LVmOZuktn9 LU2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qN0lHFrj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si260406pgg.91.2018.10.02.22.40.28; Tue, 02 Oct 2018 22:40:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qN0lHFrj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727251AbeJCM0v (ORCPT + 99 others); Wed, 3 Oct 2018 08:26:51 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:39437 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbeJCM0u (ORCPT ); Wed, 3 Oct 2018 08:26:50 -0400 Received: by mail-pl1-f193.google.com with SMTP id w14-v6so2873168plp.6; Tue, 02 Oct 2018 22:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=rhaUw2vr+1oEhwDIxV+ggRivRUm4V+5UiVodftIxguw=; b=qN0lHFrj86BURnPbRHZxjqJIylAVz1EF/bPgemozpHJLinT1US3FNecqlevsLsklHI h5rz9nMNzol2ZoJ9BMTFS+HzVRDUhBx5OQM7kXNaO3fd8GjyU4Z0LV9dS5sUV1jKtPyS uWyrJL5Xa8U/i3rtOEdMweaC4JGnd/50qH6ECdI1VrlB1ceqvqna1E5M3Tq8as/5sTAi 09hXprDE1jrfM0ijBcxncY+a7h7JX6SVA8BAk5fSh3yIYgzOMM2qjcPdeZHDXUivj65G MpizYz2cBeYGbqw54bytwzG3/0zaTh9+6bqMAohUnJnqzJoEVARKicz/5EhDT1CXLkil XwXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=rhaUw2vr+1oEhwDIxV+ggRivRUm4V+5UiVodftIxguw=; b=a5dWBsSBgAAx4zjffaAqUkVf13KQW1UAHl0sFTOjSEU+zx1LfIwn3IbP4guPjqw34f 2r7GW2ajeqTozor6ChU/8GOnpEeJkakWg3KckTAg5vCJcHUDNEJA0NImPshqLh+Ojsgn JJ0F/OJeGhfVruvcThnv3OOwKQlRCxHmDe7/tWC8vhaj+MvtbGvbZzSIIBte+LqsYD00 rUU8QQJ0HrPD3wDp0IhxWNgsXiVA4hUf1k+lwO8CfGS0fWqg65uh6KP1N56095ZpLSBm +Oyx2aoE+VcjRbUksa8uMJhIhD9HLkPw1HLKrn+Ybdu9x4kZoQOx4Y7qhIqiyRgSA7ac kBeg== X-Gm-Message-State: ABuFfoiLg3mD+h69w7R98EcaQ2IR5S0bjRRKcjd8DdLh/zHYibZDnktO uXwKO3VZxEusyP2m9lCkSrsB78NdMMs= X-Received: by 2002:a17:902:1026:: with SMTP id b35-v6mr20125938pla.283.1538545200244; Tue, 02 Oct 2018 22:40:00 -0700 (PDT) Received: from E570.localdomain (c-24-21-68-121.hsd1.or.comcast.net. [24.21.68.121]) by smtp.gmail.com with ESMTPSA id u184-v6sm864190pgd.27.2018.10.02.22.39.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 22:39:59 -0700 (PDT) Received: by E570.localdomain (Postfix, from userid 1000) id EEF151643D0; Tue, 2 Oct 2018 22:39:58 -0700 (PDT) From: Lance Roy To: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" , Lance Roy , Steve Glendinning , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH 07/16] smsc: Replace spin_is_locked() with lockdep Date: Tue, 2 Oct 2018 22:38:53 -0700 Message-Id: <20181003053902.6910-8-ldr709@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181003053902.6910-1-ldr709@gmail.com> References: <20181003053902.6910-1-ldr709@gmail.com> Reply-To: Lance Roy MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy Cc: Steve Glendinning Cc: "David S. Miller" Cc: --- drivers/net/ethernet/smsc/smsc911x.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/smsc/smsc911x.h b/drivers/net/ethernet/smsc/smsc911x.h index 8d75508acd2b..51b2fc1a395f 100644 --- a/drivers/net/ethernet/smsc/smsc911x.h +++ b/drivers/net/ethernet/smsc/smsc911x.h @@ -67,7 +67,7 @@ #ifdef CONFIG_DEBUG_SPINLOCK #define SMSC_ASSERT_MAC_LOCK(pdata) \ - WARN_ON_SMP(!spin_is_locked(&pdata->mac_lock)) + lockdep_assert_held(&pdata->mac_lock) #else #define SMSC_ASSERT_MAC_LOCK(pdata) do {} while (0) #endif /* CONFIG_DEBUG_SPINLOCK */ -- 2.19.0