mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Valery Ivanov <ivalery111@gmail.com>
Cc: arve@android.com, riandrews@android.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: android: ion: remove unnecessary intermediate variable 'objs'
Date: Fri, 28 Aug 2020 12:15:05 +0200	[thread overview]
Message-ID: <20200828101505.GB1352233@kroah.com> (raw)
In-Reply-To: <20200827112448.85831-1-ivalery111@gmail.com>

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@gmail.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

      reply	other threads:[~2020-08-28 10:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 11:24 Valery Ivanov
2020-08-28 10:15 ` Greg KH [this message]

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=20200828101505.GB1352233@kroah.com \
    --to=greg@kroah.com \
    --cc=arve@android.com \
    --cc=ivalery111@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riandrews@android.com \
    /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

all inboxes | Powered by JetHome®