mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Qianqiang Liu <qianqiang.liu@163.com>,
	ray.huang@amd.com, gautham.shenoy@amd.com, perry.yuan@amd.com
Cc: rafael@kernel.org, viresh.kumar@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq/amd-pstate-ut: Fix an "Uninitialized variables" issue
Date: Wed, 11 Sep 2024 11:02:03 -0500	[thread overview]
Message-ID: <0af7ec21-d470-4efe-98ec-9b4879575478@amd.com> (raw)
In-Reply-To: <20240910233923.46470-1-qianqiang.liu@163.com>

On 9/10/2024 18:39, Qianqiang Liu wrote:
> Using uninitialized value "mode2" when calling "amd_pstate_get_mode_string".
> Set "mode2" to "AMD_PSTATE_DISABLE" by default.
> 
> Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>
> ---
>   drivers/cpufreq/amd-pstate-ut.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
> index c291b3dbec38..f66701514d90 100644
> --- a/drivers/cpufreq/amd-pstate-ut.c
> +++ b/drivers/cpufreq/amd-pstate-ut.c
> @@ -270,7 +270,7 @@ static int amd_pstate_set_mode(enum amd_pstate_mode mode)
>   
>   static void amd_pstate_ut_check_driver(u32 index)
>   {
> -	enum amd_pstate_mode mode1, mode2;
> +	enum amd_pstate_mode mode1, mode2 = AMD_PSTATE_DISABLE;
>   	int ret;
>   
>   	for (mode1 = AMD_PSTATE_DISABLE; mode1 < AMD_PSTATE_MAX; mode1++) {

Acked-by: Mario Limonciello <mario.limonciello@amd.com>

Much appreciated.  I needed to redo the PR for 6.12 and I added this as 
well.


      reply	other threads:[~2024-09-11 16:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10 23:39 Qianqiang Liu
2024-09-11 16:02 ` Mario Limonciello [this message]

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=0af7ec21-d470-4efe-98ec-9b4879575478@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=gautham.shenoy@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=perry.yuan@amd.com \
    --cc=qianqiang.liu@163.com \
    --cc=rafael@kernel.org \
    --cc=ray.huang@amd.com \
    --cc=viresh.kumar@linaro.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®