spin_lock_irqsave(&libcfs_nidstring_lock, flags);
str = libcfs_nidstrings[libcfs_nidstring_idx++];
- if (libcfs_nidstring_idx ==
- sizeof(libcfs_nidstrings)/sizeof(libcfs_nidstrings[0]))
+ if (libcfs_nidstring_idx == ARRAY_SIZE(libcfs_nidstrings))
libcfs_nidstring_idx = 0;
spin_unlock_irqrestore(&libcfs_nidstring_lock, flags);
{/* .nf_type */ -1},
};
-const int libcfs_nnetstrfns = sizeof(libcfs_netstrfns)/sizeof(libcfs_netstrfns[0]);
+const int libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns);
int
libcfs_lo_str2addr(const char *str, int nob, __u32 *addr)