/* .nf_match_addr*/ libcfs_num_match,
/* .nf_is_contiguous */ cfs_num_is_contiguous,
/* .nf_min_max */ cfs_num_min_max},
- /* placeholder for net0 alias. It MUST BE THE LAST ENTRY */
- {/* .nf_type */ -1},
};
static const size_t libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns);
for (i = 0; i < libcfs_nnetstrfns; i++) {
nf = &libcfs_netstrfns[i];
- if (nf->nf_type >= 0 &&
- !strncmp(name, nf->nf_name, strlen(nf->nf_name)))
+ if (!strncmp(name, nf->nf_name, strlen(nf->nf_name)))
return nf;
}
return NULL;
int i;
for (i = 0; i < libcfs_nnetstrfns; i++)
- if (libcfs_netstrfns[i].nf_type >= 0 &&
- !strcmp(libcfs_netstrfns[i].nf_name, name))
+ if (!strcmp(libcfs_netstrfns[i].nf_name, name))
return &libcfs_netstrfns[i];
return NULL;
for (i = 0; i < libcfs_nnetstrfns; i++) {
nf = &libcfs_netstrfns[i];
- if (nf->nf_type >= 0 &&
- !strncmp(str, nf->nf_name, strlen(nf->nf_name)))
+ if (!strncmp(str, nf->nf_name, strlen(nf->nf_name)))
break;
}