[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fea254dd-c622-4868-b9ec-3a902c5d7fa6@intel.com>
Date: Thu, 12 Jun 2025 11:23:44 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Shaopeng Tan <tan.shaopeng@...fujitsu.com>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>
CC: James Morse <james.morse@....com>, Yury Norov <yury.norov@...il.com>,
"Dave Martin" <dave.martin@....com>, <fenghuay@...dia.com>,
<peternewman@...gle.com>, Babu Moger <Babu.Moger@....com>, Borislav Petkov
<bp@...en8.de>, <shameerali.kolothum.thodi@...wei.com>,
<bobo.shaobowang@...wei.com>, D Scott Phillips OS
<scott@...amperecomputing.com>, <carl@...amperecomputing.com>, Koba Ko
<kobak@...dia.com>, Shanker Donthineni <sdonthineni@...dia.com>, Xin Hao
<xhao@...ux.alibaba.com>, <baolin.wang@...ux.alibaba.com>,
<lcherian@...vell.com>, <amitsinght@...vell.com>, Ingo Molnar
<mingo@...hat.com>, David Hildenbrand <david@...hat.com>, H Peter Anvin
<hpa@...or.com>, Rex Nie <rex.nie@...uarmicro.com>, Jamie Iles
<quic_jiles@...cinc.com>, <dfustini@...libre.com>, Thomas Gleixner
<tglx@...utronix.de>
Subject: Re: [PATCH 2/2] x86/resctrl: Optimize code in rdt_get_tree()
Hi Shaopeng,
On 6/10/25 7:15 PM, Shaopeng Tan wrote:
> Inconsistent context format. Optimize it,
What does "Inconsistent context format" mean?
> not only save a line and also make it easier to understand.
The changelog needs to follow rules found in "Changelog"
section of Documentation/process/maintainer-tip.rst.
Here is an example:
schemata_list_destroy() has to be called if
schemata_list_create() fails.
rdt_get_tree() calls schemata_list_destroy() in two different
ways: directly if schemata_list_create() itself fails and on
the exit path via the out_schemata_free goto label.
Remove schemata_list_destroy() call on schemata_list_create()
failure. Use existing out_schemata_free goto label instead.
>
> Signed-off-by: Shaopeng Tan <tan.shaopeng@...fujitsu.com>
> ---
> 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;
>
> ret = schemata_list_create();
> - if (ret) {
> - schemata_list_destroy();
> - goto out_ctx;
> - }
> + if (ret)
> + goto out_schemata_free;
>
> ret = closid_init();
> if (ret)
Please address the issue of now unused "out_ctx" label reported
in [1]. Looks good to me otherwise.
Thank you for the cleanup.
Reinette
[1] https://lore.kernel.org/lkml/202506120440.lz9OAoXE-lkp@intel.com/
Powered by blists - more mailing lists