summaryrefslogtreecommitdiff
path: root/drivers/misc/tegra-profiler/eh_unwind.c
diff options
context:
space:
mode:
authorIgor Nabirushkin <inabirushkin@nvidia.com>2014-12-07 15:26:34 +0300
committerWinnie Hsu <whsu@nvidia.com>2015-01-29 22:05:08 -0800
commit6d956bb7ac0872a090b92d4ed4c842edf3c46963 (patch)
tree25c47f2f7dc718d4073227bbd23e5bfe64d00ed2 /drivers/misc/tegra-profiler/eh_unwind.c
parent35b5c2255719adc77d7dade3da0ad41e55f7d295 (diff)
misc: tegra-profiler: fix sparse warnings
Tegra Profiler: fix sparse static warnings. Bug 1587428 Bug 1598009 Change-Id: Ic07b4d6247a506109144ceb1b7401f25373d2137 Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com> Reviewed-on: http://git-master/r/660600 (cherry picked from commit c197f471258f8eb99aa1402ec3a1144b1b34dd65) Reviewed-on: http://git-master/r/672041 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/misc/tegra-profiler/eh_unwind.c')
-rw-r--r--drivers/misc/tegra-profiler/eh_unwind.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/misc/tegra-profiler/eh_unwind.c b/drivers/misc/tegra-profiler/eh_unwind.c
index a097fd8d1067..0fecf0b1059d 100644
--- a/drivers/misc/tegra-profiler/eh_unwind.c
+++ b/drivers/misc/tegra-profiler/eh_unwind.c
@@ -119,7 +119,7 @@ validate_mmap_addr(struct quadd_mmap_area *mmap,
#define read_user_data(addr, retval) \
({ \
- int ret; \
+ long ret; \
\
pagefault_disable(); \
ret = __get_user(retval, addr); \
@@ -728,7 +728,7 @@ unwind_exec_insn(struct quadd_mmap_area *mmap,
((insn & 0x3f) << 2) + 4, ctrl->vrs[SP]);
} else if ((insn & 0xf0) == 0x80) {
unsigned long mask;
- u32 *vsp = (u32 *)(unsigned long)ctrl->vrs[SP];
+ u32 __user *vsp = (u32 __user *)(unsigned long)ctrl->vrs[SP];
int load_sp, reg = 4;
insn = (insn << 8) | unwind_get_byte(mmap, ctrl, &err);
@@ -764,7 +764,7 @@ unwind_exec_insn(struct quadd_mmap_area *mmap,
ctrl->vrs[SP] = ctrl->vrs[insn & 0x0f];
pr_debug("CMD_REG_TO_SP: vsp = {r%lu}\n", insn & 0x0f);
} else if ((insn & 0xf0) == 0xa0) {
- u32 *vsp = (u32 *)(unsigned long)ctrl->vrs[SP];
+ u32 __user *vsp = (u32 __user *)(unsigned long)ctrl->vrs[SP];
unsigned int reg;
/* pop R4-R[4+bbb] */
@@ -795,7 +795,7 @@ unwind_exec_insn(struct quadd_mmap_area *mmap,
pr_debug("CMD_FINISH\n");
} else if (insn == 0xb1) {
unsigned long mask = unwind_get_byte(mmap, ctrl, &err);
- u32 *vsp = (u32 *)(unsigned long)ctrl->vrs[SP];
+ u32 __user *vsp = (u32 __user *)(unsigned long)ctrl->vrs[SP];
int reg = 0;
if (err < 0)
@@ -840,7 +840,7 @@ unwind_exec_insn(struct quadd_mmap_area *mmap,
ctrl->vrs[SP]);
} else if (insn == 0xb3 || insn == 0xc8 || insn == 0xc9) {
unsigned long data, reg_from, reg_to;
- u32 *vsp = (u32 *)(unsigned long)ctrl->vrs[SP];
+ u32 __user *vsp = (u32 __user *)(unsigned long)ctrl->vrs[SP];
data = unwind_get_byte(mmap, ctrl, &err);
if (err < 0)
@@ -869,7 +869,7 @@ unwind_exec_insn(struct quadd_mmap_area *mmap,
} else if ((insn & 0xf8) == 0xb8 || (insn & 0xf8) == 0xd0) {
unsigned long reg_to;
unsigned long data = insn & 0x07;
- u32 *vsp = (u32 *)(unsigned long)ctrl->vrs[SP];
+ u32 __user *vsp = (u32 __user *)(unsigned long)ctrl->vrs[SP];
reg_to = 8 + data;