Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1082396ybl; Wed, 8 Jan 2020 10:41:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxQiQ2JfcyHUV4WQ0VNcBG0fDhdcJlqL0cdVQ5IITvbcrQNT0C68i08CV8SEUOaEnzCdwpH X-Received: by 2002:aca:eb83:: with SMTP id j125mr3998370oih.153.1578508880531; Wed, 08 Jan 2020 10:41:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578508880; cv=none; d=google.com; s=arc-20160816; b=aHB0+nC19qLdD/Q7Xd1iRDlnryKNcMiuA3pxBcjXz7mWxr6cwERK3niVKSmMtUiNWk IxFuWC74pW6nktN4bom2agX3r5DfzQIu3tYfe6b2PoJSDjkUrx1FC8kEyE0Gq11ZWC1H 4r5gEk2Gw0tCdDEiMz54OURpfZ3GnPXdejBq8ISWTofajjMPSujMxlnjo3dGoOVFHIUv GuNp/mVeTLtFIe0TnKBTSenP6IhH53Jv1q0oRhXgfYosA5MI2EZdrg956GMOq8Jw+MP2 pn2kFLUPX8FFfv/s/MHvsNIA8yv8e6qektX74LzoIC9bC2Ky092sF7RDYdLzXyP9dfL2 HzoA== 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; bh=FV+TkVVdVSwqvb3wqZYahUeMDaiiUTiA0+o7Pd2yXZ0=; b=OLvL+A+D+hI4wp4cC+ffEx+8fggpuf1krH4P2JIa1Q/C4cyozUZNjEgxu4x33p9uKB RVOVMUQidCkDaCV9Kf1Q4g6nz0liU0gqCX0WbEUiL8MIilIeJbQbA2SuNOqoLkjI4DLG T+DXm3Ki/SRsVS0qA6bGtvkZz6si7IszXwusX0ieG2MjUQF3f2ORsTiFM3+g/mvegnQM Nok6VGaW/wTMfVbCFrKty0WRYUAc5ou5y2rqI4rBs3hVsdfi6zyKb2ykFRo0yj7Xn87k i7SjwK5+ID3yI102OKilgqbvXqvUomibBPJbF5+FzxXP6RJhNQMVyXPvSpGoEirq6nle YhhQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v67si2410246oia.26.2020.01.08.10.41.09; Wed, 08 Jan 2020 10:41:20 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728739AbgAHP7d (ORCPT + 99 others); Wed, 8 Jan 2020 10:59:33 -0500 Received: from mga11.intel.com ([192.55.52.93]:64327 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726670AbgAHP7b (ORCPT ); Wed, 8 Jan 2020 10:59:31 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 07:59:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="395782729" Received: from xshen14-linux.bj.intel.com ([10.238.155.105]) by orsmga005.jf.intel.com with ESMTP; 08 Jan 2020 07:59:29 -0800 From: Xiaochen Shen To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, tony.luck@intel.com, fenghua.yu@intel.com, reinette.chatre@intel.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, pei.p.jia@intel.com, xiaochen.shen@intel.com Subject: [PATCH 4/4] x86/resctrl: Clean up unused function parameter in mkdir path Date: Thu, 9 Jan 2020 00:28:06 +0800 Message-Id: <1578500886-21771-5-git-send-email-xiaochen.shen@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1578500886-21771-1-git-send-email-xiaochen.shen@intel.com> References: <1578500886-21771-1-git-send-email-xiaochen.shen@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Previous patch ("x86/resctrl: Fix a deadlock due to inaccurate active reference of kernfs node") changed the argument to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() within mkdir_rdt_prepare(). That change resulted in an unused function parameter to mkdir_rdt_prepare(). Clean up unused function parameter in mkdir_rdt_prepare() and its callers rdtgroup_mkdir_mon() and rdtgroup_mkdir_ctrl_mon(). Signed-off-by: Xiaochen Shen Reviewed-by: Reinette Chatre Reviewed-by: Tony Luck --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 2c79fcd83271..8ebef16e10be 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -2648,7 +2648,6 @@ static int rdtgroup_init_alloc(struct rdtgroup *rdtgrp) } static int mkdir_rdt_prepare(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, const char *name, umode_t mode, enum rdt_group_type rtype, struct rdtgroup **r) { @@ -2758,15 +2757,12 @@ static void mkdir_rdt_prepare_clean(struct rdtgroup *rgrp) * to monitor a subset of tasks and cpus in its parent ctrl_mon group. */ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, - const char *name, - umode_t mode) + const char *name, umode_t mode) { struct rdtgroup *rdtgrp, *prgrp; int ret; - ret = mkdir_rdt_prepare(parent_kn, prgrp_kn, name, mode, RDTMON_GROUP, - &rdtgrp); + ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTMON_GROUP, &rdtgrp); if (ret) return ret; @@ -2788,7 +2784,6 @@ static int rdtgroup_mkdir_mon(struct kernfs_node *parent_kn, * to allocate and monitor resources. */ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, - struct kernfs_node *prgrp_kn, const char *name, umode_t mode) { struct rdtgroup *rdtgrp; @@ -2796,8 +2791,7 @@ static int rdtgroup_mkdir_ctrl_mon(struct kernfs_node *parent_kn, u32 closid; int ret; - ret = mkdir_rdt_prepare(parent_kn, prgrp_kn, name, mode, RDTCTRL_GROUP, - &rdtgrp); + ret = mkdir_rdt_prepare(parent_kn, name, mode, RDTCTRL_GROUP, &rdtgrp); if (ret) return ret; @@ -2871,14 +2865,14 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name, * subdirectory */ if (rdt_alloc_capable && parent_kn == rdtgroup_default.kn) - return rdtgroup_mkdir_ctrl_mon(parent_kn, parent_kn, name, mode); + return rdtgroup_mkdir_ctrl_mon(parent_kn, name, mode); /* * If RDT monitoring is supported and the parent directory is a valid * "mon_groups" directory, add a monitoring subdirectory. */ if (rdt_mon_capable && is_mon_groups(parent_kn, name)) - return rdtgroup_mkdir_mon(parent_kn, parent_kn->parent, name, mode); + return rdtgroup_mkdir_mon(parent_kn, name, mode); return -EPERM; } -- 1.8.3.1