From fbd07358a3257408746ffbc876884e1552fcd61d Mon Sep 17 00:00:00 2001 From: zab Date: Fri, 27 Jun 2003 05:36:27 +0000 Subject: [PATCH] - remove the empty parameters to CDEBUG_STACK to appease ancient gcc that I was accidentally using. - we're still #including kernel headers in userspace (sigh), 2.5 needs to play along. It would be great to clean up these includes. --- lnet/Kernelenv.in | 3 ++- lnet/include/linux/kp30.h | 10 +++++----- lnet/libcfs/module.c | 2 +- lnet/utils/acceptor.c | 2 +- lustre/portals/Kernelenv.in | 3 ++- lustre/portals/include/linux/kp30.h | 10 +++++----- lustre/portals/libcfs/module.c | 2 +- lustre/portals/utils/acceptor.c | 2 +- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/lnet/Kernelenv.in b/lnet/Kernelenv.in index 2e883c5..7a48c58 100644 --- a/lnet/Kernelenv.in +++ b/lnet/Kernelenv.in @@ -1,5 +1,6 @@ EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include -HOSTCFLAGS := $(EXTRA_CFLAGS) +# portals/utils/debug.c wants from userspace. sigh. +HOSTCFLAGS := -I@LINUX@/include $(EXTRA_CFLAGS) LIBREADLINE := @LIBREADLINE@ # 2.5's makefiles aren't nice to cross dir libraries in host programs PTLCTLOBJS := debug.o l_ioctl.o parser.o portals.o diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index bc563fe..1555f78 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -80,9 +80,9 @@ extern unsigned int portal_printk; # include /* THREAD_SIZE */ #ifdef __ia64__ -#define CDEBUG_STACK() ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1)) +#define CDEBUG_STACK ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1)) #else -#define CDEBUG_STACK() (THREAD_SIZE - \ +#define CDEBUG_STACK (THREAD_SIZE - \ ((unsigned long)__builtin_frame_address(0) & \ (THREAD_SIZE - 1))) #endif @@ -100,19 +100,19 @@ extern unsigned int portal_printk; } while (0) #else #define CHECK_STACK(stack) do{}while(0) -#define CDEBUG_STACK(var) (0L) +#define CDEBUG_STACK (0L) #endif #if 1 #define CDEBUG(mask, format, a...) \ do { \ - CHECK_STACK(CDEBUG_STACK()); \ + CHECK_STACK(CDEBUG_STACK); \ if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) || \ (portal_debug & (mask) && \ portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24)))) \ portals_debug_msg(DEBUG_SUBSYSTEM, mask, \ __FILE__, __FUNCTION__, __LINE__, \ - CDEBUG_STACK(), format , ## a); \ + CDEBUG_STACK, format , ## a); \ } while (0) #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a) diff --git a/lnet/libcfs/module.c b/lnet/libcfs/module.c index 342e955..e9f4545 100644 --- a/lnet/libcfs/module.c +++ b/lnet/libcfs/module.c @@ -65,7 +65,7 @@ struct semaphore nal_cmd_sem; void kportal_assertion_failed(char *expr, char *file, const char *func, const int line) { - portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(), + portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK, "ASSERTION(%s) failed\n", expr); LBUG_WITH_LOC(file, func, line); } diff --git a/lnet/utils/acceptor.c b/lnet/utils/acceptor.c index c6590db..44fca96 100644 --- a/lnet/utils/acceptor.c +++ b/lnet/utils/acceptor.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include /* sigh. for __cpu_to_* */ #include #include diff --git a/lustre/portals/Kernelenv.in b/lustre/portals/Kernelenv.in index 2e883c5..7a48c58 100644 --- a/lustre/portals/Kernelenv.in +++ b/lustre/portals/Kernelenv.in @@ -1,5 +1,6 @@ EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include -HOSTCFLAGS := $(EXTRA_CFLAGS) +# portals/utils/debug.c wants from userspace. sigh. +HOSTCFLAGS := -I@LINUX@/include $(EXTRA_CFLAGS) LIBREADLINE := @LIBREADLINE@ # 2.5's makefiles aren't nice to cross dir libraries in host programs PTLCTLOBJS := debug.o l_ioctl.o parser.o portals.o diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index bc563fe..1555f78 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -80,9 +80,9 @@ extern unsigned int portal_printk; # include /* THREAD_SIZE */ #ifdef __ia64__ -#define CDEBUG_STACK() ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1)) +#define CDEBUG_STACK ((unsigned long)__builtin_dwarf_cfa()&(THREAD_SIZE - 1)) #else -#define CDEBUG_STACK() (THREAD_SIZE - \ +#define CDEBUG_STACK (THREAD_SIZE - \ ((unsigned long)__builtin_frame_address(0) & \ (THREAD_SIZE - 1))) #endif @@ -100,19 +100,19 @@ extern unsigned int portal_printk; } while (0) #else #define CHECK_STACK(stack) do{}while(0) -#define CDEBUG_STACK(var) (0L) +#define CDEBUG_STACK (0L) #endif #if 1 #define CDEBUG(mask, format, a...) \ do { \ - CHECK_STACK(CDEBUG_STACK()); \ + CHECK_STACK(CDEBUG_STACK); \ if (!(mask) || ((mask) & (D_ERROR | D_EMERG)) || \ (portal_debug & (mask) && \ portal_subsystem_debug & (1 << (DEBUG_SUBSYSTEM >> 24)))) \ portals_debug_msg(DEBUG_SUBSYSTEM, mask, \ __FILE__, __FUNCTION__, __LINE__, \ - CDEBUG_STACK(), format , ## a); \ + CDEBUG_STACK, format , ## a); \ } while (0) #define CWARN(format, a...) CDEBUG(D_WARNING, format, ## a) diff --git a/lustre/portals/libcfs/module.c b/lustre/portals/libcfs/module.c index 342e955..e9f4545 100644 --- a/lustre/portals/libcfs/module.c +++ b/lustre/portals/libcfs/module.c @@ -65,7 +65,7 @@ struct semaphore nal_cmd_sem; void kportal_assertion_failed(char *expr, char *file, const char *func, const int line) { - portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK(), + portals_debug_msg(0, D_EMERG, file, func, line, CDEBUG_STACK, "ASSERTION(%s) failed\n", expr); LBUG_WITH_LOC(file, func, line); } diff --git a/lustre/portals/utils/acceptor.c b/lustre/portals/utils/acceptor.c index c6590db..44fca96 100644 --- a/lustre/portals/utils/acceptor.c +++ b/lustre/portals/utils/acceptor.c @@ -11,7 +11,7 @@ #include #include #include -#include +#include /* sigh. for __cpu_to_* */ #include #include -- 1.8.3.1