All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony@xenproject.org>
To: Penny Zheng <Penny.Zheng@amd.com>
Cc: xen-devel@lists.xenproject.org, ray.huang@amd.com,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH v7 13/13] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver
Date: Wed, 27 Aug 2025 17:58:03 +0200	[thread overview]
Message-ID: <aK8rC7CLd_7Z9sC8@l14> (raw)
In-Reply-To: <20250822105218.3601273-14-Penny.Zheng@amd.com>

On Fri, Aug 22, 2025 at 06:52:18PM +0800, Penny Zheng wrote:
> diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
> index 02981c4583..eedb745a46 100644
> --- a/tools/misc/xenpm.c
> +++ b/tools/misc/xenpm.c
> @@ -38,6 +38,13 @@
>  static xc_interface *xc_handle;
>  static unsigned int max_cpu_nr;
>  
> +static const char cpufreq_policy_str[][12] = {

Is it necessary to hard-code an hand calculated size of the literal
strings? Can't we let the compiler do that for us? With this as type:

    static const char *cpufreq_policy_str[] = {

The compiler might not detect an issue if we write "11" instead of "12",
for example.

> +    [CPUFREQ_POLICY_UNKNOWN] = "unknown",
> +    [CPUFREQ_POLICY_POWERSAVE] = "powersave",
> +    [CPUFREQ_POLICY_PERFORMANCE] = "performance",
> +    [CPUFREQ_POLICY_ONDEMAND] = "ondemand",
> +};
> +
>  /* help message */
>  void show_help(void)
>  {

Otherwise the tool side of the patch looks fine to me,
so: Acked-by: Anthony PERARD <anthony.perard@vates.tech>

Thanks,

-- 
Anthony PERARD


  parent reply	other threads:[~2025-08-27 15:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 10:52 [PATCH v7 00/13] amd-cppc CPU Performance Scaling Driver Penny Zheng
2025-08-22 10:52 ` [PATCH v7 01/13] tools: drop "has_num" condition check for cppc mode Penny Zheng
2025-08-22 10:52 ` [PATCH v7 02/13] cpufreq: rename "xen_cppc_para" to "xen_get_cppc_para" Penny Zheng
2025-08-22 10:52 ` [PATCH v7 03/13] tools: fix help info for "xenpm set-cpufreq-cppc" Penny Zheng
2025-08-25 14:30   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 04/13] xen/cpufreq: add missing default: case for x86 vendor Penny Zheng
2025-08-25 14:43   ` Jan Beulich
2025-08-26  4:23     ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 05/13] xen/cpufreq: refactor cmdline "cpufreq=xxx" Penny Zheng
2025-08-25 14:45   ` Jan Beulich
2025-08-26  7:38   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 06/13] xen/cpufreq: introduce new sub-hypercall to propagate CPPC data Penny Zheng
2025-08-25 15:01   ` Jan Beulich
2025-08-26  5:53     ` Penny, Zheng
2025-08-26  5:58       ` Jan Beulich
2025-08-26  6:38         ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 07/13] xen/cpufreq: introduce "cpufreq=amd-cppc" xen cmdline and amd-cppc driver Penny Zheng
2025-08-25 15:07   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 08/13] xen/cpufreq: implement amd-cppc driver for CPPC in passive mode Penny Zheng
2025-08-25 15:14   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 09/13] xen/cpufreq: implement amd-cppc-epp driver for CPPC in active mode Penny Zheng
2025-08-25 15:19   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 10/13] xen/cpufreq: get performance policy from governor set via xenpm Penny Zheng
2025-08-25 15:23   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 11/13] tools/cpufreq: extract CPPC para from cpufreq para Penny Zheng
2025-08-25 15:36   ` Jan Beulich
2025-08-26  8:21     ` Penny, Zheng
2025-08-26  8:32       ` Jan Beulich
2025-08-26  9:12         ` Penny, Zheng
2025-08-27 15:22   ` Anthony PERARD
2025-08-28  4:14     ` Penny, Zheng
2025-08-22 10:52 ` [PATCH v7 12/13] xen/cpufreq: bypass governor-related para for amd-cppc-epp Penny Zheng
2025-08-25 15:44   ` Jan Beulich
2025-08-22 10:52 ` [PATCH v7 13/13] xen/cpufreq: Adapt SET/GET_CPUFREQ_CPPC xen_sysctl_pm_op for amd-cppc driver Penny Zheng
2025-08-25 16:02   ` Jan Beulich
2025-08-28  4:06     ` Penny, Zheng
2025-08-28  6:35       ` Jan Beulich
2025-08-28  6:37         ` Jan Beulich
2025-08-28  6:54           ` Penny, Zheng
2025-08-28  7:09             ` Jan Beulich
2025-08-28  7:52               ` Penny, Zheng
2025-08-27 15:58   ` Anthony PERARD [this message]
2025-08-27 16:08     ` Jan Beulich

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=aK8rC7CLd_7Z9sC8@l14 \
    --to=anthony@xenproject.org \
    --cc=Penny.Zheng@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=ray.huang@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.