All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 004 of 4] md: Remove unnecessary variable x in stripe_to_pdidx().
Date: Thu, 24 Aug 2006 17:41:18 +1000	[thread overview]
Message-ID: <1060824074118.19171@suse.de> (raw)
In-Reply-To: 20060824173647.19026.patches@notabene


From : Coywolf Qi Hunt <qiyong@freeforge.net>

Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net>


Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/raid5.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c	2006-08-24 17:09:42.000000000 +1000
+++ ./drivers/md/raid5.c	2006-08-24 17:24:17.000000000 +1000
@@ -1350,10 +1350,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;

WARNING: multiple messages have this Message-ID (diff)
From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 004 of 4] md: Remove unnecessary variable x in stripe_to_pdidx().
Date: Thu, 24 Aug 2006 17:41:18 +1000	[thread overview]
Message-ID: <1060824074118.19171@suse.de> (raw)
In-Reply-To: 20060824173647.19026.patches@notabene


>From : Coywolf Qi Hunt <qiyong@freeforge.net>

Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net>


Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/raid5.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c	2006-08-24 17:09:42.000000000 +1000
+++ ./drivers/md/raid5.c	2006-08-24 17:24:17.000000000 +1000
@@ -1350,10 +1350,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;

  parent reply	other threads:[~2006-08-24  7:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24  7:40 [PATCH 000 of 4] md: Introduction NeilBrown
2006-08-24  7:41 ` [PATCH 001 of 4] md: Fix recent breakage of md/raid1 array checking NeilBrown
2006-08-24  7:41 ` [PATCH 002 of 4] md: Fix issues with referencing rdev in md/raid1 NeilBrown
2006-08-24  7:41 ` [PATCH 003 of 4] md: new sysfs interface for setting bits in the write-intent-bitmap NeilBrown
2006-08-24  7:41 ` NeilBrown [this message]
2006-08-24  7:41   ` [PATCH 004 of 4] md: Remove unnecessary variable x in stripe_to_pdidx() NeilBrown
2006-08-24 22:09 ` [PATCH 000 of 4] md: Introduction Andrew Morton
2006-08-25  8:06   ` Neil Brown

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=1060824074118.19171@suse.de \
    --to=neilb@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.