From: Coywolf Qi Hunt <qiyong@freeforge.net>
To: akpm@osdl.org
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, neilb@suse.de
Subject: [patch] stripe_to_pdidx() cleanup
Date: Tue, 2 May 2006 08:18:43 -0400 [thread overview]
Message-ID: <20060502121843.GA24153@everest.sosdg.org> (raw)
Hello,
Cleanup: Remove unnecessary variable x in stripe_to_pdidx().
Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net>
---
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 3184360..7df6840 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1033,13 +1033,12 @@ static void end_reshape(raid5_conf_t *co
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;
- raid5_compute_sector(stripe*(disks-1)*sectors_per_chunk
- + chunk_offset, disks, disks-1, &dd_idx, &pd_idx, conf);
+ int sectors_per_chunk = conf->chunk_size >> 9;
+ 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;
}
--
Coywolf Qi Hunt
reply other threads:[~2006-05-02 12:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060502121843.GA24153@everest.sosdg.org \
--to=qiyong@freeforge.net \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®