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] [day] [month] [year] [list]
Message-ID: <a24219b3-ef14-4694-914a-3c4004f3008e@arm.com>
Date: Thu, 6 Feb 2025 14:55:47 +0000
From: Christian Loehle <christian.loehle@....com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
 Linux PM <linux-pm@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
 Daniel Lezcano <daniel.lezcano@...aro.org>,
 Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
 Aboorva Devarajan <aboorvad@...ux.ibm.com>
Subject: Re: [RFT][PATCH v1 1/5] cpuidle: menu: Drop a redundant local
 variable

On 2/6/25 14:22, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Local variable min in get_typical_interval() is updated, but never
> accessed later, so drop it.
> 
> No functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  drivers/cpuidle/governors/menu.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> --- a/drivers/cpuidle/governors/menu.c
> +++ b/drivers/cpuidle/governors/menu.c
> @@ -117,7 +117,7 @@
>  static unsigned int get_typical_interval(struct menu_device *data)
>  {
>  	int i, divisor;
> -	unsigned int min, max, thresh, avg;
> +	unsigned int max, thresh, avg;
>  	uint64_t sum, variance;
>  
>  	thresh = INT_MAX; /* Discard outliers above this value */
> @@ -125,7 +125,6 @@
>  again:
>  
>  	/* First calculate the average of past intervals */
> -	min = UINT_MAX;
>  	max = 0;
>  	sum = 0;
>  	divisor = 0;
> @@ -136,9 +135,6 @@
>  			divisor++;
>  			if (value > max)
>  				max = value;
> -
> -			if (value < min)
> -				min = value;
>  		}
>  	}
>  
> 
> 
> 

Reviewed-by: Christian Loehle <christian.loehle@....com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ