On Tue, 2 Oct 2012 11:04:22 +0300 Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > Clang complains that we are assigning a variable to itself. This should > be using bad_sectors like the similar earlier check does. > > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > > diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c > index 56149ce..4448624 100644 > --- a/drivers/md/raid10.c > +++ b/drivers/md/raid10.c > @@ -3219,7 +3219,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr, > else { > bad_sectors -= (sector - first_bad); > if (max_sync > bad_sectors) > - max_sync = max_sync; > + max_sync = bad_sectors; > continue; > } > } We sure do have some careless programmers around here :-( That bug has been there since 3.1-rc1. Thanks for finding it! NeilBrown
Attachment:
signature.asc
Description: PGP signature