Message ID | 20181115142702.15893-1-cgxu519@gmx.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] ceph: remove redundant assignment | expand |
On Thu, Nov 15, 2018 at 10:31 PM Chengguang Xu <cgxu519@gmx.com> wrote: > > There is redundant assighment of variable i in > ceph_mdsmap_get_random_mds(), just remvoe it. > > Signed-off-by: Chengguang Xu <cgxu519@gmx.com> > --- > fs/ceph/mdsmap.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c > index 44e53abeb32a..1a2c5d390f7f 100644 > --- a/fs/ceph/mdsmap.c > +++ b/fs/ceph/mdsmap.c > @@ -35,7 +35,6 @@ int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m) > > /* pick */ > n = prandom_u32() % n; > - i = 0; > for (i = 0; n > 0; i++, n--) > while (m->m_info[i].state <= 0) > i++; > -- > 2.17.2 > both patches are applied. Yan, Zheng
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c index 44e53abeb32a..1a2c5d390f7f 100644 --- a/fs/ceph/mdsmap.c +++ b/fs/ceph/mdsmap.c @@ -35,7 +35,6 @@ int ceph_mdsmap_get_random_mds(struct ceph_mdsmap *m) /* pick */ n = prandom_u32() % n; - i = 0; for (i = 0; n > 0; i++, n--) while (m->m_info[i].state <= 0) i++;
There is redundant assighment of variable i in ceph_mdsmap_get_random_mds(), just remvoe it. Signed-off-by: Chengguang Xu <cgxu519@gmx.com> --- fs/ceph/mdsmap.c | 1 - 1 file changed, 1 deletion(-)