From: Coywolf Qi Hunt Date: Tue, 3 Oct 2006 08:15:50 +0000 (-0700) Subject: [PATCH] md: remove unnecessary variable x in stripe_to_pdidx() X-Git-Tag: 2.1b_release~31114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d2063ceae73660d5142f4754d50a75b655fd1f9;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git [PATCH] md: remove unnecessary variable x in stripe_to_pdidx() Signed-off-by: Coywolf Qi Hunt Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 1c8ab34..46fd651 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -1351,10 +1351,9 @@ static int page_is_zero(struct page *p) static int stripe_to_pdidx(sector_t stripe, raid5_conf_t *conf, int disks) { int sectors_per_chunk = conf->chunk_size >> 9; - sector_t x = stripe; int pd_idx, dd_idx; - int chunk_offset = sector_div(x, sectors_per_chunk); - stripe = x; + int chunk_offset = sector_div(stripe, sectors_per_chunk); + raid5_compute_sector(stripe*(disks-1)*sectors_per_chunk + chunk_offset, disks, disks-1, &dd_idx, &pd_idx, conf); return pd_idx;