linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: cgel.zte@gmail.com
Cc: cl@linux.com, rientjes@google.com, iamjoonsoo.kim@lge.com,
	vbabka@suse.cz,  roman.gushchin@linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	 ye xingchen <ye.xingchen@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] mm/slab_common: Remove the unneeded result variable
Date: Tue, 23 Aug 2022 17:37:50 +0900	[thread overview]
Message-ID: <CAB=+i9RQ_x8JO2s=3mOK3T75k0DNm1ShUZsctsXgLP0v=X4gFQ@mail.gmail.com> (raw)
In-Reply-To: <20220823075241.209009-1-ye.xingchen@zte.com.cn>

On Tue, Aug 23, 2022 at 4:52 PM <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Return the value from __kmem_cache_shrink() directly instead of storing it
>  in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
>  mm/slab_common.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index 17996649cfe3..0dfa3cfb6be5 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -495,13 +495,9 @@ EXPORT_SYMBOL(kmem_cache_destroy);
>   */
>  int kmem_cache_shrink(struct kmem_cache *cachep)
>  {
> -       int ret;
> -
> -
>         kasan_cache_shrink(cachep);
> -       ret = __kmem_cache_shrink(cachep);
>
> -       return ret;
> +       return __kmem_cache_shrink(cachep);
>  }
>  EXPORT_SYMBOL(kmem_cache_shrink);
>

Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>

> --
> 2.25.1


  reply	other threads:[~2022-08-23  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  7:52 cgel.zte
2022-08-23  8:37 ` Hyeonggon Yoo [this message]
2022-08-23 14:04 ` Vlastimil Babka

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='CAB=+i9RQ_x8JO2s=3mOK3T75k0DNm1ShUZsctsXgLP0v=X4gFQ@mail.gmail.com' \
    --to=42.hyeyoo@gmail.com \
    --cc=cgel.zte@gmail.com \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=vbabka@suse.cz \
    --cc=ye.xingchen@zte.com.cn \
    --cc=zealci@zte.com.cn \
    /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