From 1f0ec7b45899d30d913e7b49917bdc9f25f682a3 Mon Sep 17 00:00:00 2001
From: girish <girish>
Date: Mon, 28 Jul 2008 18:06:14 +0000
Subject: [PATCH] Cleanup compile warnings. (Patch by Andreas) b=15981 i=rread
 i=girish

---
 libcfs/include/libcfs/linux/kp30.h   | 10 ++--------
 libcfs/include/libcfs/linux/libcfs.h |  2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/libcfs/include/libcfs/linux/kp30.h b/libcfs/include/libcfs/linux/kp30.h
index 5241e91fc6..b7c4715bd2 100644
--- a/libcfs/include/libcfs/linux/kp30.h
+++ b/libcfs/include/libcfs/linux/kp30.h
@@ -372,18 +372,12 @@ extern int  lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
  #define _LWORDSIZE __WORDSIZE
 #endif
 
-#if (defined(__x86_64__) && (defined(__KERNEL__) || defined(CRAY_XT3))) || defined(HAVE_U64_LONG_LONG)
-/* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
+#if defined(HAVE_U64_LONG_LONG)
 # define LPU64 "%Lu"
 # define LPD64 "%Ld"
 # define LPX64 "%#Lx"
 # define LPF64 "L"
-#elif (_LWORDSIZE == 32)
-# define LPU64 "%Lu"
-# define LPD64 "%Ld"
-# define LPX64 "%#Lx"
-# define LPF64 "L"
-#elif (_LWORDSIZE == 64)
+#else
 # define LPU64 "%lu"
 # define LPD64 "%ld"
 # define LPX64 "%#lx"
diff --git a/libcfs/include/libcfs/linux/libcfs.h b/libcfs/include/libcfs/linux/libcfs.h
index 72fd575fde..8d1d2e12f5 100644
--- a/libcfs/include/libcfs/linux/libcfs.h
+++ b/libcfs/include/libcfs/linux/libcfs.h
@@ -151,7 +151,7 @@ struct ptldebug_header {
 
 #define __CHECK_STACK(file, func, line)                                 \
 do {                                                                    \
-        unsigned long _stack = CDEBUG_STACK();                          \
+        unsigned int _stack = CDEBUG_STACK();                           \
                                                                         \
         if (_stack > 3*THREAD_SIZE/4 && _stack > libcfs_stack) {        \
                 libcfs_stack = _stack;                                  \
-- 
GitLab