From f0f6a2b6ede6a7a033b8e5e294580e9c9433ec9e Mon Sep 17 00:00:00 2001 From: zab Date: Mon, 19 May 2003 21:10:58 +0000 Subject: [PATCH] - come up to modern 2.5's bdevname api - sprinkle come consts around our consumers of LINE/FUNC to shut up gcc3 --- lnet/include/linux/kp30.h | 14 ++++++++------ lnet/libcfs/debug.c | 2 +- lnet/libcfs/module.c | 4 ++-- lustre/portals/include/linux/kp30.h | 14 ++++++++------ lustre/portals/libcfs/debug.c | 2 +- lustre/portals/libcfs/module.c | 4 ++-- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index 4915fe3..61d13de 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -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); diff --git a/lnet/libcfs/debug.c b/lnet/libcfs/debug.c index 6233b8d..786a338 100644 --- a/lnet/libcfs/debug.c +++ b/lnet/libcfs/debug.c @@ -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]; diff --git a/lnet/libcfs/module.c b/lnet/libcfs/module.c index 1b9e5bb..faa9d01 100644 --- a/lnet/libcfs/module.c +++ b/lnet/libcfs/module.c @@ -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, diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index 4915fe3..61d13de 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -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); diff --git a/lustre/portals/libcfs/debug.c b/lustre/portals/libcfs/debug.c index 6233b8d..786a338 100644 --- a/lustre/portals/libcfs/debug.c +++ b/lustre/portals/libcfs/debug.c @@ -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]; diff --git a/lustre/portals/libcfs/module.c b/lustre/portals/libcfs/module.c index 1b9e5bb..faa9d01 100644 --- a/lustre/portals/libcfs/module.c +++ b/lustre/portals/libcfs/module.c @@ -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, -- 1.8.3.1