From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: neilb@suse.de, linux-raid@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Yuanhan Liu <yuanhan.liu@linux.intel.com>
Subject: [PATCH] md: remove redudent code
Date: Tue, 15 May 2012 16:00:25 +0800 [thread overview]
Message-ID: <1337068825-11995-1-git-send-email-yuanhan.liu@linux.intel.com> (raw)
The code does nothing but repating assigning sb->sb_csum with original
value.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
drivers/md/md.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0bd44e3..f2d799a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1439,15 +1439,12 @@ super_90_rdev_size_change(struct md_rdev *rdev, sector_t num_sectors)
static __le32 calc_sb_1_csum(struct mdp_superblock_1 * sb)
{
- __le32 disk_csum;
u32 csum;
unsigned long long newcsum;
int size = 256 + le32_to_cpu(sb->max_dev)*2;
__le32 *isuper = (__le32*)sb;
int i;
- disk_csum = sb->sb_csum;
- sb->sb_csum = 0;
newcsum = 0;
for (i=0; size>=4; size -= 4 )
newcsum += le32_to_cpu(*isuper++);
@@ -1456,7 +1453,6 @@ static __le32 calc_sb_1_csum(struct mdp_superblock_1 * sb)
newcsum += le16_to_cpu(*(__le16*) isuper);
csum = (newcsum & 0xffffffff) + (newcsum >> 32);
- sb->sb_csum = disk_csum;
return cpu_to_le32(csum);
}
--
1.7.7.6
next reply other threads:[~2012-05-15 8:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 8:00 Yuanhan Liu [this message]
2012-05-15 8:03 ` [PATCH] md: remove redudent code NeilBrown
2012-05-15 8:12 ` Yuanhan Liu
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=1337068825-11995-1-git-send-email-yuanhan.liu@linux.intel.com \
--to=yuanhan.liu@linux.intel.com \
--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;
as well as URLs for NNTP newsgroup(s).