[kdb] [PATCH 5] kdb-fixups-max-usage

Joe Korty joe.korty at ccur.com
Mon Oct 12 10:20:23 CDT 2009


Fix compilation warnings in kdb due to apparent misuse
of the max() macro.

max() requires simplier arguments.

kdb/kdbmain.c: In function 'kdb_init':
kdb/kdbmain.c:4300: warning:
	comparison of distinct pointer types lacks a cast

Signed-off-by: Joe Korty <joe.korty at ccur.com>

Index: 2.6.31.3-kdb/kdb/kdbmain.c
===================================================================
--- 2.6.31.3-kdb.orig/kdb/kdbmain.c	2009-10-12 11:05:01.000000000 -0400
+++ 2.6.31.3-kdb/kdb/kdbmain.c	2009-10-12 11:06:57.000000000 -0400
@@ -4297,7 +4297,8 @@
 #endif	/* kdba_setjmp */
 
 	kdb_initial_cpu = -1;
-	kdb_wait_for_cpus_secs = max(10, 2*num_online_cpus());
+	kdb_wait_for_cpus_secs = 2*num_online_cpus();
+	kdb_wait_for_cpus_secs = max(kdb_wait_for_cpus_secs, 10);
 }
 
 #ifdef	CONFIG_SYSCTL



More information about the kdb mailing list