Fix sparce warnings for sspt and us_proc_inst
authorAlexander Aksenov <a.aksenov@samsung.com>
Mon, 11 Feb 2013 10:07:14 +0000 (14:07 +0400)
committerAlexander Aksenov <a.aksenov@samsung.com>
Mon, 11 Feb 2013 10:07:14 +0000 (14:07 +0400)
driver/sspt/sspt.h
driver/us_proc_inst.c
driver/us_proc_inst.h

index 1092a6c..e11be73 100644 (file)
@@ -30,6 +30,7 @@
 #include "sspt_file.h"
 #include "sspt_procs.h"
 #include "sspt_debug.h"
+#include "../us_proc_inst.h"
 
 
 #include "../storage.h"
@@ -96,15 +97,12 @@ enum US_FLAGS {
        US_DISARM
 };
 
-static int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic);
-static int unregister_usprobe(struct task_struct *task, struct us_ip *ip, int atomic, int no_rp2);
-
-static int register_usprobe_my(struct task_struct *task, struct us_ip *ip)
+static inline int register_usprobe_my(struct task_struct *task, struct us_ip *ip)
 {
        return register_usprobe(task, ip, 1);
 }
 
-static int unregister_usprobe_my(struct task_struct *task, struct us_ip *ip, enum US_FLAGS flag)
+static inline int unregister_usprobe_my(struct task_struct *task, struct us_ip *ip, enum US_FLAGS flag)
 {
        int err = 0;
 
index 81f8984..b0ae91e 100644 (file)
@@ -60,8 +60,6 @@ unsigned long ujprobe_event_pre_handler (struct us_ip *ip, struct pt_regs *regs)
 void ujprobe_event_handler (unsigned long arg1, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5, unsigned long arg6);
 int uretprobe_event_handler (struct kretprobe_instance *probe, struct pt_regs *regs, struct us_ip *ip);
 
-static int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic);
-static int unregister_usprobe(struct task_struct *task, struct us_ip *ip, int atomic, int no_rp2);
 
 int us_proc_probes;
 
@@ -1215,7 +1213,7 @@ int uretprobe_event_handler(struct kretprobe_instance *probe, struct pt_regs *re
        return 0;
 }
 
-static int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic)
+int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic)
 {
        int ret = 0;
        ip->jprobe.kp.tgid = task->tgid;
@@ -1256,7 +1254,7 @@ static int register_usprobe(struct task_struct *task, struct us_ip *ip, int atom
        return 0;
 }
 
-static int unregister_usprobe(struct task_struct *task, struct us_ip *ip, int atomic, int not_rp2)
+int unregister_usprobe(struct task_struct *task, struct us_ip *ip, int atomic, int not_rp2)
 {
        dbi_unregister_ujprobe(task, &ip->jprobe, atomic);
 
index b134902..059ee99 100644 (file)
@@ -80,6 +80,14 @@ extern int dump_backtrace(probe_id_t probe_id, struct task_struct *task,
 /* Gets current function return address */
 extern unsigned long get_ret_addr(struct task_struct *task, struct us_ip *ip);
 
+extern unsigned long imi_sum_time;
+extern unsigned long imi_sum_hit;
+
+extern struct list_head proc_probes_list;
+
+int register_usprobe(struct task_struct *task, struct us_ip *ip, int atomic);
+int unregister_usprobe(struct task_struct *task, struct us_ip *ip, int atomic, int no_rp2);
+
 #define user_backtrace(size) \
        do { \
                us_proc_ip_t *ip = __get_cpu_var(gpCurIp); \