Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2166265imm; Tue, 2 Oct 2018 22:43:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV60BYdM2s75KOqh6ElrVP3JaZOWEPhG7dk4sZ6TLa713y9OlXwn3F2poBUKA3/UTiQbHfBu7 X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr7153981plb.71.1538545391513; Tue, 02 Oct 2018 22:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545391; cv=none; d=google.com; s=arc-20160816; b=FTYqp6hrVIpE4J8f+5ja/6LKfF5gGp77Ldgs11WDmrQNn9GdUmY5hFruqFhGBHZ5Fm 0EW954I1htntJoFV0/5JG/hoxFyl6i/pbOrxJve0ZTlFsvkUC3vK2wGBZADiu0CBBmb7 1x+KUl7x/xLh517zMSQyvOIUJ2wdPmlXybk2/TrK2f2xhEGH/WeKBRezXGMoNKRf4CVH lWgLJVUIc62T5pf+Yz0K0QdDfKjL+5queAlYPef412URGMQz1Xdb3p+7hBxSSAq9ciC+ E3fgClkeDTkE8Wi9R8vU2z2Oj7FVVtXTEa/zL7EJfPuw3cVKqzu3pwKQUO+FzV0Nqj5i At/A== 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=5L6Z4aW4+1t2LE/MND/iINCiEdG9eaFMJEfCbvDLBaQ=; b=hXTuCq++3fkk2AWfKP+3ul5PloAz1cTUWKHMTjOkbikg4uXSPMJKxaqmfufwTYNXNZ eUg/bswt7lurPKbO8k2gxmq4ahjF0rQUv48G9VSlMOES3ykhuZaauMpphz8P6INt8Lgg WQFTaGu/FMBYBJjqKkJzWuH7P8h19cziYqd9ISoW9VN1IkbgwMHQQckIQD+kpdnoa4NU CWnEe4Zf0ItOLgEcTPpHDJm2rwnV6dFXnZQIjsZC+oSQFiJy+ndboVyiyyhYzwoyoxxb rU31So2BkpPg6NvkSNuO4ndesjCWZsgeA3kK96IpxLjOxbuotXfJZQ0vb/beUXZ5x6o/ rJqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VhDoom+T; 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 v9-v6si469207pfj.167.2018.10.02.22.42.57; Tue, 02 Oct 2018 22:43:11 -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=VhDoom+T; 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 S1726998AbeJCM0n (ORCPT + 99 others); Wed, 3 Oct 2018 08:26:43 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:41518 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbeJCM0l (ORCPT ); Wed, 3 Oct 2018 08:26:41 -0400 Received: by mail-pg1-f195.google.com with SMTP id 23-v6so1016596pgc.8; Tue, 02 Oct 2018 22:39:52 -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=5L6Z4aW4+1t2LE/MND/iINCiEdG9eaFMJEfCbvDLBaQ=; b=VhDoom+TY1K77b9/Qh+vlNgbAUyKBqHN74GHpYz7GAFqydYOaKD9cc7x9P2HLvJgVq vHPbLvZCxfNFff+tmizReKcLb+vIE/2LKf6vsRzY/a3SJl26c0+QaCvImgSslRE6kZdc Tgc72eC+38Sojg0tfUa27CwNHqLk9zxRG4uuR3MblN39ogHvq/s0vKSTyvMLQG47+LbV 4mzfWukTnRP+eQq52vnoeeD85IDsBnPmVrpgsJWWC8LjyUT8DGtb7qPbTz2bOKUCPVXr 1pdeK9VDZKq0f7eKuEHQWgoJEM9iNmZSNqYan2t6PdpV5MJw1h3ax+jhcLk+dI41LWWM Kc+w== 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=5L6Z4aW4+1t2LE/MND/iINCiEdG9eaFMJEfCbvDLBaQ=; b=B6X3LYftFRCd/wsNosyEWpVClcxd3WM46I1c0ueh9vbq260otCXplXYxCTUyaE9m7y H464a/Z5CCU1dYn3o2UJUCre1ek/NasTYUynDsLMqnFnwoNF8+ryr8VHVdMp2kieNghP 3i0M47jP0EiHPDbicwmG1VeyfGYNRQEYAnj8xLnzweUN3XHyoAZGbIa1i6buP9jvGlDe YnJaPaC7jId34ZjlDg7nBjXhK5Sm2kK7uTJbY9I1nMFu7tJbQufHRvvdkYHiIoTlUclg ALrH2QFTU6htOkW8kU87SYe15fp2j1hXTeEi8DHceUWkuu7W/m7ToYr2DBUBMjJwU32x xEwQ== X-Gm-Message-State: ABuFfogpBydKwkrz4NU7yrlv8DrOgfJlndU2R3CwEG/jmlLxtdraGbyA t22chc1FoSFky6Cx4qiPB+8= X-Received: by 2002:aa7:8598:: with SMTP id w24-v6mr3587383pfn.77.1538545192026; Tue, 02 Oct 2018 22:39:52 -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 w23-v6sm363481pgi.18.2018.10.02.22.39.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 22:39:51 -0700 (PDT) Received: by E570.localdomain (Postfix, from userid 1000) id BAF131643D0; Tue, 2 Oct 2018 22:39:50 -0700 (PDT) From: Lance Roy To: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" , Lance Roy , Jeff Kirsher , "David S. Miller" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [PATCH 04/16] i40e: Replace spin_is_locked() with lockdep Date: Tue, 2 Oct 2018 22:38:50 -0700 Message-Id: <20181003053902.6910-5-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: Jeff Kirsher Cc: "David S. Miller" Cc: intel-wired-lan@lists.osuosl.org Cc: --- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index ac685ad4d877..8ce3471723d3 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -1489,8 +1489,7 @@ int i40e_del_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr) bool found = false; int bkt; - WARN(!spin_is_locked(&vsi->mac_filter_hash_lock), - "Missing mac_filter_hash_lock\n"); + lockdep_assert_held(&vsi->mac_filter_hash_lock); hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) { if (ether_addr_equal(macaddr, f->macaddr)) { __i40e_del_filter(vsi, f); -- 2.19.0