From: Wei Fang <fangwei1@huawei.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: [PATCH] md: remove an unneeded condition in set_array_info.
Date: Tue, 23 Jun 2015 18:44:46 +0800 [thread overview]
Message-ID: <5589389E.9040800@huawei.com> (raw)
if ->major_version is legal, name can't be NULL, so remove it.
Signed-off-by: Wei Fang <fangwei1@huawei.com>
---
drivers/md/md.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index d4f31e1..1c2f967 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6193,12 +6193,10 @@ static int set_bitmap_file(struct mddev *mddev, int fd)
*/
static int set_array_info(struct mddev *mddev, mdu_array_info_t *info)
{
-
if (info->raid_disks == 0) {
/* just setting version number for superblock loading */
if (info->major_version < 0 ||
- info->major_version >= ARRAY_SIZE(super_types) ||
- super_types[info->major_version].name == NULL) {
+ info->major_version >= ARRAY_SIZE(super_types)) {
/* maybe try to auto-load a module? */
printk(KERN_INFO
"md: superblock version %d not known\n",
--
1.8.3.1
reply other threads:[~2015-06-23 10:44 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=5589389E.9040800@huawei.com \
--to=fangwei1@huawei.com \
--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