Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Donglin Peng
On Sun, Feb 11, 2018 at 9:02 AM, Matthew Wilcox wrote: > On Sat, Feb 10, 2018 at 10:04:23AM -0800, Joe Perches wrote: >> > @@ -120,14 +120,12 @@ static int traverse(struct seq_file *m, loff_t >> > offset) >> > if (pos + m->count > offset) { >> > m->from

Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Donglin Peng
On Sun, Feb 11, 2018 at 9:02 AM, Matthew Wilcox wrote: > On Sat, Feb 10, 2018 at 10:04:23AM -0800, Joe Perches wrote: >> > @@ -120,14 +120,12 @@ static int traverse(struct seq_file *m, loff_t >> > offset) >> > if (pos + m->count > offset) { >> > m->from = offset - pos; >> >

Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Matthew Wilcox
On Sat, Feb 10, 2018 at 10:04:23AM -0800, Joe Perches wrote: > > @@ -120,14 +120,12 @@ static int traverse(struct seq_file *m, loff_t offset) > > if (pos + m->count > offset) { > > m->from = offset - pos; > > m->count -= m->from; > > -m->index =

Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Matthew Wilcox
On Sat, Feb 10, 2018 at 10:04:23AM -0800, Joe Perches wrote: > > @@ -120,14 +120,12 @@ static int traverse(struct seq_file *m, loff_t offset) > > if (pos + m->count > offset) { > > m->from = offset - pos; > > m->count -= m->from; > > -m->index =

Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Joe Perches
On Sat, 2018-02-10 at 23:59 +0800, Donglin Peng wrote: > There are two redundant assignments in the traverse() function, because > the while loop will break after these two assignments, and after that > the variable index will be assigned to m->index again. [] > diff --git a/fs/seq_file.c

Re: [PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Joe Perches
On Sat, 2018-02-10 at 23:59 +0800, Donglin Peng wrote: > There are two redundant assignments in the traverse() function, because > the while loop will break after these two assignments, and after that > the variable index will be assigned to m->index again. [] > diff --git a/fs/seq_file.c

[PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Donglin Peng
There are two redundant assignments in the traverse() function, because the while loop will break after these two assignments, and after that the variable index will be assigned to m->index again. Signed-off-by: Peng Donglin --- fs/seq_file.c | 2 -- 1 file changed, 2

[PATCH] seq_file: remove redundant assignment of index to m->index

2018-02-10 Thread Donglin Peng
There are two redundant assignments in the traverse() function, because the while loop will break after these two assignments, and after that the variable index will be assigned to m->index again. Signed-off-by: Peng Donglin --- fs/seq_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git