lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 24 Apr 2024 08:01:23 -0700
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Portia Stephens <portia.stephens@...onical.com>, mmayer@...adcom.com,
 bcm-kernel-feedback-list@...adcom.com, rafael@...nel.org
Cc: viresh.kumar@...aro.org, abelova@...ralinux.ru, linux-pm@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 stephensportia@...il.com
Subject: Re: [PATCH] cpufreq: brcmstb-avs-cpufreq: ISO C90 forbids mixed
 declarations



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@...onical.com>

Acked-by: Florian Fainelli <florian.fainelli@...adcom.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

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ