Whamcloud - gitweb
- come up to modern 2.5's bdevname api
authorzab <zab>
Mon, 19 May 2003 21:10:58 +0000 (21:10 +0000)
committerzab <zab>
Mon, 19 May 2003 21:10:58 +0000 (21:10 +0000)
- sprinkle come consts around our consumers of LINE/FUNC to shut up gcc3

lnet/include/linux/kp30.h
lnet/libcfs/debug.c
lnet/libcfs/module.c
lustre/portals/include/linux/kp30.h
lustre/portals/libcfs/debug.c
lustre/portals/libcfs/module.c

index 4915fe3..61d13de 100644 (file)
@@ -205,7 +205,8 @@ static inline void our_cond_resched(void)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
 
 #ifdef PORTAL_DEBUG
-extern void kportal_assertion_failed(char *expr,char *file,char *func,int line);
+extern void kportal_assertion_failed(char *expr, char *file,
+                                     const char *func, const int line);
 #define LASSERT(e) ((e) ? 0 : kportal_assertion_failed( #e , __FILE__,  \
                                                         __FUNCTION__, __LINE__))
 #else
@@ -555,7 +556,7 @@ extern struct prof_ent prof_ents[MAX_PROFS];
 #endif /* PORTALS_PROFILING */
 
 /* debug.c */
-void portals_run_lbug_upcall(char * file, char *fn, int line);
+void portals_run_lbug_upcall(char * file, const char *fn, const int line);
 void portals_debug_dumplog(void);
 int portals_debug_init(unsigned long bufsize);
 int portals_debug_cleanup(void);
@@ -573,12 +574,13 @@ __s32 portals_debug_copy_to_user(char *buf, unsigned long len);
 # warning printf has been defined as a macro...
 # undef printf
 #endif
-void portals_debug_msg (int subsys, int mask, char *file, char *fn, int line,
-                        unsigned long stack, const char *format, ...)
+void portals_debug_msg(int subsys, int mask, char *file, const char *fn, 
+                       const int line, unsigned long stack, const char *format,
+                        ...)
         __attribute__ ((format (printf, 7, 8)));
 #else
-void portals_debug_msg (int subsys, int mask, char *file, char *fn,
-                        int line, unsigned long stack,
+void portals_debug_msg (int subsys, int mask, char *file, const char *fn,
+                        const int line, unsigned long stack,
                         const char *format, ...);
 #endif /* __GNUC__ */
 void portals_debug_set_level(unsigned int debug_level);
index 6233b8d..786a338 100644 (file)
@@ -781,7 +781,7 @@ void portals_debug_set_level(unsigned int debug_level)
         portal_debug = debug_level;
 }
 
-void portals_run_lbug_upcall(char * file, char *fn, int line)
+void portals_run_lbug_upcall(char * file, const char *fn, const int line)
 {
         char *argv[6];
         char *envp[3];
index 1b9e5bb..faa9d01 100644 (file)
@@ -59,8 +59,8 @@ static struct nal_cmd_handler nal_cmd[NAL_MAX_NR + 1];
 struct semaphore nal_cmd_sem;
 
 #ifdef PORTAL_DEBUG
-void
-kportal_assertion_failed (char *expr, char *file, char *func, int line)
+void kportal_assertion_failed(char *expr, char *file, const char *func, 
+                              const int line)
 {
         unsigned long stack = CDEBUG_STACK(stack);
         portals_debug_msg(0, D_EMERG, file, func, line, stack,
index 4915fe3..61d13de 100644 (file)
@@ -205,7 +205,8 @@ static inline void our_cond_resched(void)
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
 
 #ifdef PORTAL_DEBUG
-extern void kportal_assertion_failed(char *expr,char *file,char *func,int line);
+extern void kportal_assertion_failed(char *expr, char *file,
+                                     const char *func, const int line);
 #define LASSERT(e) ((e) ? 0 : kportal_assertion_failed( #e , __FILE__,  \
                                                         __FUNCTION__, __LINE__))
 #else
@@ -555,7 +556,7 @@ extern struct prof_ent prof_ents[MAX_PROFS];
 #endif /* PORTALS_PROFILING */
 
 /* debug.c */
-void portals_run_lbug_upcall(char * file, char *fn, int line);
+void portals_run_lbug_upcall(char * file, const char *fn, const int line);
 void portals_debug_dumplog(void);
 int portals_debug_init(unsigned long bufsize);
 int portals_debug_cleanup(void);
@@ -573,12 +574,13 @@ __s32 portals_debug_copy_to_user(char *buf, unsigned long len);
 # warning printf has been defined as a macro...
 # undef printf
 #endif
-void portals_debug_msg (int subsys, int mask, char *file, char *fn, int line,
-                        unsigned long stack, const char *format, ...)
+void portals_debug_msg(int subsys, int mask, char *file, const char *fn, 
+                       const int line, unsigned long stack, const char *format,
+                        ...)
         __attribute__ ((format (printf, 7, 8)));
 #else
-void portals_debug_msg (int subsys, int mask, char *file, char *fn,
-                        int line, unsigned long stack,
+void portals_debug_msg (int subsys, int mask, char *file, const char *fn,
+                        const int line, unsigned long stack,
                         const char *format, ...);
 #endif /* __GNUC__ */
 void portals_debug_set_level(unsigned int debug_level);
index 6233b8d..786a338 100644 (file)
@@ -781,7 +781,7 @@ void portals_debug_set_level(unsigned int debug_level)
         portal_debug = debug_level;
 }
 
-void portals_run_lbug_upcall(char * file, char *fn, int line)
+void portals_run_lbug_upcall(char * file, const char *fn, const int line)
 {
         char *argv[6];
         char *envp[3];
index 1b9e5bb..faa9d01 100644 (file)
@@ -59,8 +59,8 @@ static struct nal_cmd_handler nal_cmd[NAL_MAX_NR + 1];
 struct semaphore nal_cmd_sem;
 
 #ifdef PORTAL_DEBUG
-void
-kportal_assertion_failed (char *expr, char *file, char *func, int line)
+void kportal_assertion_failed(char *expr, char *file, const char *func, 
+                              const int line)
 {
         unsigned long stack = CDEBUG_STACK(stack);
         portals_debug_msg(0, D_EMERG, file, func, line, stack,