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]
Message-ID: <20191204063058.GE1765@kadam>
Date:   Wed, 4 Dec 2019 09:30:58 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Mao Wenan <maowenan@...wei.com>
Cc:     sre@...nel.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH -next] power: supply: ab8500: Drop pointless static
 qualifier in ab8500_btemp_batctrl_volt_to_res()

On Wed, Dec 04, 2019 at 09:05:06AM +0800, Mao Wenan wrote:
> There is no need to have the 'T *v' variable static
> since new value always be assigned before use it.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Mao Wenan <maowenan@...wei.com>
> ---
>  drivers/power/supply/ab8500_btemp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
> index 909f0242bacb..d3d4f7327d1b 100644
> --- a/drivers/power/supply/ab8500_btemp.c
> +++ b/drivers/power/supply/ab8500_btemp.c
> @@ -180,7 +180,7 @@ static int ab8500_btemp_batctrl_volt_to_res(struct ab8500_btemp *di,
>  static int ab8500_btemp_read_batctrl_voltage(struct ab8500_btemp *di)
>  {
>  	int vbtemp, ret;
> -	static int prev;
> +	int prev;

No.  We use it first on linux-next (yesterday).  It needs to be static.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ