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: <20200828101505.GB1352233@kroah.com>
Date:   Fri, 28 Aug 2020 12:15:05 +0200
From:   Greg KH <greg@...ah.com>
To:     Valery Ivanov <ivalery111@...il.com>
Cc:     arve@...roid.com, riandrews@...roid.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: android: ion: remove unnecessary intermediate
 variable 'objs'

On Thu, Aug 27, 2020 at 02:24:48PM +0300, Valery Ivanov wrote:
> It is not necesssary to use 'objs' as an intermediate variable for assignment operation.
> 
> Signed-off-by: Valery Ivanov <ivalery111@...il.com>
> ---
>  drivers/staging/android/ion/ion.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
> index 3c9f09506ffa..137bef25dcbc 100644
> --- a/drivers/staging/android/ion/ion.c
> +++ b/drivers/staging/android/ion/ion.c
> @@ -523,15 +523,12 @@ static int debug_shrink_set(void *data, u64 val)
>  {
>  	struct ion_heap *heap = data;
>  	struct shrink_control sc;
> -	int objs;
>  
>  	sc.gfp_mask = GFP_HIGHUSER;
>  	sc.nr_to_scan = val;
>  
> -	if (!val) {
> -		objs = heap->shrinker.count_objects(&heap->shrinker, &sc);
> -		sc.nr_to_scan = objs;
> -	}
> +	if (!val)
> +		sc.nr_to_scan = heap->shrinker.count_objects(&heap->shrinker, &sc);
>  
>  	heap->shrinker.scan_objects(&heap->shrinker, &sc);
>  	return 0;
> -- 
> 2.25.1
> 

Please use scripts/get_maintainer.pl to determine who and what mailing
list to send patches to.  You missed the actual maintainers of this
code.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ