From: Alexander Aksenov Date: Thu, 7 Feb 2013 13:04:44 +0000 (+0400) Subject: Fix sparce warnings in sspt modules X-Git-Tag: accepted/tizen/mobile/20160407.001200~817 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af6d7d67abdcbbc5b5d085c8e3c892c92e51a65d;p=platform%2Fkernel%2Fswap-modules.git Fix sparce warnings in sspt modules --- diff --git a/driver/sspt/sspt.h b/driver/sspt/sspt.h index 0cfe530..dbecd56 100644 --- a/driver/sspt/sspt.h +++ b/driver/sspt/sspt.h @@ -37,7 +37,7 @@ static void print_proc_probes(const struct sspt_procs *procs); -struct sspt_procs *get_file_probes(const inst_us_proc_t *task_inst_info) +static struct sspt_procs *get_file_probes(const inst_us_proc_t *task_inst_info) { struct sspt_procs *procs = sspt_procs_create(task_inst_info->m_f_dentry, 0); @@ -52,7 +52,7 @@ struct sspt_procs *get_file_probes(const inst_us_proc_t *task_inst_info) int k, j; us_proc_lib_t *p_libs = &task_inst_info->p_libs[i]; struct dentry *dentry = p_libs->m_f_dentry; - const char *path = p_libs->path; + char *path = p_libs->path; char *name = strrchr(path, '/'); name = name ? ++name : path; @@ -72,7 +72,7 @@ struct sspt_procs *get_file_probes(const inst_us_proc_t *task_inst_info) pd.offset = ip->offset; pd.got_addr = got_addr; pd.pre_handler = ip->jprobe.pre_entry; - pd.jp_handler = ip->jprobe.entry; + pd.jp_handler = (unsigned long) ip->jprobe.entry; pd.rp_handler = ip->retprobe.handler; sspt_procs_add_ip_data(procs, dentry, name, &pd); diff --git a/driver/sspt/sspt_debug.h b/driver/sspt/sspt_debug.h index c192785..025efd1 100644 --- a/driver/sspt/sspt_debug.h +++ b/driver/sspt/sspt_debug.h @@ -55,11 +55,13 @@ static void print_page_probes(const struct sspt_page *page) static void print_file_probes(const struct sspt_file *file) { - int i, table_size; + int i; + unsigned long table_size; struct sspt_page *page = NULL; struct hlist_node *node = NULL; struct hlist_head *head = NULL; - static const char *NA = "N/A"; + static unsigned char *NA = "N/A"; + unsigned char *name; if (file == NULL) { printk("### file_p == NULL\n"); @@ -67,9 +69,9 @@ static void print_file_probes(const struct sspt_file *file) } table_size = (1 << file->page_probes_hash_bits); - const char *name = (file->dentry) ? file->dentry->d_iname : NA; + name = (file->dentry) ? file->dentry->d_iname : NA; - printk("### print_file_probes: path=%s, d_iname=%s, table_size=%d, vm_start=%x\n", + printk("### print_file_probes: path=%s, d_iname=%s, table_size=%u, vm_start=%x\n", file->name, name, table_size, file->vm_start); for (i = 0; i < table_size; ++i) { @@ -91,7 +93,7 @@ static void print_proc_probes(const struct sspt_procs *procs) printk("### print_proc_probes\n"); } -void print_inst_us_proc(const inst_us_proc_t *task_inst_info) +static void print_inst_us_proc(const inst_us_proc_t *task_inst_info) { int i; int cnt = task_inst_info->libs_count; @@ -108,7 +110,7 @@ void print_inst_us_proc(const inst_us_proc_t *task_inst_info) printk("### path=%s, cnt_j=%d\n", path, cnt_j); for (j = 0; j < cnt_j; ++j) { - struct us_ip *ips = &lib->p_ips[j]; + us_proc_ip_t *ips = &lib->p_ips[j]; unsigned long offset = ips->offset; printk("### offset=%x\n", offset); }