linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, dledford@redhat.com
Subject: [PATCH 2/3] conf_watch(): More dead code removal
Date: Mon, 31 Oct 2011 14:53:53 +0100	[thread overview]
Message-ID: <1320069234-13112-3-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1320069234-13112-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

verbose is always zero, hence anything checking for verbose > 0 will
always fail.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 config.c |   26 --------------------------
 1 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/config.c b/config.c
index b57ba50..4e6165e 100644
--- a/config.c
+++ b/config.c
@@ -1022,57 +1022,31 @@ int conf_name_is_free(char *name)
 struct mddev_ident *conf_match(struct mdinfo *info, struct supertype *st)
 {
 	struct mddev_ident *array_list, *match;
-	int verbose = 0;
 	array_list = conf_get_ident(NULL);
 	match = NULL;
 	for (; array_list; array_list = array_list->next) {
 		if (array_list->uuid_set &&
 		    same_uuid(array_list->uuid, info->uuid, st->ss->swapuuid)
 		    == 0) {
-			if (verbose >= 2 && array_list->devname)
-				fprintf(stderr, Name
-					": UUID differs from %s.\n",
-					array_list->devname);
 			continue;
 		}
 		if (array_list->name[0] &&
 		    strcasecmp(array_list->name, info->name) != 0) {
-			if (verbose >= 2 && array_list->devname)
-				fprintf(stderr, Name
-					": Name differs from %s.\n",
-					array_list->devname);
 			continue;
 		}
 		if (array_list->super_minor != UnSet &&
 		    array_list->super_minor != info->array.md_minor) {
-			if (verbose >= 2 && array_list->devname)
-				fprintf(stderr, Name
-					": Different super-minor to %s.\n",
-					array_list->devname);
 			continue;
 		}
 		if (!array_list->uuid_set &&
 		    !array_list->name[0] &&
 		    !array_list->devices &&
 		    array_list->super_minor == UnSet) {
-			if (verbose >= 2 && array_list->devname)
-				fprintf(stderr, Name
-			     ": %s doesn't have any identifying information.\n",
-					array_list->devname);
 			continue;
 		}
 		/* FIXME, should I check raid_disks and level too?? */
 
 		if (match) {
-			if (verbose >= 0) {
-				if (match->devname && array_list->devname)
-					fprintf(stderr, Name
-		   ": we match both %s and %s - cannot decide which to use.\n",
-						match->devname, array_list->devname);
-				else
-					fprintf(stderr, Name
-						": multiple lines in mdadm.conf match\n");
-			}
 			return NULL;
 		}
 		match = array_list;
-- 
1.7.6.4


  parent reply	other threads:[~2011-10-31 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-31 13:53 [PATCH 0/3] Remove dead code Jes.Sorensen
2011-10-31 13:53 ` [PATCH 1/3] conf_match(): " Jes.Sorensen
2011-11-01  2:33   ` NeilBrown
2011-11-01  6:22     ` Jes Sorensen
2011-10-31 13:53 ` Jes.Sorensen [this message]
2011-10-31 13:53 ` [PATCH 3/3] Kill(): Remove redundant check and " Jes.Sorensen

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=1320069234-13112-3-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=dledford@redhat.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;
as well as URLs for NNTP newsgroup(s).