Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2165289imm; Tue, 2 Oct 2018 22:41:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV60Dc0344KFa/S0QUWtwsEWCSaKLUzGpGWxTb0nfUJP7SEfahM/Lj77W4FSdxLg81SaJ4jzO X-Received: by 2002:a17:902:4401:: with SMTP id k1-v6mr19376267pld.97.1538545316107; Tue, 02 Oct 2018 22:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538545316; cv=none; d=google.com; s=arc-20160816; b=a/D3Cv58nTGkkOrTSUGtMKvWrZi6WVvUC1/aM/KQ+56salXSmBcdn/syELi5b/XbiT L3I6nn384Zm5TulMoSz0dOy15W7TTL528Z3FH7EEUh/RWwtyVSnKGyya59/pZa3qurCj 9lNGnIfdgo76dnvug7R6xkzHzecaR+2xVC38rY5P/2/3GUR8F47gmhRnGfpeFY3wRJPW 4q9Nhw0vg0glkdmnFGopTwwbrPJfCl3Fo41Aqd5vHjanA1LEjiNPe5m1rYwRYPHefFHV hC0ys/gParhuG9ez9YPqoTLC2M9KdPo04J95vXGNK5gxqSCp9Nip4rGIY3r20bicqscp JKfg== 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=z9CwLD0k5YiJjok0Y71vUUmqjQPguT7a+6nipaDQNPQ=; b=oFn5j2Hy9YhXa5t2OyH+WnIe2Um5ZM45jfxzVKDfs4Hfaa05VThgYe6Dl+pooPFxqT xMzV1Wwv/McoCRFv5EWTV56tmd5eRQhT6dPn3g2kfj5Lh7Ah/W4TZJKgxkPD5x1PIQt5 bCkyKW+g/ojV8tSzG3Ba9JhP2DXAnS0glZtHHBfmRmoQhEcFVelPc06IJ2t+VhEPtDL/ xIoL65DO35tgM5+0GzrGMzUYaHUZjkovt9FadPFN38B8NYQuV770OTa8V7ZFJDfyb3tt zVOQDwdMuX5o+J3AyVSoVKF5JRcW3vGhQJvLZIkwSaVHEvaJCfso5aoswMEDcq4WYiTO Bf/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="N/Br6iBq"; 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 y5-v6si338417plt.438.2018.10.02.22.41.41; Tue, 02 Oct 2018 22:41:56 -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="N/Br6iBq"; 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 S1727351AbeJCM04 (ORCPT + 99 others); Wed, 3 Oct 2018 08:26:56 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:35864 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbeJCM0z (ORCPT ); Wed, 3 Oct 2018 08:26:55 -0400 Received: by mail-pf1-f196.google.com with SMTP id b7-v6so1115775pfo.3; Tue, 02 Oct 2018 22:40:05 -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=z9CwLD0k5YiJjok0Y71vUUmqjQPguT7a+6nipaDQNPQ=; b=N/Br6iBqUBH7v3/lOCQagf+Ey8ayM7vBx0E0lNVo0XlMSzUPyt/ILU3+PSGr1+XS83 HQTHK6ylUv2DWsWhgbTIJH7kuDRAbs/qHPcg+FEkoT0wgJQztdS3aIpBAXT2LRwqr1So iVJgXaqJJw8dvNBTgHnkCSI8Yuo2E++1LqlA6P0TpIZJ0/WzXTbb5/v0CFD170Exz5YL rXqF3sD7IxTtBM4z9v9zsSyxloKcNbPck+kENCd/spTd2KADd9lqhOlzHSKzfjUylD4J WwjzMPfXm9LXO+x7xwOMuT5avRP/gV+hKDOQDAAN4IEZcZCwslAnetd+yq9kVxLEy2pX fhLg== 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=z9CwLD0k5YiJjok0Y71vUUmqjQPguT7a+6nipaDQNPQ=; b=qvZvenso9QYcTsjGblPfUHvEv1f0fALkj+vpD6y9GzW7eUR9RUMKZDPum5kkbnVIFE kQWaSvau4DIAELSGP9L3dBGgJC1MZ3Zdbq8weEI765N73OeojUYB9fY1nmSUQ+AtAfri VstHlALftTWcObljSYvXCusiDm43JtLa8I6j23L0eV9o7Oe9ke5ym4jLxMvdy1EOGpwW xUVnAMe3tDls67jDVgePKRU1vScP9mACxDihCOMGplarK8P7iLI8IYET/9QVWFpR2om4 olGVBH2V9uat8QFP+unCrxboKmQY9cazBDqo1DY0ypoDOTMFkM5O92dLcuculSVCPQSN QM0w== X-Gm-Message-State: ABuFfoiMepxp2IwVfYT5BrwEYepTIGEj7Ik4LvfC3Wze/tijpl9/eYnB erw1xAX/tBpQIYxmBPriPYI= X-Received: by 2002:a63:1d62:: with SMTP id d34-v6mr7880143pgm.180.1538545205503; Tue, 02 Oct 2018 22:40:05 -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 o85-v6sm752811pfk.94.2018.10.02.22.40.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Oct 2018 22:40:04 -0700 (PDT) Received: by E570.localdomain (Postfix, from userid 1000) id 267281643D0; Tue, 2 Oct 2018 22:40:04 -0700 (PDT) From: Lance Roy To: linux-kernel@vger.kernel.org Cc: "Paul E. McKenney" , Lance Roy , Karan Tilak Kumar , Sesidhar Baddela , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Subject: [PATCH 09/16] scsi: Replace spin_is_locked() with lockdep Date: Tue, 2 Oct 2018 22:38:55 -0700 Message-Id: <20181003053902.6910-10-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: Karan Tilak Kumar Cc: Sesidhar Baddela Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: --- drivers/scsi/snic/snic_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/snic/snic_scsi.c b/drivers/scsi/snic/snic_scsi.c index d9b2e46424aa..42e485139fc9 100644 --- a/drivers/scsi/snic/snic_scsi.c +++ b/drivers/scsi/snic/snic_scsi.c @@ -2001,7 +2001,7 @@ snic_dr_finish(struct snic *snic, struct scsi_cmnd *sc) } dr_failed: - SNIC_BUG_ON(!spin_is_locked(io_lock)); + lockdep_assert_held(io_lock); if (rqi) CMD_SP(sc) = NULL; spin_unlock_irqrestore(io_lock, flags); @@ -2604,7 +2604,7 @@ snic_internal_abort_io(struct snic *snic, struct scsi_cmnd *sc, int tmf) ret = SUCCESS; skip_internal_abts: - SNIC_BUG_ON(!spin_is_locked(io_lock)); + lockdep_assert_held(io_lock); spin_unlock_irqrestore(io_lock, flags); return ret; -- 2.19.0