linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: cgel.zte@gmail.com, 42.hyeyoo@gmail.com
Cc: cl@linux.com, rientjes@google.com, iamjoonsoo.kim@lge.com,
	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 16:04:50 +0200	[thread overview]
Message-ID: <04adfdfd-8907-fd26-06cd-bb03f39eeed8@suse.cz> (raw)
In-Reply-To: <20220823075241.209009-1-ye.xingchen@zte.com.cn>

On 8/23/22 09:52, 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>

Thanks, added to slab.git for-6.1/trivial

> ---
>  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);
>  



      parent reply	other threads:[~2022-08-23 14:04 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
2022-08-23 14:04 ` Vlastimil Babka [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=04adfdfd-8907-fd26-06cd-bb03f39eeed8@suse.cz \
    --to=vbabka@suse.cz \
    --cc=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=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