Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4131399ybi; Mon, 3 Jun 2019 06:15:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2f53QAqwnFM5xsbJfvI1By+3bHKCysIevnbWIPf5QMVU992zErF8uaB6tGbQd4K2nnR9n X-Received: by 2002:a63:4c0f:: with SMTP id z15mr19916660pga.245.1559567718785; Mon, 03 Jun 2019 06:15:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559567718; cv=none; d=google.com; s=arc-20160816; b=ZqeXB9sclaTyHfXyAQqZt9lga0VU4UOvHcSsYmr/ndITp1E0LMZCqiTDtYFaGS/R1y 04hR1NCEZ4oEWfQZEvPvuvZU6edl8Z3LaLMp8gGCAf8zq9yrFtpKGJnNSW5RzDgHDimg D73fOPG/CNDlzL2KNtwPTo4/ZZAW4KF9U2ofyUtkPnycM99rQYWJkWNergA3njWdNVT2 oKMBz6MIeLCN/VfwZ1Gfq1ihoTA9GnBVtxX47BEObW0cmc3P45F5geTO6Dtf0NAwCJQn hou8sd/GJZyDAA+B2cDCg/4KOBf8TG1L2nZruDWU2VzqBl3BqguDpPTVer0r9cgtDGqg yXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:dkim-signature:dkim-filter; bh=X3CeSwglCJdpcqZkfI7Qmats+Sg31lEAXKC7hfCu3bA=; b=kqYIkYFsZgelEjvrHLWvzOqIm2dGLEcrd8exIcvUT4V254DalLvJDQZu1raBNvmfvm zNMtGujy7elcasoxV0dQSjFcNHkvWQALAv/WJ+so62Q9JoXXH3mMEv1/uPY9MxNndGMQ fsraa/LzImN9JYVWx2n4+uhc6CZlvypaknHy9wIb60H7ViDgHe0DocQ4V6ICJFKuuw11 gpjjyzzl9SD2ay8mAaBncNh6acso3iGWnqVZCTorMu4FsDPIphlR2a04OmRJ4C0aSSNY YfcSlD8FgubqiFIgQZMV0F3gtGFHZtn2fcUVHdqTcI8g6+W69GBlnRVszy60znfzvTVQ rbLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2019051801 header.b=xcV+VXni; 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=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si7063031plh.368.2019.06.03.06.15.01; Mon, 03 Jun 2019 06:15:18 -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=@zytor.com header.s=2019051801 header.b=xcV+VXni; 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=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbfFCNNJ (ORCPT + 99 others); Mon, 3 Jun 2019 09:13:09 -0400 Received: from terminus.zytor.com ([198.137.202.136]:56987 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfFCNNJ (ORCPT ); Mon, 3 Jun 2019 09:13:09 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x53DCuvG605643 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 3 Jun 2019 06:12:56 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 terminus.zytor.com x53DCuvG605643 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2019051801; t=1559567576; bh=X3CeSwglCJdpcqZkfI7Qmats+Sg31lEAXKC7hfCu3bA=; h=Date:From:Cc:Reply-To:In-Reply-To:References:To:Subject:From; b=xcV+VXniNpJrr/VOvkmLTCFjT/hZ7Sz4mbnaO686btCbTeMpO254tC0oLNnEY6wXr xjyRG4+EnqquJsufIdA1a9+22w9M3xDKcux/4xmnZqD+VpxKxTflIJFFFvDYUey5ex TYKB6axNZkzvgcxn/JLt4i5jJR6jis0BrqTJgS05QJyCU8zkPQjPCb982hBL6qkhi9 xCau1MLIiidHFUBLqnSOx0X8AAdvBVqhKHqEaeKcmMYxfcJxhQGBVvXLSAvEniRYL3 yIXXUuI/W9JyCedJ8j6jUS5sRuvMAcF0m1PudUMNadGhO5zlnjJhmuGskA6GcP+DIH eGDLIG3OD4NUA== Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x53DCte2605639; Mon, 3 Jun 2019 06:12:55 -0700 Date: Mon, 3 Jun 2019 06:12:55 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Yuyang Du Message-ID: Cc: hpa@zytor.com, bvanassche@acm.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, duyuyang@gmail.com, torvalds@linux-foundation.org, mingo@kernel.org Reply-To: bvanassche@acm.org, hpa@zytor.com, linux-kernel@vger.kernel.org, tglx@linutronix.de, peterz@infradead.org, duyuyang@gmail.com, torvalds@linux-foundation.org, mingo@kernel.org In-Reply-To: <20190506081939.74287-11-duyuyang@gmail.com> References: <20190506081939.74287-11-duyuyang@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] locking/lockdep: Remove unused argument in validate_chain() and check_deadlock() Git-Commit-ID: 0b9fc8ecfa30000c8900da7adbbef23438de9ec0 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 0b9fc8ecfa30000c8900da7adbbef23438de9ec0 Gitweb: https://git.kernel.org/tip/0b9fc8ecfa30000c8900da7adbbef23438de9ec0 Author: Yuyang Du AuthorDate: Mon, 6 May 2019 16:19:26 +0800 Committer: Ingo Molnar CommitDate: Mon, 3 Jun 2019 11:55:44 +0200 locking/lockdep: Remove unused argument in validate_chain() and check_deadlock() The lockdep_map argument in them is not used, remove it. Signed-off-by: Yuyang Du Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-11-duyuyang@gmail.com Signed-off-by: Ingo Molnar --- kernel/locking/lockdep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 3eecae315885..6cf14c84eb6d 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2230,8 +2230,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev, * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read */ static int -check_deadlock(struct task_struct *curr, struct held_lock *next, - struct lockdep_map *next_instance, int read) +check_deadlock(struct task_struct *curr, struct held_lock *next, int read) { struct held_lock *prev; struct held_lock *nest = NULL; @@ -2789,8 +2788,9 @@ cache_hit: return 1; } -static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, - struct held_lock *hlock, int chain_head, u64 chain_key) +static int validate_chain(struct task_struct *curr, + struct held_lock *hlock, + int chain_head, u64 chain_key) { /* * Trylock needs to maintain the stack of held locks, but it @@ -2816,7 +2816,7 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, * any of these scenarios could lead to a deadlock. If * All validations */ - int ret = check_deadlock(curr, hlock, lock, hlock->read); + int ret = check_deadlock(curr, hlock, hlock->read); if (!ret) return 0; @@ -2847,8 +2847,8 @@ static int validate_chain(struct task_struct *curr, struct lockdep_map *lock, } #else static inline int validate_chain(struct task_struct *curr, - struct lockdep_map *lock, struct held_lock *hlock, - int chain_head, u64 chain_key) + struct held_lock *hlock, + int chain_head, u64 chain_key) { return 1; } @@ -3826,7 +3826,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, WARN_ON_ONCE(!hlock_class(hlock)->key); } - if (!validate_chain(curr, lock, hlock, chain_head, chain_key)) + if (!validate_chain(curr, hlock, chain_head, chain_key)) return 0; curr->curr_chain_key = chain_key;