Skip to content

Commit

Permalink
[PATCH] md: remove unnecessary variable x in stripe_to_pdidx()
Browse files Browse the repository at this point in the history
Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Coywolf Qi Hunt authored and Linus Torvalds committed Oct 3, 2006
1 parent 9b1d1da commit 2d2063c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2d2063c

Please sign in to comment.