linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/filemap: Remove redundant variable's assignment
Date: Mon, 25 Jan 2021 15:22:37 -0800	[thread overview]
Message-ID: <20210125152237.d3cfebac78907fb50ae5cbbc@linux-foundation.org> (raw)
In-Reply-To: <08dc7237b44b9455ab095b44dc6969a1607b08db.1611544316.git.baolin.wang@linux.alibaba.com>

On Mon, 25 Jan 2021 11:20:02 +0800 Baolin Wang <baolin.wang@linux.alibaba.com> wrote:

> We've already set the variable 'i' 's initial value before using it,
> thus remove redundant previous assignment of variable 'i'.
> 
> ...
>
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2472,7 +2472,6 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,
>  		if ((iocb->ki_flags & IOCB_WAITQ) && written)
>  			iocb->ki_flags |= IOCB_NOWAIT;
>  
> -		i = 0;
>  		pg_nr = generic_file_buffered_read_get_pages(iocb, iter,
>  							     pages, nr_pages);
>  		if (pg_nr < 0) {

Matthew's patch series "Refactor generic_file_buffered_read "
(https://lkml.kernel.org/r/20210122160140.223228-1-willy@infradead.org)
changes all this code - I dont think the patch is relevant after that,
so I'll skip it.


  parent reply	other threads:[~2021-01-25 23:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25  3:20 [PATCH] mm/filemap: Remove redundant variable's assignment Baolin Wang
2021-01-25  6:27 ` Miaohe Lin
2021-01-25 23:22 ` Andrew Morton [this message]
2021-01-26  2:03   ` Baolin Wang

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=20210125152237.d3cfebac78907fb50ae5cbbc@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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;
as well as URLs for NNTP newsgroup(s).