From: Brian J. Murrell Date: Tue, 19 Jan 2010 19:14:49 +0000 (-0500) Subject: b=19720 use min_t() to force comparison to unsigned X-Git-Tag: 1.10.0.35~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8999975caf5d8ad7c9291b9883e514458ba755f5;p=fs%2Flustre-release.git b=19720 use min_t() to force comparison to unsigned In older kernels num_online_cpus() is an int, and in newer kernels it is an unsigned so force the comparison to unsigned so that it's portable to both new and old kernels. i=panda i=whitebear --- diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 9fd2e72..dbb4a9f 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -105,7 +105,7 @@ */ #define LDLM_THREADS_AUTO_MIN (2) -#define LDLM_THREADS_AUTO_MAX min(cfs_num_online_cpus() * \ +#define LDLM_THREADS_AUTO_MAX min_t(unsigned, cfs_num_online_cpus() * \ cfs_num_online_cpus() * 32, 128) #define LDLM_BL_THREADS LDLM_THREADS_AUTO_MIN #define LDLM_NBUFS (64 * cfs_num_online_cpus())