linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: cgel.zte@gmail.com, akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	chiminghao <chi.minghao@zte.com.cn>,
	Zeal Robot <zealci@zte.com.cm>
Subject: Re: [PATCH] mm:remove unneeded variable
Date: Tue, 7 Dec 2021 11:18:44 +0100	[thread overview]
Message-ID: <72c5006e-fc04-8546-7754-3b03ae0a968e@redhat.com> (raw)
In-Reply-To: <20211207083222.401594-1-chi.minghao@zte.com.cn>

On 07.12.21 09:32, cgel.zte@gmail.com wrote:
> From: chiminghao <chi.minghao@zte.com.cn>
> 
> return value form directly instead of
> taking this in another redundant variable.
> 
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: chiminghao <chi.minghao@zte.com.cn>
> ---
>  mm/truncate.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/mm/truncate.c b/mm/truncate.c
> index cc83a3f7c1ad..41b8249b3b4a 100644
> --- a/mm/truncate.c
> +++ b/mm/truncate.c
> @@ -205,7 +205,6 @@ static void truncate_cleanup_page(struct page *page)
>  static int
>  invalidate_complete_page(struct address_space *mapping, struct page *page)
>  {
> -	int ret;
>  
>  	if (page->mapping != mapping)
>  		return 0;
> @@ -213,9 +212,7 @@ invalidate_complete_page(struct address_space *mapping, struct page *page)
>  	if (page_has_private(page) && !try_to_release_page(page, 0))
>  		return 0;
>  
> -	ret = remove_mapping(mapping, page);
> -
> -	return ret;
> +	return remove_mapping(mapping, page);
>  }
>  
>  int truncate_inode_page(struct address_space *mapping, struct page *page)
> 

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2021-12-07 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  8:32 cgel.zte
2021-12-07 10:18 ` David Hildenbrand [this message]
2021-12-08  9:35 ` Muchun Song
2021-12-08 12:35 ` Pankaj Gupta

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=72c5006e-fc04-8546-7754-3b03ae0a968e@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=zealci@zte.com.cm \
    /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