Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp430336img; Thu, 21 Mar 2019 00:59:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY3AsOCmWbjlcJMXeoXWg3TlYPbiIDWniH8j05Z6039aTqLix+h+4jbV7rjXoiYIat7fwt X-Received: by 2002:a63:195:: with SMTP id 143mr2166427pgb.54.1553155169871; Thu, 21 Mar 2019 00:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553155169; cv=none; d=google.com; s=arc-20160816; b=Y4PkLScOCDqXMioqFNzydo/mc0qAhN5Am6Jmeh7VPh8hryIVdiJzaQF+CJreaslPRM lQfJv/VM/LuXO+yA9x4iY9rmYNtHcBIkW0MhRaYmk1nRKDRAKIHNThfQc/6IWOSUUbPj k3GAAGmqYY3VUlNDcSt1B/YZPXq9c1wOD/Xk7avP+5Kpaf+/Ww2JyZNtwGrB/IsQPLD1 EQcg4grcP/25j+/jdZe1MrQOYIK2BQ+FgQoYEDHzAfDQPYttV/KcQSB4lt/o0cQKiZKb UjrW4K80l2TEgiYB0j5VvMbr6UBo8Ro9cdi+PRB3L5zm0Rvm+0KZwXMU+1UOYP+GY++M N4Fg== 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=/RfktU7rJBVHx94ewl890E3HySsCK23Wf99IM2kYHMY=; b=SW5TCbgam1e9PEVGPab4OzQ7efgSq5btkl6nO/rTIs6CAS9lZttUkfbVcHC7PLT+0L pUwdnvIy9K1fs0RHkHJDGRcw7GFHI9vPiBH1UC5RtsfKmF71zmj/NPzsEn+eLwwxmecK vMM/syN2/EU3raAqgpUr3T/HXXj0eljKFsO9zaANhJlvrbcT52/hD2KkpwdDIHo4h7Iq 23uB2uVQXQx93lUans5IdT2FLIfwbQX9RLHgHtMP9U/DpQZ0ppd7j6JJX+LhWsZRc76z yHabA4rlMG4KTXjMGD8aZU6tV/rjR7zaE7kbIgeh0byJyn5w7dKzAS3TqOkZplWs8ThO CuIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jy3LW1Jp; 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 j16si3709316pfe.152.2019.03.21.00.59.14; Thu, 21 Mar 2019 00:59:29 -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=jy3LW1Jp; 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 S1728072AbfCUH6N (ORCPT + 99 others); Thu, 21 Mar 2019 03:58:13 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44745 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbfCUH6J (ORCPT ); Thu, 21 Mar 2019 03:58:09 -0400 Received: by mail-pg1-f194.google.com with SMTP id i2so3659729pgj.11 for ; Thu, 21 Mar 2019 00:58:09 -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=/RfktU7rJBVHx94ewl890E3HySsCK23Wf99IM2kYHMY=; b=jy3LW1JpKTzgJXgBNDZOg7atAXympm1AshgHHt44MMtAl0KgL3gW5+2821kRvqAfIF WNb5MSlkDVz85KWNCmVEGYS8etem4rEoE/EBcH/fFsUQDFVlrLbt3IVWsXqs2dsJo4Me ZazhMqmhyuvTtOrVH2AqVcuNrhMKTrd9bZGwDWK+0PE+jRixoS337eG50j3nb4c2NBYv SBqs0vHVtCguqiARR0lDHB4TWoX4N+DonDwhwDMFFSdvMsFesD7v9MAh8uc+IJZsMWXT 4YQne8OoDJ7DGaObU2XcYesaQPWAhnmIRwCzrrgD9hhUAiG+L0o8dJJtL3amp/WZWhZW Y2gQ== 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=/RfktU7rJBVHx94ewl890E3HySsCK23Wf99IM2kYHMY=; b=YP9kZXx0NdIuw962Y62xQIXzl2mCNCtOvgzkCQEkg2Cikw+BBSzi3RVniaUyGDfg7j VYgX5drEHROvjd9hQjoCUNjx4vaO6b4KwbKdMGX/EhHo2p5M9TBHNhK1KIPu2cSdi7UW kqcqKuWHvvlknRve+IR9aM92M0GqRiLyJla8pxsCIchrRbwA+IJgFKn9mAOeK2Ls7Hdb 29z7/Z7l/QUtnEa4Ivlz6bjY6XNMeFIDmvEYV+BuBaUV2VvChcHdewmcb5VaUNMZ5IsS wQDQJ8U5ijaqPv2/IjHgfs5SEyntMQOdx/mry9xNMzjwUN7jkNTYG+15aZiBU1qCMgug 91ow== X-Gm-Message-State: APjAAAXlkcQBS0AMC+3r7X+s9N0Yl21zfB3fi+L5wKoRUWGa5Sgj8qHa v3gmXmR15fasiqXdswQINgs= X-Received: by 2002:aa7:9211:: with SMTP id 17mr2038837pfo.220.1553155089307; Thu, 21 Mar 2019 00:58:09 -0700 (PDT) Received: from localhost.localdomain ([203.100.54.194]) by smtp.gmail.com with ESMTPSA id e184sm6467148pfc.143.2019.03.21.00.58.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 00:58:08 -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 12/18] locking/lockdep: Remove unnecessary function pointer argument Date: Thu, 21 Mar 2019 15:57:19 +0800 Message-Id: <20190321075725.14054-13-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 check_prev_add() always has save_trace() as an input argument, which is unnecessary, so remove it. Signed-off-by: Yuyang Du Reviewed-by: Bart Van Assche --- kernel/locking/lockdep.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index eccfb0b..f46695a 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -2193,8 +2193,7 @@ static inline void inc_chains(void) */ static int check_prev_add(struct task_struct *curr, struct held_lock *prev, - struct held_lock *next, int distance, struct stack_trace *trace, - int (*save)(struct stack_trace *trace)) + struct held_lock *next, int distance, struct stack_trace *trace) { struct lock_list *uninitialized_var(target_entry); struct lock_list *entry; @@ -2234,11 +2233,11 @@ static inline void inc_chains(void) if (unlikely(!ret)) { if (!trace->entries) { /* - * If @save fails here, the printing might trigger + * If save_trace fails here, the printing might trigger * a WARN but because of the !nr_entries it should * not do bad things. */ - save(trace); + save_trace(trace); } print_circular_bug(&this, target_entry, next, prev, trace); return 0; @@ -2293,7 +2292,7 @@ static inline void inc_chains(void) } - if (!trace->entries && !save(trace)) + if (!trace->entries && !save_trace(trace)) return 0; /* @@ -2358,7 +2357,7 @@ static inline void inc_chains(void) * added: */ if (hlock->read != 2 && hlock->check) { - int ret = check_prev_add(curr, hlock, next, distance, &trace, save_trace); + int ret = check_prev_add(curr, hlock, next, distance, &trace); if (!ret) return 0; -- 1.8.3.1