kdb
[Top] [All Lists]

[PATCH 5] kdb-fixups-max-usage

To: kdb@xxxxxxxxxxx
Subject: [PATCH 5] kdb-fixups-max-usage
From: Joe Korty <joe.korty@xxxxxxxx>
Date: Mon, 12 Oct 2009 11:20:23 -0400
Reply-to: Joe Korty <joe.korty@xxxxxxxx>
User-agent: Mutt/1.4.2.1i
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@xxxxxxxx>

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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH 5] kdb-fixups-max-usage, Joe Korty <=