From nobody Sat Oct 11 10:29:55 2025 Received: from esa5.hc1455-7.c3s2.iphmx.com (esa5.hc1455-7.c3s2.iphmx.com [68.232.139.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FE15EEA9 for ; Wed, 11 Jun 2025 02:18:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.139.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749608299; cv=none; b=CuKL8mGnke2e19S9Qb5ViTNtxpDvb/9/zSH2I29wa7jjCEqdxCo9yYJifSLkH8M/TPpDTO1BnQu1LhMn/ZUqtKPuJJdJxe0Jwe74ikFdMxcPd0RXjBOt0I7wo/EJ7FGaNcotk+x+h0Pz2S+hZqVEDhQ1kwK1rGHEtZ8D8uA/cPI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749608299; c=relaxed/simple; bh=xSfht9KRPJIN3XKnJcISniqHonnzom51ddjqLydjIOE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I9N9FP1H0+F8YEAI2pgCe1rN98mBOt6K35/j4UKTid6vT3PKldZhJ7+XXGgE2QancUR+9mCygf3MJF73kHtM9NMd2HGBtZXsD+BVI8IejhtiWuywiKuSAWbX6d3ObsiBP41Hr/kjn9XzI12NiHedj2y9UYNqZEwWJpEIWauxHEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jp.fujitsu.com; spf=pass smtp.mailfrom=jp.fujitsu.com; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b=p+TwdXpz; arc=none smtp.client-ip=68.232.139.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jp.fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jp.fujitsu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b="p+TwdXpz" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1749608298; x=1781144298; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xSfht9KRPJIN3XKnJcISniqHonnzom51ddjqLydjIOE=; b=p+TwdXpzMVX3WI0dv6UDjKNkjyx96+JKHYuqZnWZ4BX4N4MQZZuALeLN ZkXGdSsTizijpWwuvj47mVBQu+sPWN8vQbMVkhLfSmmbiGJE0ZqIg3xDI 2sbUKE+lg4A4lEbKHZdML1btAQxt1msolD55JUQz9UuotMI+eXZ0dDIRQ orGIJGm4qdChaxg4zGoK3gXnvhg0Dj7lEzbf1Xt8hqfydw635ToU7hIZj GXsRIEsEwVG7Gz78Ucn+wz5RYkGV09UW3XScGbYPVrqUM96n9qFGkr/3E Os9NE0x3ay6qvTxy66lmOz3HFntd1zDUaPP+4q+0u+C/F84rTIE3koPgN w==; X-CSE-ConnectionGUID: bZ25ZASURlCitz4rKQmyNw== X-CSE-MsgGUID: HOLmiDGzTHCTgCx41IdDDw== X-IronPort-AV: E=McAfee;i="6800,10657,11460"; a="201563999" X-IronPort-AV: E=Sophos;i="6.16,226,1744038000"; d="scan'208";a="201563999" Received: from unknown (HELO yto-r2.gw.nic.fujitsu.com) ([218.44.52.218]) by esa5.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2025 11:17:06 +0900 Received: from yto-m4.gw.nic.fujitsu.com (yto-nat-yto-m4.gw.nic.fujitsu.com [192.168.83.67]) by yto-r2.gw.nic.fujitsu.com (Postfix) with ESMTP id 56E6CC68FB for ; Wed, 11 Jun 2025 11:17:04 +0900 (JST) Received: from oym-om1.fujitsu.com (oym-om1.o.css.fujitsu.com [10.85.58.161]) by yto-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 228FCD3F13 for ; Wed, 11 Jun 2025 11:17:04 +0900 (JST) Received: from sm-x86-amd03.ssoft.mng.com (sm-x86-stp01.soft.fujitsu.com [10.124.178.20]) by oym-om1.fujitsu.com (Postfix) with ESMTP id BB9FE40072E3A; Wed, 11 Jun 2025 11:17:02 +0900 (JST) From: Shaopeng Tan To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Reinette Chatre , James Morse , Yury Norov , Dave Martin , fenghuay@nvidia.com, peternewman@google.com, Babu Moger , Borislav Petkov , shameerali.kolothum.thodi@huawei.com, bobo.shaobowang@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, Koba Ko , Shanker Donthineni , Xin Hao , baolin.wang@linux.alibaba.com, lcherian@marvell.com, amitsinght@marvell.com, Ingo Molnar , David Hildenbrand , H Peter Anvin , Rex Nie , Jamie Iles , dfustini@baylibre.com, Thomas Gleixner Subject: [PATCH 1/2] x86/resctrl: Remove unnecessary cpumask_nth_andnot() Date: Wed, 11 Jun 2025 11:15:38 +0900 Message-ID: <20250611021547.2766889-2-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250611021547.2766889-1-tan.shaopeng@jp.fujitsu.com> References: <20250611021547.2766889-1-tan.shaopeng@jp.fujitsu.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In commit 94f753143028("x86/resctrl: Optimize cpumask_any_housekeeping()"), cpumask_any_andnot_but() replaced cpumask_nth_andnot(), but left the function cpumask_nth_andnot() unused, delete it. Signed-off-by: Shaopeng Tan --- include/linux/cpumask.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 7ae80a7ca81e..498790f74fa8 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -546,22 +546,6 @@ unsigned int cpumask_nth_and(unsigned int cpu, const s= truct cpumask *srcp1, small_cpumask_bits, cpumask_check(cpu)); } =20 -/** - * cpumask_nth_andnot - get the Nth cpu set in 1st cpumask, and clear in 2= nd. - * @srcp1: the cpumask pointer - * @srcp2: the cpumask pointer - * @cpu: the Nth cpu to find, starting from 0 - * - * Return: >=3D nr_cpu_ids if such cpu doesn't exist. - */ -static __always_inline -unsigned int cpumask_nth_andnot(unsigned int cpu, const struct cpumask *sr= cp1, - const struct cpumask *srcp2) -{ - return find_nth_andnot_bit(cpumask_bits(srcp1), cpumask_bits(srcp2), - small_cpumask_bits, cpumask_check(cpu)); -} - /** * cpumask_nth_and_andnot - get the Nth cpu set in 1st and 2nd cpumask, an= d clear in 3rd. * @srcp1: the cpumask pointer --=20 2.43.5 From nobody Sat Oct 11 10:29:55 2025 Received: from esa4.hc1455-7.c3s2.iphmx.com (esa4.hc1455-7.c3s2.iphmx.com [68.232.139.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D7C17A2EE for ; Wed, 11 Jun 2025 02:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.139.117 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749608302; cv=none; b=rmYSXDgnRfNndPo/OWdsZpRKeQ2WLOg+Oc8llNNMFROSuc9KZ45oQVyq1eExYNl/dqiBdKmTeKmaLVZcP/Zzg7DsmERfPsspXd8qhBXwtMjAwSxDvYPjFozp6SYJcd+2N8PE90ZoxPWwD+vksKxE/pwhlspjHOtEVu1UGRV0zPw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749608302; c=relaxed/simple; bh=47FryM0n8vCaNjijOjTIR4zgLMY5SGBa2CfCuVDwt/0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VzlS5zGg+ORx4YXELZBmhyXqEftFzUDc2BAAZ3iov545xLX3xBZNn/h1lniNtGTS42Em3ggNjuG/qC+Td5PLyMJe/wXK7Z/ar3jFkCdENKAQcgaBb04ubc1PHzcH3GWGQjezqKDcebKmLfCR6ymNUOhu2LB+weZF+X7ovy2PYMg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jp.fujitsu.com; spf=pass smtp.mailfrom=jp.fujitsu.com; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b=rsjzUJZD; arc=none smtp.client-ip=68.232.139.117 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jp.fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jp.fujitsu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fujitsu.com header.i=@fujitsu.com header.b="rsjzUJZD" DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj2; t=1749608300; x=1781144300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=47FryM0n8vCaNjijOjTIR4zgLMY5SGBa2CfCuVDwt/0=; b=rsjzUJZDNAnZvJRACvoIyj2YVcPCv9z5SaMLLY9ojVd/K7c9R/z0c+rG sCPCm+HPs6haGRb5D7au7SDacx/olGbOSORIrDWbQwO9Zs8lfrddHAyRX sPtIZ2bLQx7UmWHI8oD4kZqF0n3bCzQqXRheG29t3qlLarDtN+lEDqrRv 1FpelOa1Pw3atLWeKUpiwjsmUdLnngTAoXr2Q9sdfyjryMr+aEixnrPvV A/ov6kKFLeqAO/LNx37q9hIy4IX2kq0lfIukApt+OnPCwX52L2d5PimCI DDZhboB9YIAFb+5LO5ZJ9A28VPc9KuISE363KLfOo/8t35ra03gqxTp7r w==; X-CSE-ConnectionGUID: 9CWJdtVGTEC3ffwTGA3DQg== X-CSE-MsgGUID: 6Gk54wiNRoKicvJUmcGlCA== X-IronPort-AV: E=McAfee;i="6800,10657,11460"; a="202795237" X-IronPort-AV: E=Sophos;i="6.16,226,1744038000"; d="scan'208";a="202795237" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa4.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2025 11:17:08 +0900 Received: from oym-m2.gw.nic.fujitsu.com (oym-nat-oym-m2.gw.nic.fujitsu.com [192.168.87.59]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 45D07E9ED3 for ; Wed, 11 Jun 2025 11:17:05 +0900 (JST) Received: from oym-om1.fujitsu.com (oym-om1.o.css.fujitsu.com [10.85.58.161]) by oym-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 1651FBF3C7 for ; Wed, 11 Jun 2025 11:17:05 +0900 (JST) Received: from sm-x86-amd03.ssoft.mng.com (sm-x86-stp01.soft.fujitsu.com [10.124.178.20]) by oym-om1.fujitsu.com (Postfix) with ESMTP id 153784007A495; Wed, 11 Jun 2025 11:17:04 +0900 (JST) From: Shaopeng Tan To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Reinette Chatre , James Morse , Yury Norov , Dave Martin , fenghuay@nvidia.com, peternewman@google.com, Babu Moger , Borislav Petkov , shameerali.kolothum.thodi@huawei.com, bobo.shaobowang@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, Koba Ko , Shanker Donthineni , Xin Hao , baolin.wang@linux.alibaba.com, lcherian@marvell.com, amitsinght@marvell.com, Ingo Molnar , David Hildenbrand , H Peter Anvin , Rex Nie , Jamie Iles , dfustini@baylibre.com, Thomas Gleixner Subject: [PATCH 2/2] x86/resctrl: Optimize code in rdt_get_tree() Date: Wed, 11 Jun 2025 11:15:39 +0900 Message-ID: <20250611021547.2766889-3-tan.shaopeng@jp.fujitsu.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250611021547.2766889-1-tan.shaopeng@jp.fujitsu.com> References: <20250611021547.2766889-1-tan.shaopeng@jp.fujitsu.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Inconsistent context format. Optimize it, not only save a line and also make it easier to understand. Signed-off-by: Shaopeng Tan --- fs/resctrl/rdtgroup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 1beb124e25f6..8bf87211eadb 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2608,10 +2608,8 @@ static int rdt_get_tree(struct fs_context *fc) goto out_root; =20 ret =3D schemata_list_create(); - if (ret) { - schemata_list_destroy(); - goto out_ctx; - } + if (ret) + goto out_schemata_free; =20 ret =3D closid_init(); if (ret) --=20 2.43.5