Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3765583pxu; Mon, 30 Nov 2020 09:47:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcMy9aROIqhiCyWprMlVvxQ+b+XmRXydbPqXGP6CZzon68dGCoLi5OYYLHDrB5AZi3hsNN X-Received: by 2002:a17:906:c086:: with SMTP id f6mr21896958ejz.38.1606758448647; Mon, 30 Nov 2020 09:47:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606758448; cv=none; d=google.com; s=arc-20160816; b=X7+T/tE703M4v0lT75I4cj61p1HvdJq5tOCjUPDLw2IoJGi2cH9Wk2kqG6O1MpAJUI 6qde0+TZZrWda1RB5JMFNaaxyJML0o7bTxMuJ+E6r+2uIFxi8wZqnZtUpz5mzxb9yppg AZ+D5N86i56VSWSqGHM6bvkLeq5K00BBvUjNdA5j8lYp+6nhheY6wPmCSimhmCva7I4u O4Ri5+n1os6K1FCJX6OcsntsiCQ5EWVjQ1vFTX5FnhqkFCEoB5z35VIu2cg5nM3tMYSY Vs/LMtkkdGau1V7MLS2XOvoF9LMzIUdMRAKOora50x+8NMqaik32NqUHkXV1+mMbY95K KZkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=6/FohN/C9R1Czew69CKCi1GOJKy3gWw1UrivD9IIE+g=; b=HEfq+cmFsUARmq6x5DSF6fidk7GIPNs4y7VxVWZO/dDGZH0uHgFtzMq+ztHnl7hXkU YDt9b7Ony8smzobRFF2zO0WyZtbDQIthG2uPJ0pHp4MHaNovyn8CUf+2qBKxg2m78Xnt BUpWGKeRY5eRqGvMq5SpS7ejpRpniS9i+vQlcLW+zQXy+n+fCE+G+pbFKQ3bYOTEU/vw PP8e5X3pe0C253meEglzshb+jsX8qpLLUDQEObwnGyq2Fb8keCn106QMAYN7IpBi/6/r joG9LzmjGwWNYSbj1QGKyaB965yGjnfCY2AL02Ng5YkgOL0ijZXNX4gb0xuaJgirvP/r W58A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bi20si11254654ejb.366.2020.11.30.09.47.06; Mon, 30 Nov 2020 09:47:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2387816AbgK3Roa (ORCPT + 99 others); Mon, 30 Nov 2020 12:44:30 -0500 Received: from mga06.intel.com ([134.134.136.31]:12248 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387624AbgK3Roa (ORCPT ); Mon, 30 Nov 2020 12:44:30 -0500 IronPort-SDR: lnwIffjm/X2Kc3zqafjzVtpuuK7+f1QIsRKE4t7DYvpEEbqxebFpPUV3/AlyotHgm843kJVS9z 4RS2wbBpfNIA== X-IronPort-AV: E=McAfee;i="6000,8403,9821"; a="234282146" X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="234282146" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 09:43:49 -0800 IronPort-SDR: NmWFz9lr9cVCWxwmNdaLxscWdvSQzdS2m/WE1b8jhUlh5TDiRw+cLDja2Fr1cuzYfokrqkEJZM YDp6jUDs2/NQ== X-IronPort-AV: E=Sophos;i="5.78,382,1599548400"; d="scan'208";a="549193922" Received: from xshen14-linux.bj.intel.com ([10.238.155.105]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2020 09:43:44 -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, willemb@google.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, pei.p.jia@intel.com, xiaochen.shen@intel.com Subject: [PATCH v2] x86/resctrl: Clean up unused function parameter in rmdir path Date: Tue, 1 Dec 2020 02:06:58 +0800 Message-Id: <1606759618-13181-1-git-send-email-xiaochen.shen@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1604085117-31778-1-git-send-email-xiaochen.shen@intel.com> References: <1604085117-31778-1-git-send-email-xiaochen.shen@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit fd8d9db3559a ("x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak") removed superfluous kernfs_get() calls in rdtgroup_ctrl_remove() and rdtgroup_rmdir_ctrl(). That change resulted in an unused function parameter to these two functions. Clean up the unused function parameter in rdtgroup_ctrl_remove(), rdtgroup_rmdir_mon() and their callers rdtgroup_rmdir_ctrl() and rdtgroup_rmdir(). Signed-off-by: Xiaochen Shen Reviewed-by: Reinette Chatre --- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c index 6f4ca4bea625..b1bba837bd11 100644 --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c @@ -3018,8 +3018,7 @@ static int rdtgroup_mkdir(struct kernfs_node *parent_kn, const char *name, return -EPERM; } -static int rdtgroup_rmdir_mon(struct kernfs_node *kn, struct rdtgroup *rdtgrp, - cpumask_var_t tmpmask) +static int rdtgroup_rmdir_mon(struct rdtgroup *rdtgrp, cpumask_var_t tmpmask) { struct rdtgroup *prdtgrp = rdtgrp->mon.parent; int cpu; @@ -3051,8 +3050,7 @@ static int rdtgroup_rmdir_mon(struct kernfs_node *kn, struct rdtgroup *rdtgrp, return 0; } -static int rdtgroup_ctrl_remove(struct kernfs_node *kn, - struct rdtgroup *rdtgrp) +static int rdtgroup_ctrl_remove(struct rdtgroup *rdtgrp) { rdtgrp->flags = RDT_DELETED; list_del(&rdtgrp->rdtgroup_list); @@ -3061,8 +3059,7 @@ static int rdtgroup_ctrl_remove(struct kernfs_node *kn, return 0; } -static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, - cpumask_var_t tmpmask) +static int rdtgroup_rmdir_ctrl(struct rdtgroup *rdtgrp, cpumask_var_t tmpmask) { int cpu; @@ -3089,7 +3086,7 @@ static int rdtgroup_rmdir_ctrl(struct kernfs_node *kn, struct rdtgroup *rdtgrp, closid_free(rdtgrp->closid); free_rmid(rdtgrp->mon.rmid); - rdtgroup_ctrl_remove(kn, rdtgrp); + rdtgroup_ctrl_remove(rdtgrp); /* * Free all the child monitor group rmids. @@ -3126,13 +3123,13 @@ static int rdtgroup_rmdir(struct kernfs_node *kn) rdtgrp != &rdtgroup_default) { if (rdtgrp->mode == RDT_MODE_PSEUDO_LOCKSETUP || rdtgrp->mode == RDT_MODE_PSEUDO_LOCKED) { - ret = rdtgroup_ctrl_remove(kn, rdtgrp); + ret = rdtgroup_ctrl_remove(rdtgrp); } else { - ret = rdtgroup_rmdir_ctrl(kn, rdtgrp, tmpmask); + ret = rdtgroup_rmdir_ctrl(rdtgrp, tmpmask); } } else if (rdtgrp->type == RDTMON_GROUP && is_mon_groups(parent_kn, kn->name)) { - ret = rdtgroup_rmdir_mon(kn, rdtgrp, tmpmask); + ret = rdtgroup_rmdir_mon(rdtgrp, tmpmask); } else { ret = -EPERM; } -- 1.8.3.1