Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2201355yba; Mon, 6 May 2019 01:21:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi1KaS5pG0NPFSrJbBhiSUgy2ExjB140Vz8P3rTXqAVQkOEFYywUcTxD60hplMTwox75au X-Received: by 2002:a63:494f:: with SMTP id y15mr30426057pgk.56.1557130918347; Mon, 06 May 2019 01:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557130918; cv=none; d=google.com; s=arc-20160816; b=R+GSxt+N1CJ1FjYfnOnOo/nrHk6RNu6QUk13HY/vgB4gGu8xaqjeKTGv2j1afD59Hh pkJxWSoq/Oz5xjX5MS+sY331F8rHtCUg2nlxqGjf9LgXkSngCgPqnqex/XVSm3g0N99f sQsSBFPLBDtN6bhT8yWZ8taLEOj2kf5BlNtoe+iVD3+FtkBMgmnTSmiJpSKqs4ndpwxE 9/6tv3khY6xyXbaiALVN6vhZX4TUS9tMGLI2zEmcy1FpqIkQ6uFF2YqZC7DLoo/HtBp5 bbWuwLZhZeBDbXnvmJ0fJGP1i1rUWhlQioUJDWfBgCrcyHslGLloknztbbAA+P9Kvc2w D72w== 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=vOQ/ZXgXh1iGHeDRXw+fWRdbLu9r0kMK3YDSDZUg4YA=; b=ORSZ+urTe5GYgHqsvdr7j7AsRxCPdZV5i+VwJezWZsCY6Zi2X5I88gyuOrrH23GGZa +WiV9l9/JYuy/v+UntH2dGE+ByI0UNMGB1qVY28cibg/1DU5fiG+gyj6xu00RW6EJpJA OaMiViVygcIA7GlkBodYo1iiVKpAoWcUFtuOl4jsyOcZoy13OSWi/L81qWt9uiOJEvtk KCrioTrlmSy5zHbGqRyF+ljGe9k5wACWOsplY0oUeL+/EnQy+Lhliye0iOqwC6AmF+bb BpbDwjyaAv5TwTFamTwL9+awYW7nGYlRzS24U802yMd82SMc00tKY7hMEPWPEQ5mD0RM qDiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="NM3y1A/2"; 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 m6si13283996pgq.116.2019.05.06.01.21.43; Mon, 06 May 2019 01:21:58 -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="NM3y1A/2"; 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 S1726545AbfEFIUZ (ORCPT + 99 others); Mon, 6 May 2019 04:20:25 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:40016 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbfEFIUV (ORCPT ); Mon, 6 May 2019 04:20:21 -0400 Received: by mail-pg1-f194.google.com with SMTP id d31so6091060pgl.7 for ; Mon, 06 May 2019 01:20:21 -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=vOQ/ZXgXh1iGHeDRXw+fWRdbLu9r0kMK3YDSDZUg4YA=; b=NM3y1A/2JvaKc58ZS0Le9fKR8MxJULS4S3sp0Q/COZHmOxHah2wU4V9CGsk0MkKHx5 TpY4iZjcKdEf+JZWYbsovr46zMTJ7A5o+e01Unv8xSOn753WuYvW/JNThkjtAOWE2Cnw aCackPtit+Hqw6UXfdKI587ogulyCKWq6ZaH1xOY1LBeFnD1c6YxS7mKDSxJsoFbzwCX ddwDevTtQvaOdH6HkT8mcnqnKf63oSc2yXWSJBf5qjas9cUGOx9dTjE34Z4Fx+HqLCll KVQAFhiRJftW/yLdlYxY359Fxpu/kpvF4aGhbAlpBOM4C10QY/WY0JjfWiXf051lBCWz GbLg== 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=vOQ/ZXgXh1iGHeDRXw+fWRdbLu9r0kMK3YDSDZUg4YA=; b=t/X/CYFN88+zlD4LsxRCsUYWN3m8WFi6oQD4kQ3DhSPNuoajBMn0DltMiVksQSxc4S 1MYvlVMWUEjJybwNdydGHthSpET+yzLfhGsnJbbknI8fZSsgZdvKNwZEDMgwbtp6Dbhl cPAURmWwAnIItKOYjdlM1jpTKNde5l1ZGnXA4IsDgHsw1w/BwW94E2wOVsF5+kcO+2Wh CctHybFRsgia5ClRU0lBkaLPE8/4GwuhECQreg7/N6ms9SpiN5Wed0GnjTJ2kChJ+rjB H2DzQNpWWtiQ4UY36jaPd/R0WjpvUyEkPQ/WB8p3/nXGHEKOOTxGQua2vr0e0zEXm8Kq NS5g== X-Gm-Message-State: APjAAAWeP+kCAe2PPoCQGnySgR7/pb6BUFJqW+5J2iXcHpzCuSHsJU8Q 336+iowuHSy4KMx3KI7tlYY= X-Received: by 2002:a63:1b04:: with SMTP id b4mr30248310pgb.305.1557130821324; Mon, 06 May 2019 01:20:21 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id v19sm20958013pfa.138.2019.05.06.01.20.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 May 2019 01:20:20 -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, linux-kernel@vger.kernel.org, Yuyang Du Subject: [PATCH v2 10/23] locking/lockdep: Remove unused argument in validate_chain() and check_deadlock() Date: Mon, 6 May 2019 16:19:26 +0800 Message-Id: <20190506081939.74287-11-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190506081939.74287-1-duyuyang@gmail.com> References: <20190506081939.74287-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 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 76152cc..aa36502 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2225,8 +2225,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; @@ -2784,8 +2783,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 @@ -2811,7 +2811,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; @@ -2842,8 +2842,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; } @@ -3825,7 +3825,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