Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp319553yba; Thu, 16 May 2019 01:04:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYb0ixHnYTEkswyeguDnHGRy2PMY3SujCXDVVuIyTy4HlGP5xYR6n5AWR03Fn8N3GKW1rZ X-Received: by 2002:aa7:87ca:: with SMTP id i10mr26114855pfo.157.1557993860219; Thu, 16 May 2019 01:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557993860; cv=none; d=google.com; s=arc-20160816; b=uNeNgpjZGDO1AfrWycOL20ijSUmesxlvoer4nznORh9hUxhYy/peiWgVfVXQbf0CAO xIF7RA8EKgSPW7X7e6ehaN6MO/vQZd5DtoD6FqLpg9TJJ3EolWJfYqI+9MuVTUvVlYGg RQbU1dy3uuLptWAcZvDc50ynMePPdgPM9uK1Ezale33vLfz9wNDYkAHU/3GdDETVNUU3 LbEqEDQimtyMcAl2nGE1WqCBRDVJVGdRLsjAIhMcr91MBKlXLS5Yr7jjt/n1K8UWU70q f3c1ddWkehipPpEN4aKrispM/CQBfglrwutXdFiHrvh5jHauS2oWm5ctIxr0LSGnvr36 nD/w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MW/Nbpb+BrjZOlwi2QZ97N5TYhyjqGhZpc+C8rcgIWc=; b=Ba/o/85wjihhqrgDB1yEVWufMmzgNHQ24zqnrDOm5Zo7gXQbNi2mtpou72WMddMqrd GCWpBS2PpaLmS/87Vj4EyRxvCe6QAyZh0BDWVe8yQ0lcYUXLCo1REGZznU11INMhIGpF clB6hYWt5bQqVNECCJcSwAN4TA9mnA4ReT7iP9J2TeUnbMOEAX0mek9sPcLVQ+wJIblU Hw7YR5gHT2SfltMKsdmeoYWieQ0+EqlsOI8mRPTIMbplWhuZeYlM66vnoKZN1EAPtRhs PxZcIDQHdi6FVsaz941nZ1doOPjUv0Qy5x3BMW9Mn+7Ur+SSwbR21hI9M1Dk10n7Q0iS TBeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OMiUG6sh; 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 g10si4269030pgj.275.2019.05.16.01.04.05; Thu, 16 May 2019 01:04:20 -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=OMiUG6sh; 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 S1727032AbfEPIBI (ORCPT + 99 others); Thu, 16 May 2019 04:01:08 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:34153 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbfEPIBH (ORCPT ); Thu, 16 May 2019 04:01:07 -0400 Received: by mail-pf1-f194.google.com with SMTP id n19so1433290pfa.1 for ; Thu, 16 May 2019 01:01:06 -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 :mime-version:content-transfer-encoding; bh=MW/Nbpb+BrjZOlwi2QZ97N5TYhyjqGhZpc+C8rcgIWc=; b=OMiUG6shKWB8a14dG9E4RT+Z2btKr06bdLOblSA1t2QK0wyfKJTtYF3a73ZW4gqOuS vZGa4uPPU8EvD+ENMSEdp9EV9MErMUbIeHp9dadGh/sZxggcjEJH9EAXsPuxEzlGzrk/ zMsjLvPyBbcwhqiBt/z6QmeGOukvA6J1AbXIVI7KYL4f7v5AXID07f4QpuTzPT4HwOlR lLn97UPaMBExRzYX/muQrGzG0dNkzX8PxKMWhb9WOGnfb2BJ5fsbCS4B2o11D5cO3FeF RanlpZxAAEuyJRVKDlHnyD+sQbQtbr/r2n2buX5696tx5WDw+/fMq9G12IOxDJaFGKCs GPNQ== 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:mime-version:content-transfer-encoding; bh=MW/Nbpb+BrjZOlwi2QZ97N5TYhyjqGhZpc+C8rcgIWc=; b=tU0G8+jgg7kkNAil1N1LQ/NBMuF4C1d4RYnm9jSKbbL5u2oR3FD/SzZqT4TNPsWwkU I/a/amuF2i8kJD7RVOsnzrh69KAQTfcysbgjBeofyDVzv5vZa5EM2BSHOP2/7iuasYSh mPQ5rlLnAmw7f+IEmNgbLzfoc4G9OGQxBmYoJTsZyzVhRfyYmYmaUtpx+ku725xQWL3A Hsr3hA3tLBAm577KzW5Ay+c0p9pGdHOsdUh37MKjtC7I2NxUoo8HVhS/JLNuENlVkX+v LMpQe1CWkqCZlUvDp516jM1M+b3gdj4dtTLYOebQxTJUrUthUZFHg+2HUEoDzZIA43iR EQxA== X-Gm-Message-State: APjAAAXdYOeKfQ8nWvaC22vEz8yddWWNu6EkhgamLSzvk7Xr8r+c4aHJ rUPrvfPnz2lMB/vdMLsbjBU= X-Received: by 2002:a63:b507:: with SMTP id y7mr49047514pge.237.1557993666518; Thu, 16 May 2019 01:01:06 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id p7sm2051471pgb.92.2019.05.16.01.01.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 01:01:06 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, frederic@kernel.org, tglx@linutronix.de, boqun.feng@gmail.com, paulmck@linux.ibm.com, linux-kernel@vger.kernel.org, Yuyang Du Subject: [PATCH v2 12/17] locking/lockdep: Remove useless lock type assignment Date: Thu, 16 May 2019 16:00:10 +0800 Message-Id: <20190516080015.16033-13-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190516080015.16033-1-duyuyang@gmail.com> References: <20190516080015.16033-1-duyuyang@gmail.com> 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 Next lock to acquire has the lock type set already. There is no need to reassign it when it is recursive read. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index d5a874b..ce79b5a 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -3132,13 +3132,6 @@ static int validate_chain(struct task_struct *curr, if (!ret) return 0; /* - * Mark recursive read, as we jump over it when - * building dependencies (just like we jump over - * trylock entries): - */ - if (ret == LOCK_TYPE_RECURSIVE) - hlock->read = LOCK_TYPE_RECURSIVE; - /* * Add dependency only if this lock is not the head * of the chain, and if it's not a secondary read-lock: */ -- 1.8.3.1