DDF (cleanup): use a common macro for failed searches

Use DDF_NOTFOUND instead of NO_SUCH_REFNUM.

Signed-off-by: Martin Wilck <mwilck@arcor.de>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
mwilck@arcor.de 2013-07-03 22:27:41 +02:00 committed by NeilBrown
parent 17790db6a1
commit d6e7b0837d
1 changed files with 2 additions and 3 deletions

View File

@ -3257,7 +3257,6 @@ static int check_secondary(const struct vcl *vc)
return 0;
}
#define NO_SUCH_REFNUM (0xFFFFFFFF)
static unsigned int get_pd_index_from_refnum(const struct vcl *vc,
__u32 refnum, unsigned int nmax,
const struct vd_config **bvd,
@ -3298,7 +3297,7 @@ static unsigned int get_pd_index_from_refnum(const struct vcl *vc,
}
bad:
*bvd = NULL;
return NO_SUCH_REFNUM;
return DDF_NOTFOUND;
}
static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray)
@ -3414,7 +3413,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray
i = get_pd_index_from_refnum(
vc, ddf->phys->entries[pd].refnum,
ddf->mppe, &bvd, &iphys);
if (i == NO_SUCH_REFNUM)
if (i == DDF_NOTFOUND)
continue;
this->array.working_disks++;