Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp407721yba; Wed, 24 Apr 2019 03:26:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyih48uYR5es+MSo6U+GP2eIpsOwnss0CZBhDlcPEwS9tmNq8wb91Y6n4NmjBPmj+7ZwLXx X-Received: by 2002:a17:902:6a89:: with SMTP id n9mr23105985plk.76.1556101605582; Wed, 24 Apr 2019 03:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556101605; cv=none; d=google.com; s=arc-20160816; b=yXxbC0MorFZdIkWaSFTTufaRKGypXiqjbFWMNVaF0+Vko444+zhcQ3P3taal3fvOPb 9qjt2VpANAXDoYmLp3GPA08IXvZTT6zHqoX0lpr9uXuZIpHNDTvELNpZaBDDWRM3D6Qf VdatU1tnc0jk8jV8VQ0wAz8++KXqWRg+HeKSalc1+iTGA+dEdTzqLpNXRR0v5GWG/5h5 AHj6EnQENUZT/C/3Wt4ZBVGPNlKPgKW7uPj4AI8g9AR4k2LPp3M0haNlSirqCULedtxA irZxVU29tlclgLeSmCw31maqVtSuVvIpuf0lNsxLUCMOCK4RJivMWFwLCtxHtF3Lpvrl 3Ynw== 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=+pTq7jrXEldgj0Ejryxa6yOJ611xz6wLmDAwb/Xjyvo=; b=B74rVCzLHg2b/Bs5/9etpO/gVcou3bQ9BwYqenradQh5dlNER3dHhg/DPZiq8qbIh2 EOyrc7SG5lRnAV4kb+nG7pX+5B1ZAgXPB9nW/qu1kvr6lLP17hyzYGnEPnkY/AlLXaVj n4ZWJiT1tW1zOuVajy5zfTYiAM/+z6+543kbQlcrS9ErGzzgRphQWkaRjwFz/IxAYmUx nMmsV51OYO/dP7vUK8xW3jjErtlBkapOvln1THuoEAUTnuhLCDDAp3u5Gb4ih1jtOpuU ai797raSAQYVJ4HnN9UgUbaUryq6WDIFfUH+DL3t1C7vrENY+frAfmSaqJK2DOFRw93O Laxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lxHS+olC; 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 m15si17789558pgj.126.2019.04.24.03.26.29; Wed, 24 Apr 2019 03:26:45 -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=lxHS+olC; 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 S1729688AbfDXKV0 (ORCPT + 99 others); Wed, 24 Apr 2019 06:21:26 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36203 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729239AbfDXKVU (ORCPT ); Wed, 24 Apr 2019 06:21:20 -0400 Received: by mail-pg1-f193.google.com with SMTP id 85so9180027pgc.3 for ; Wed, 24 Apr 2019 03:21:20 -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=+pTq7jrXEldgj0Ejryxa6yOJ611xz6wLmDAwb/Xjyvo=; b=lxHS+olCIoaKhRvBghhmKcpteS1W0g6FzDefUmbjfDv6fexpqKinePOTLR0Cb1RUA/ Q3HNqxBfsl2yZR36TqgYtHvHR5F9+YBYD89ZkjI/wU7rRPkOgAeE0KiRtZ55hR0U2JVS Hw29kWCZeHpOkCe6KPR2hPkHFdO9D2stcWlt3eGqR5QJ3lNKaaVDCi8i4XwrplStH1YU 4zWFBeoWGw1rzE/eAqHZ8a78rylmGXA0eo8RfkKHL/RZBlE0ihIBaHD2r9Iw/zce2vNs CUk4tTBUO/BM6q7aE85L45r4cjDG37wBGcIOSpA6+v7atKdGiZoF6Yw9Xt0via/HZt5U Vpfg== 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=+pTq7jrXEldgj0Ejryxa6yOJ611xz6wLmDAwb/Xjyvo=; b=SlFaGhRp4AbbpO7H9upMmT0omosbj5S+lKyTYY+Zzb72SBVb/XstQxguknhJhrF+ZJ WlFZOjvzbKlZgeaqEuwZwHVGNgDNXwlzASJGP3MbgMR0w7pwlE4CY/phFqrLrwcG5ogP hYkdyhhqOFx2V1ccG1cjbJnOe8NOQ3r94Apz1zgpKJMDPZ0c090r4Y5VsaJKxWbk2HQX UXC9ZMK8P/Xk6Jj8RVvDqrUoN82i+JB/sD9WKwuQhGN48ZzFUu28tHQMsX98KTcVPgon eudhccZSEz/sczLY2YB7iRasxgOtrhaQGwPjDsIBWteWYtEHgAOKA4yAiJcOCgd8xw6C XEWg== X-Gm-Message-State: APjAAAW0b6fQkx8KbFtQzXT+PiTBpKSnqDYFmnvL/qtwImOCyHMU+nkn l3e+sSwy26m2kltg0Iu//OE= X-Received: by 2002:a62:e816:: with SMTP id c22mr33381413pfi.54.1556101279903; Wed, 24 Apr 2019 03:21:19 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id v19sm25051604pfn.62.2019.04.24.03.21.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 03:21:19 -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 17/28] locking/lockdep: Remove redundant argument in check_deadlock Date: Wed, 24 Apr 2019 18:19:23 +0800 Message-Id: <20190424101934.51535-18-duyuyang@gmail.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190424101934.51535-1-duyuyang@gmail.com> References: <20190424101934.51535-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 In check_deadlock(), the third argument read comes from the second argument hlock so that it can be removed. No functional change. Signed-off-by: Yuyang Du --- kernel/locking/lockdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index d153b97..eb85183 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2143,7 +2143,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, int read) +check_deadlock(struct task_struct *curr, struct held_lock *next) { struct held_lock *prev; struct held_lock *nest = NULL; @@ -2162,7 +2162,7 @@ static inline void inc_chains(void) * Allow read-after-read recursion of the same * lock class (i.e. read_lock(lock)+read_lock(lock)): */ - if ((read == 2) && prev->read) + if ((next->read == 2) && prev->read) return 2; /* @@ -2727,7 +2727,7 @@ static int validate_chain(struct task_struct *curr, * The simple case: does the current hold the same lock * already? */ - int ret = check_deadlock(curr, hlock, hlock->read); + int ret = check_deadlock(curr, hlock); if (!ret) return 0; -- 1.8.3.1