linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] md/raid10: use correct limit variable
@ 2012-10-02  8:04 Dan Carpenter
  2012-10-03  1:51 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-10-02  8:04 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, kernel-janitors

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@oracle.com>

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;
 				}
 			}

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

end of thread, other threads:[~2012-10-03  1:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02  8:04 [patch] md/raid10: use correct limit variable Dan Carpenter
2012-10-03  1:51 ` NeilBrown

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