linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
To: cgel.zte@gmail.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	 LKML <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: Wed, 8 Dec 2021 13:35:35 +0100	[thread overview]
Message-ID: <CAM9Jb+hfa7fejFqmg3A07kjrZTf++QKCYx=0oArBNBqNsMrv1A@mail.gmail.com> (raw)
In-Reply-To: <20211207083222.401594-1-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: Pankaj Gupta <pankaj.gupta@ionos.com>


      parent reply	other threads:[~2021-12-08 12:36 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
2021-12-08  9:35 ` Muchun Song
2021-12-08 12:35 ` Pankaj Gupta [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='CAM9Jb+hfa7fejFqmg3A07kjrZTf++QKCYx=0oArBNBqNsMrv1A@mail.gmail.com' \
    --to=pankaj.gupta.linux@gmail.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