linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/filemap: Remove redundant variable's assignment
@ 2021-01-25  3:20 Baolin Wang
  2021-01-25  6:27 ` Miaohe Lin
  2021-01-25 23:22 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Baolin Wang @ 2021-01-25  3:20 UTC (permalink / raw)
  To: akpm; +Cc: baolin.wang, linux-mm, linux-kernel

We've already set the variable 'i' 's initial value before using it,
thus remove redundant previous assignment of variable 'i'.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 mm/filemap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index e4906f5..07b02f3 100644
--- 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) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/filemap: Remove redundant variable's assignment
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Miaohe Lin @ 2021-01-25  6:27 UTC (permalink / raw)
  To: Baolin Wang; +Cc: linux-mm, linux-kernel, Andrew Morton

On 2021/1/25 11:20, Baolin Wang wrote:
> We've already set the variable 'i' 's initial value before using it,
> thus remove redundant previous assignment of variable 'i'.
> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>  mm/filemap.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index e4906f5..07b02f3 100644
> --- 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) {
> 

Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/filemap: Remove redundant variable's assignment
  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
  2021-01-26  2:03   ` Baolin Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2021-01-25 23:22 UTC (permalink / raw)
  To: Baolin Wang; +Cc: linux-mm, linux-kernel

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm/filemap: Remove redundant variable's assignment
  2021-01-25 23:22 ` Andrew Morton
@ 2021-01-26  2:03   ` Baolin Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Baolin Wang @ 2021-01-26  2:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, linux-kernel



在 2021/1/26 7:22, Andrew Morton 写道:
> 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.

Ah, right. Thanks for letting me know.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-26 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-01-26  2:03   ` Baolin Wang

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