Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5074663pxu; Thu, 10 Dec 2020 12:15:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGzIOoX1sDBU09bbJn2gWITx4lYMeAFCL9irOR5p8KUikF8q1mqdM5WhLsuqYsImSm7L4r X-Received: by 2002:a17:906:1405:: with SMTP id p5mr7737419ejc.282.1607631316673; Thu, 10 Dec 2020 12:15:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607631316; cv=none; d=google.com; s=arc-20160816; b=l3a0ZZJTuGcOZ/JYZuRCDEmrcVdQDtY0bnzNtkQUPEdut7JtChOZi4R4TtLD1hjnTb MzpqwyWyRm5t9tKSEbUAW13+55/PTyNc7UK6kK3l4FCdSSx8oA9KCvqxZV1Jt6avtJXM PYhwuRqYv3IW8hBoIf71/flNdmeQXraFnHHLve74+zro7nL7mTgiX6LvAC7UDgV2mb2c z3BVzLSstQ7ASBiLRd8861l7DGf9IbyoYanSc9go2DiSUlIN6p/24CcuqO/N3EE4kpFD hukJY/DvWp4Ay0S8Ld2n2JTUlPKsu0lrRdlk29QEu47UmGZPgU6v3UWh+eLHTsLCWtvR 0XCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=CWqbBNr4gWSCr8pvKo6/G8xp2xMusCiyp684h+DSVQc=; b=TorJz1EGEIGHCCEyCFzwVPYHsTrTPqNAQKmaX3TR5mrqGv5jx23HYRRiI8D6h+6xVZ b0Hv3KsN1ugmmit2eLxCrEBBg1Wtu3LfOQoShrLXnTEQ10Gr782gjCDV1y8EIbF4mAZj imjmQYNAdEh8htdStjUKHQq1/L2/XxSbcvxHplHXsOp23Kh06QPQ7bb7lPNpimXXqcVm WR8CrxyfV4ygy1mhEfwNUHAzEBIxFpligr/jqvEAaYsnFZzhq40QD5gZGHnYYgnpVEdQ eojYy35zVU5aJPTpTytIdANqKbtFWHU17j/8sFWov34XIUc4ot9+FrUAXaC8uG2R41xy tG/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g2ND1IRx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si3226783eje.288.2020.12.10.12.14.52; Thu, 10 Dec 2020 12:15:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=g2ND1IRx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393730AbgLJULi (ORCPT + 99 others); Thu, 10 Dec 2020 15:11:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:47991 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404607AbgLJULW (ORCPT ); Thu, 10 Dec 2020 15:11:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607630996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CWqbBNr4gWSCr8pvKo6/G8xp2xMusCiyp684h+DSVQc=; b=g2ND1IRxUoBMSrT6jQ5JShJW5a+cLoU4XULkrSVNA4tyvVsx96MqTgD6AuVcBCn66muy12 P9WiDCUgCHIScP1GMq6L2YCbV/kAOpkCfwdw4VxCkBjFT3V/cIMzc+KrwZLeOrTTyPiLzr oqpaGdnXfDE+5jlrj4TEh5AuX8TcPR8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-336-stD4G3nyORuHuKYGfQCVmw-1; Thu, 10 Dec 2020 15:09:54 -0500 X-MC-Unique: stD4G3nyORuHuKYGfQCVmw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 19CE3107ACE4; Thu, 10 Dec 2020 20:09:53 +0000 (UTC) Received: from ovpn-66-25.rdu2.redhat.com (unknown [10.10.67.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E7875D9CC; Thu, 10 Dec 2020 20:09:52 +0000 (UTC) Message-ID: <6595b15eba54cf5efc2ea801ea91c41681f33c61.camel@redhat.com> Subject: Re: [PATCH 4/6] locking/lockdep: Clean up check_redundant() a bit From: Qian Cai To: Peter Zijlstra , mingo@kernel.org, will@kernel.org, boqun.feng@gmail.com Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, bigeasy@linutronix.de Date: Thu, 10 Dec 2020 15:09:51 -0500 In-Reply-To: <20201210144619.870033538@infradead.org> References: <20201210144254.583402167@infradead.org> <20201210144619.870033538@infradead.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-12-10 at 15:42 +0100, Peter Zijlstra wrote: [] > /* > @@ -2706,6 +2666,55 @@ static inline int check_irq_usage(struct > } > #endif /* CONFIG_TRACE_IRQFLAGS */ > > +#ifdef CONFIG_LOCKDEP_SMALL > +/* > + * Check that the dependency graph starting at can lead to > + * or not. If it can, -> dependency is already > + * in the graph. > + * > + * Return BFS_RMATCH if it does, or BFS_RMATCH if it does not, return BFS_E* if > + * any error appears in the bfs search. Correction -- or BFS_RNOMATCH if it does not.