On 07/08/2013 08:16 AM, NeilBrown wrote: >> -static struct vd_config *find_vdcr(struct ddf_super *ddf, unsigned int inst) >> +static int find_index_in_bvd(const struct ddf_super *ddf, >> + const struct vd_config *conf, unsigned int n, >> + unsigned int *n_bvd) >> +{ >> + /* >> + * Find the index of the n-th valid physical disk in this BVD >> + */ >> + unsigned int i, j; >> + for (i = 0, j = 0; i < ddf->mppe && >> + j < __be16_to_cpu(conf->prim_elmnt_count); i++) { >> + if (conf->phys_refnum[i] != 0xffffffff) { > > Should that 0xffffffff be DDF_NOTFOUND? I'd say rather not. Currently the DDF code is using 0xffffffff explicitly for "invalid refnums" (value from the spec) in several places. DDF_NOTFOUND is used by my code as a return code for functions returning "unsigned int". It's similar but not quite the same. The readability DDF code could be improved by using a symbolic name like DDF_INVALID_REFNUM = 0xffffffff, and possibly using a different numeric value for DDF_NOTFOUND. But that's the kind of stuff that I've avoided so far. > > (I glazed over reading the rest of this patch .. sorry. Maybe I'll try again > another day) Thanks for reading it. Martin -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html