All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Gupta <sumitg@nvidia.com>
To: Xueqin Luo <luoxueqin@kylinos.cn>,
	rafael@kernel.org, viresh.kumar@linaro.org,
	thierry.reding@kernel.org, jonathanh@nvidia.com
Cc: linux-pm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv
Date: Tue, 1 Sep 2026 15:33:43 +0530	[thread overview]
Message-ID: <35c658a3-63ba-4664-ba8a-598ce6121430@nvidia.com> (raw)
In-Reply-To: <20260831073009.3772408-1-luoxueqin@kylinos.cn>


On 31/08/26 13:00, Xueqin Luo wrote:
> External email: Use caution opening links or attachments
>
>
> ndiv is already a u64 pointer, passing &ndiv to smp_call_function_single()
> results in a u64** being written to instead of the caller's u64 variable,
> so the caller always reads back an uninitialized ndiv.  Drop the spurious
> '&'.
>
> Fixes: 0839ed1fd7ac ("cpufreq: tegra194: add soc data to support multiple soc")
> Signed-off-by: Xueqin Luo <luoxueqin@kylinos.cn>
> ---
>   drivers/cpufreq/tegra194-cpufreq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
> index c6375e14d445..1eb96e9f3310 100644
> --- a/drivers/cpufreq/tegra194-cpufreq.c
> +++ b/drivers/cpufreq/tegra194-cpufreq.c
> @@ -367,7 +367,7 @@ static void tegra194_get_cpu_ndiv_sysreg(void *ndiv)
>
>   static int tegra194_get_cpu_ndiv(u32 cpu, u32 cpuid, u32 clusterid, u64 *ndiv)
>   {
> -       return smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, &ndiv, true);
> +       return smp_call_function_single(cpu, tegra194_get_cpu_ndiv_sysreg, ndiv, true);
>   }
>
>   static void tegra194_set_cpu_ndiv_sysreg(void *data)
> --
> 2.43.0

Reviewed-by: Sumit Gupta <sumitg@nvidia.com>

Thanks,
Sumit



      parent reply	other threads:[~2026-09-01 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  7:30 [PATCH] cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv Xueqin Luo
2026-08-31  7:56 ` Viresh Kumar
2026-09-01 10:03 ` Sumit Gupta [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=35c658a3-63ba-4664-ba8a-598ce6121430@nvidia.com \
    --to=sumitg@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=luoxueqin@kylinos.cn \
    --cc=rafael@kernel.org \
    --cc=thierry.reding@kernel.org \
    --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 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.