[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <928c9107-22a9-47de-ba4b-bd1fffa749cb@intel.com>
Date: Tue, 16 Dec 2025 15:26:58 -0800
From: Reinette Chatre <reinette.chatre@...el.com>
To: Xiaochen Shen <shenxiaochen@...n-hieco.net>, <tony.luck@...el.com>,
<bp@...en8.de>, <fenghuay@...dia.com>, <shuah@...nel.org>,
<skhan@...uxfoundation.org>
CC: <babu.moger@....com>, <james.morse@....com>, <Dave.Martin@....com>,
<x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v4 2/4] selftests/resctrl: Define CPU vendor IDs as bits
to match usage
Hi Xiaochen,
On 12/12/25 11:38 PM, Xiaochen Shen wrote:
> diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
> index 5154ffd821c4..980ecf2bcf10 100644
> --- a/tools/testing/selftests/resctrl/resctrl_tests.c
> +++ b/tools/testing/selftests/resctrl/resctrl_tests.c
> @@ -23,16 +23,24 @@ static struct resctrl_test *resctrl_tests[] = {
> &l2_noncont_cat_test,
> };
>
> -static int detect_vendor(void)
> +static unsigned int detect_vendor(void)
> {
> - FILE *inf = fopen("/proc/cpuinfo", "r");
> - int vendor_id = 0;
> + FILE *inf;
> + static unsigned int vendor_id;
> char *s = NULL;
> char *res;
> + static bool initialized;
>
The changelog incorrectly claims that this should now match reverse fir ordering.
To be "reverse fir" ordered the declarations should look like:
static unsigned int vendor_id;
static bool initialized;
char *s = NULL;
FILE *inf;
char *res;
With this fixed:
| Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>
Reinette
Powered by blists - more mailing lists