Linux Test Project
 help / color / mirror / Atom feed
From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: "Piotr Kubaj" <piotr.kubaj@intel.com>
Cc: daniel.niestepski@intel.com, tomasz.ossowski@intel.com,
	helena.anna.dubel@intel.com, rafael.j.wysocki@intel.com,
	ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v7] high_freq_hwp_cap_cppc.c: new test
Date: Wed, 29 Apr 2026 07:53:13 +0000	[thread overview]
Message-ID: <69f1b8ea.050a0220.2c172.5acd@mx.google.com> (raw)
In-Reply-To: <20260420094437.731979-2-piotr.kubaj@intel.com>

Hi Piotr,

I commented the wrong patch. Was v6, sorry. Let me complete the review
here.

> +static void run(void)
> +{
> +	bool status = true;
> +
> +	for (int i = 0; i < nproc; i++) {
> +		int online = 1;
> +		char path[PATH_MAX];

This can stay out of the loop. `snprintf()` adds a string terminator
so there's no issue with this.

> +		unsigned long long msr_highest_perf = 0, sysfs_highest_perf = 0;
> +
> +		snprintf(path, sizeof(path), "/sys/devices/system/cpu/cpu%d/online", i);
> +		if (i)

I think I missed a part here. Did you double check if `i == 0` creates
an issue while using SAFE_FILE_SCANF ? Please verify and eventually
remove this check.

> +			SAFE_FILE_SCANF(path, "%d", &online);

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2026-04-29  7:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  9:44 [LTP] [PATCH v7] high_freq_hwp_cap_cppc.c: new test Piotr Kubaj
2026-04-20 10:53 ` [LTP] " linuxtestproject.agent
2026-04-29  7:53 ` Andrea Cervesato via ltp [this message]
2026-04-30 11:10   ` [LTP] [PATCH v7] " Kubaj, Piotr

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=69f1b8ea.050a0220.2c172.5acd@mx.google.com \
    --to=ltp@lists.linux.it \
    --cc=andrea.cervesato@suse.com \
    --cc=daniel.niestepski@intel.com \
    --cc=helena.anna.dubel@intel.com \
    --cc=piotr.kubaj@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=tomasz.ossowski@intel.com \
    /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