Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp430270img; Thu, 21 Mar 2019 00:59:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxRV5gIZxdJHYz0M6nrBBl0isWce2aRjg2m2OTM0LydFKwEKTAJuuqU6kbXjK/ploXkRVA X-Received: by 2002:a63:1061:: with SMTP id 33mr2124076pgq.226.1553155162696; Thu, 21 Mar 2019 00:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553155162; cv=none; d=google.com; s=arc-20160816; b=DDLYDcVQU2oZ6wSt/x90MbNcYvr/8a4HOwAqNQITCyCkcY7aLu2T2fn4hqwLSyy8JN BVnyAUIj44yJsfl2DIkY3dIgFVYdFwUyfd6ROo57WjCzcBEqVcgs4H00+JAGqC7Kmzdd QVURhYROVL5ruRrkqgNJ1PxK6kR5t3oYMFOyLZFOgjaWyInymWGSkgREQ3P+/Fn4nOQj DqKMhOTkvE/0GjCPrmjFT+G8WHlVFYglhDzX0At5vN3av8nwrohkn6O74MOt9l/hvcYZ 0+W3oj5RupZixcvjuCZj6qUtHwaMw123TFG1PLhnTYa6gqrATWwMwr+W8wHR42RG78BU HGgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=/LPAkczJl6Vb3ild5P9S4VSewCXyHBiBbqXn8Is6VP4=; b=iTHsWPY7UveeeUnHr0oFq3rUFWmfeukd0TQF/IHjCw6Z27y0BIg57Q1DnjJLXvUV1W K+eoOTBwDgRgtJxnQ1Z5xMdh4/LeqFncl0gwwUE4OodRyXJVJ1aZj85K2tCOd0NOmlkW 8Us6lGg9Dyw1yYwpwBqrv8aNRsDPoqn8IlKoXkmQoHgQTEudHtNdZu+EE50Afos6UZO5 SPlH/2BCLfT10KNX0CpOnCMzV80F/BINqgsgw1kaHbTJRtGATnVpGG0Rx9D2HA+UcSj5 4eokaGWvfLftfvnv2gPVxJCELMR7sEU6OHgpvRcaEqkcGhxJd6MP7iSRhlaiIm1sUSZw E2zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G2vZ5Wum; 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 17si2683687pfw.6.2019.03.21.00.59.07; Thu, 21 Mar 2019 00:59:22 -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=G2vZ5Wum; 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 S1728045AbfCUH6F (ORCPT + 99 others); Thu, 21 Mar 2019 03:58:05 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45684 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbfCUH6D (ORCPT ); Thu, 21 Mar 2019 03:58:03 -0400 Received: by mail-pf1-f195.google.com with SMTP id v21so3761442pfm.12 for ; Thu, 21 Mar 2019 00:58:03 -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; bh=/LPAkczJl6Vb3ild5P9S4VSewCXyHBiBbqXn8Is6VP4=; b=G2vZ5WumG/tXCZD2WZVTqZqFrd5/kCp37/ngzFvqX/XERF8Vfarqm+VUhajrx94J2L P31wTdjqrSROV7lqkvQSeTMAIzAvKBX8Xo7SjOYFXWuzdX5o4zAqvIkl2Y8WOB0zUrvz +iUc5giPSLCw+HsHOBG1SSbZMoyT2YhMdDfojLZiAFrQoEdvHgP7hFhR20SpV0OPrDmS AdwB58KnRZQAwd/43HtYhuPSq9K9iADy3xh2FT8Uo8CGQOMWwL/nr8Lu45oA9xfHjW+E GpHU/w9BeCdApT1AJ3Xc5BkcniqpuHPmYxR9huZv/5KmcpFKPO2ld9jTdkv3m7u7nT3C IIoQ== 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; bh=/LPAkczJl6Vb3ild5P9S4VSewCXyHBiBbqXn8Is6VP4=; b=cOOSo2BN4XG+OHIG29ycb578ZGd1FjNHIMtfUQnOAj9xKOIr5sEgY/h6glRNutKOKV 72a00nJP47mDRIkm/mm8HGboD+PxdyuoMznc9zxRKDeNPO7UWRQ2/9LWJTtANUTYUNe/ HOzNdwDNVLyclDlx8qJ19sIYFBBA/yI/LUJzswzLAt5mcf9Ox+lsbDKz6s78pNDMm9kE dWgHlL18x6sFfurVsNryQj7AjHpOAv4CpPEqBjfbB3+EkwYxDHzNeyKLeGZNlLnu0W3j YGFEPLS25edts9//nEVecnTEFTrPC/EfLAGq4QWjaJffOY1RRcJ3vbt+a9ZP5GK7XM79 IfAg== X-Gm-Message-State: APjAAAVOsti6oi8uvgfT7mp62n0ZTffOaLctgUcKMYP6amFaTrFs70VH qfnzp71Cojc+K/qgBdtO65Q= X-Received: by 2002:a65:4608:: with SMTP id v8mr2154250pgq.9.1553155083173; Thu, 21 Mar 2019 00:58:03 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id e184sm6467148pfc.143.2019.03.21.00.58.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 00:58:02 -0700 (PDT) From: Yuyang Du To: peterz@infradead.org, will.deacon@arm.com, mingo@kernel.org Cc: bvanassche@acm.org, ming.lei@redhat.com, linux-kernel@vger.kernel.org, joe@perches.com, Yuyang Du Subject: [PATCH v3 10/18] locking/lockdep: Remove unused argument in validate_chain() and check_deadlock() Date: Thu, 21 Mar 2019 15:57:17 +0800 Message-Id: <20190321075725.14054-11-duyuyang@gmail.com> X-Mailer: git-send-email 2.17.2 (Apple Git-113) In-Reply-To: <20190321075725.14054-1-duyuyang@gmail.com> References: <20190321075725.14054-1-duyuyang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The lockdep_map argument in them is not used, remove it. Signed-off-by: Yuyang Du Reviewed-by: Bart Van Assche --- 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 f16d2f5..c7aec9f 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2134,8 +2134,7 @@ static inline void inc_chains(void) * 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; @@ -2698,8 +2697,9 @@ static inline int lookup_chain_cache_add(struct task_struct *curr, 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 @@ -2725,7 +2725,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; @@ -2756,8 +2756,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; } @@ -3733,7 +3733,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; -- 1.8.3.1