Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2164322imm; Tue, 2 Oct 2018 22:40:40 -0700 (PDT) X-Google-Smtp-Source: ACcGV63wFY8Kf2XqZ1gD2bTHyR71B1VaOMArmOn/S7UyxgdijVAjNCnnS7rRpfU+Jdz5UC9RDtWQ X-Received: by 2002:a62:6a87:: with SMTP id f129-v6mr19475273pfc.163.1538545240328; Tue, 02 Oct 2018 22:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545240; cv=none; d=google.com; s=arc-20160816; b=jn8/Xh3ntVgcp8L0Pi/vWfcl5EUg28dE6hRKpZltJcn+dGfHylIzlBEuMjV4kdFx95 ZgsSCQIsNXl8riUot2LGeogFCFSdQnAAQI6a5/P9ODGz/xs6xhca3i6byhrnr9i5Ktof PiyCstXiYAL626bgH26IJP8Qsn4O5sSui668SZT30gHWVcRfj+hBhlWUSmRiCaXgxtrV 9ZFKXGtYeJ8m8S4z3dg+mQdExztPv7fzGXyxBynWJG2YkkQZ4lvh4d/auN7LEd5kJwsV BhEu1vUvHzdd5M/pwImN3/e23w0BVQQeYcx/ND9WykIhN+SLAVBdSDQyB/GpO+qcjHFG 2Vqg== 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=DByBoSbdwmE2yss2OueEXXtxDWCriUE65qgmrge67jE=; b=qp4vcrbrwT+nIq6rXExohWBGY4YPTlTQkyr2lfXuswm3Smtm7catXDwJZIxHPKLblG +DL9/HOZV7O+0rXhIDzPcIe+XTFExAdwSso8XhAOgevSSjkHnkHZTZptGiN/6WE9sukG /nvbJGmW+4CKQD7M9VHnK2gJZdyRuVNtF1MsyH4/RdB2qFrZEviMFl+sUQLlREFcJLht HVf2AQCI92StgV4msybPROnJVm1aUfDKjjXVf79DZsBNYZJPlyRZg2iX+S6WWQQiuiGf hh2WqSQU6THEjUQZ/dKRfEh+qxYUOf6ti5gs9kUPDFqaPze9+1rTAOnn0efqXnNU73Sc M+Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p2UnFVCz; 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 m15-v6si391881pga.114.2018.10.02.22.40.25; Tue, 02 Oct 2018 22:40:40 -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=p2UnFVCz; 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 S1727183AbeJCM0s (ORCPT + 99 others); Wed, 3 Oct 2018 08:26:48 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38150 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbeJCM0r (ORCPT ); Wed, 3 Oct 2018 08:26:47 -0400 Received: by mail-pg1-f194.google.com with SMTP id r77-v6so1026692pgr.5; Tue, 02 Oct 2018 22:39:57 -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=DByBoSbdwmE2yss2OueEXXtxDWCriUE65qgmrge67jE=; b=p2UnFVCzbQT2TNU+gMIaZYkWA1b+75YEfWd5x6xV56vwS9fh9ijPJxMFvHjksTcXUX v9M0AYGcKsGGZASFKasVcmxYG7cajrjYkJEU/dbXrFAfCnR0PlII4WZusTIu8ZbibmUq bul/rI3vKZOaxk2BwHRDBiOrqtHOEKJOMyXy+p/jzDzl78hz9hl6QjAgsohvI6Qt+Okd 76IJYIPRezW0jhBZGP64iG7bkCCpQbdw7ymO52UAaaF+vyDRmbOL4uOW65huT75SCz8J HAe8+dzsq58sPyZRmX3biERy2vWlTi/jUQhbNFjhMuvKpltCtiho0l2d8ku+34zqxWyv wJCA== 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=DByBoSbdwmE2yss2OueEXXtxDWCriUE65qgmrge67jE=; b=Zhxg7lbA1JhCPGy/3z3lyElMwss/E3Cjt8EowlLHqi6uyiSE+SuTjkz7WF+cP+aFRV 6lv2f74kVBq05lg+dO2dZ55FmABXSpemunYFVum62Z7mUwJG+Sgcwi4Hc2vAKZOokL/R PcQyKdAEi7W9f3fSaJIXUcJ4KH6cm6+VfsPb60UcFAVbj/Y7+RWxePZ59iaGOCNzURqH 2u9rQY9yvdtC6Y2iehbaqERoUmQHxNff1K6SxKqBcXdVOYG95kcmV+BJTeoIXI2DwO5T BplrVFqVk7cquDNt6DTVtCFvuPNu+gtraqGmu3UD5GTiEybYHGshIzVtpuxqbEWnvjbd znRw== X-Gm-Message-State: ABuFfoiegRVZkYHoOGxKD4p9CfRlOn4cQ1eT5fwtQ4BdDGcKWDgBgN71 TNbH7t8Nve+ooLConnFZrfY= X-Received: by 2002:a63:cc04:: with SMTP id x4-v6mr16962151pgf.33.1538545197507; Tue, 02 Oct 2018 22:39:57 -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 k83-v6sm583290pfj.63.2018.10.02.22.39.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 22:39:57 -0700 (PDT) Received: by E570.localdomain (Postfix, from userid 1000) id 42B8F1643D0; Tue, 2 Oct 2018 22:39:56 -0700 (PDT) From: Lance Roy To: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" , Lance Roy , Solarflare linux maintainers , Edward Cree , Bert Kenward , "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH 06/16] sfc: Replace spin_is_locked() with lockdep Date: Tue, 2 Oct 2018 22:38:52 -0700 Message-Id: <20181003053902.6910-7-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: Solarflare linux maintainers Cc: Edward Cree Cc: Bert Kenward Cc: "David S. Miller" Cc: --- drivers/net/ethernet/sfc/efx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c index 330233286e78..f40c3d5ca413 100644 --- a/drivers/net/ethernet/sfc/efx.c +++ b/drivers/net/ethernet/sfc/efx.c @@ -3193,7 +3193,7 @@ struct hlist_head *efx_rps_hash_bucket(struct efx_nic *efx, { u32 hash = efx_filter_spec_hash(spec); - WARN_ON(!spin_is_locked(&efx->rps_hash_lock)); + lockdep_assert_held(&efx->rps_hash_lock); if (!efx->rps_hash_table) return NULL; return &efx->rps_hash_table[hash % EFX_ARFS_HASH_TABLE_SIZE]; -- 2.19.0