mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Xiaochen Shen <shenxiaochen@open-hieco.net>,
	<tony.luck@intel.com>, <bp@alien8.de>, <fenghuay@nvidia.com>,
	<shuah@kernel.org>, <skhan@linuxfoundation.org>
Cc: <babu.moger@amd.com>, <james.morse@arm.com>,
	<Dave.Martin@arm.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH v4 2/4] selftests/resctrl: Define CPU vendor IDs as bits to match usage
Date: Tue, 16 Dec 2025 15:26:58 -0800	[thread overview]
Message-ID: <928c9107-22a9-47de-ba4b-bd1fffa749cb@intel.com> (raw)
In-Reply-To: <20251213073811.3016864-3-shenxiaochen@open-hieco.net>

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@intel.com>

Reinette


  reply	other threads:[~2025-12-16 23:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-13  7:38 [PATCH v4 0/4] selftests/resctrl: Add Hygon CPUs support and bug fixes Xiaochen Shen
2025-12-13  7:38 ` [PATCH v4 1/4] selftests/resctrl: Fix a division by zero error on Hygon Xiaochen Shen
2025-12-13  7:38 ` [PATCH v4 2/4] selftests/resctrl: Define CPU vendor IDs as bits to match usage Xiaochen Shen
2025-12-16 23:26   ` Reinette Chatre [this message]
2025-12-17  2:36     ` Xiaochen Shen
2025-12-13  7:38 ` [PATCH v4 3/4] selftests/resctrl: Add CPU vendor detection for Hygon Xiaochen Shen
2025-12-13  7:38 ` [PATCH v4 4/4] selftests/resctrl: Fix non-contiguous CBM check " Xiaochen Shen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=928c9107-22a9-47de-ba4b-bd1fffa749cb@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=bp@alien8.de \
    --cc=fenghuay@nvidia.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shenxiaochen@open-hieco.net \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®