@@ -967,8 +967,8 @@ int cfs_print_nidlist(char *buffer, int count, struct list_head *nidlist)
char *
libcfs_nidstr_r(const struct lnet_nid *nid, char *buf, size_t buf_size)
{
- u32 nnum = be16_to_cpu(nid->nid_num);
- u32 lnd = nid->nid_type;
+ u32 nnum;
+ u32 lnd;
struct netstrfns *nf;
if (LNET_NID_IS_ANY(nid)) {
@@ -977,6 +977,8 @@ int cfs_print_nidlist(char *buffer, int count, struct list_head *nidlist)
return buf;
}
+ nnum = be16_to_cpu(nid->nid_num);
+ lnd = nid->nid_type;
nf = libcfs_lnd2netstrfns(lnd);
if (nf) {
size_t addr_len;