From c04c5e188a1e1fce10a75a3803bee53ef52a5f39 Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Thu, 14 Jan 2010 16:15:02 -0500 Subject: [PATCH] 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 --- lustre/include/lustre_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 9ee9892..3e90a48 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -102,7 +102,7 @@ */ #define LDLM_THREADS_AUTO_MIN (2) -#define LDLM_THREADS_AUTO_MAX min(num_online_cpus()*num_online_cpus()*32, 128) +#define LDLM_THREADS_AUTO_MAX min_t(unsigned, num_online_cpus()*num_online_cpus()*32, 128) #define LDLM_BL_THREADS LDLM_THREADS_AUTO_MIN #define LDLM_NBUFS (64 * num_online_cpus()) #define LDLM_BUFSIZE (8 * 1024) -- 1.8.3.1