From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Portia Stephens <portia.stephens@canonical.com>,
mmayer@broadcom.com, bcm-kernel-feedback-list@broadcom.com,
rafael@kernel.org
Cc: viresh.kumar@linaro.org, abelova@astralinux.ru,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, stephensportia@gmail.com
Subject: Re: [PATCH] cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations
Date: Wed, 24 Apr 2024 08:01:23 -0700 [thread overview]
Message-ID: <f7dd4aac-ca25-48d9-8e2e-c07df74d7425@broadcom.com> (raw)
In-Reply-To: <20240424050220.889814-1-portia.stephens@canonical.com>
[-- Attachment #1: Type: text/plain, Size: 1357 bytes --]
On 4/23/2024 10:02 PM, Portia Stephens wrote:
> There is a compile warning because a NULL pointer check was added before
> a struct was declared. This moves the NULL pointer check to after the
> struct is delcared and moves the struct assignment to after the NULL
> pointer check.
>
> Fixes: f661017e6d32 ("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value")
No need for a newline between the Fixes: and Signed-off-by: tags, FWIW
>
> Signed-off-by: Portia Stephens <portia.stephens@canonical.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
> ---
> drivers/cpufreq/brcmstb-avs-cpufreq.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
> index 1a1857b0a6f4..ea8438550b49 100644
> --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
> +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
> @@ -481,9 +481,12 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
> static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
> {
> struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
> + struct private_data *priv;
> +
> if (!policy)
> return 0;
> - struct private_data *priv = policy->driver_data;
> +
> + priv = policy->driver_data;
>
> cpufreq_cpu_put(policy);
>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
next prev parent reply other threads:[~2024-04-24 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 5:02 [PATCH] cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed declarations Portia Stephens
2024-04-24 15:01 ` Florian Fainelli [this message]
2024-04-25 5:07 ` Viresh Kumar
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=f7dd4aac-ca25-48d9-8e2e-c07df74d7425@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=abelova@astralinux.ru \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mmayer@broadcom.com \
--cc=portia.stephens@canonical.com \
--cc=rafael@kernel.org \
--cc=stephensportia@gmail.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