diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c index 39941aae..bd24e269 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c | |||
@@ -58,7 +58,8 @@ static int alloc_session(struct dbg_session_gk20a **_dbg_s) | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | int gk20a_dbg_gpu_do_dev_open(struct inode *inode, struct file *filp, bool is_profiler) | 61 | static int gk20a_dbg_gpu_do_dev_open(struct inode *inode, |
62 | struct file *filp, bool is_profiler) | ||
62 | { | 63 | { |
63 | struct dbg_session_gk20a *dbg_session; | 64 | struct dbg_session_gk20a *dbg_session; |
64 | struct gk20a *g; | 65 | struct gk20a *g; |
@@ -504,7 +505,8 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, | |||
504 | 505 | ||
505 | gk20a_dbg_fn("Copying regops from userspace"); | 506 | gk20a_dbg_fn("Copying regops from userspace"); |
506 | 507 | ||
507 | if (copy_from_user(ops, (void *)(uintptr_t)args->ops, ops_size)) { | 508 | if (copy_from_user(ops, (void __user *)(uintptr_t)args->ops, |
509 | ops_size)) { | ||
508 | dev_err(dev, "copy_from_user failed!"); | 510 | dev_err(dev, "copy_from_user failed!"); |
509 | err = -EFAULT; | 511 | err = -EFAULT; |
510 | goto clean_up; | 512 | goto clean_up; |
@@ -542,7 +544,7 @@ static int nvgpu_ioctl_channel_reg_ops(struct dbg_session_gk20a *dbg_s, | |||
542 | 544 | ||
543 | gk20a_dbg_fn("Copying result to userspace"); | 545 | gk20a_dbg_fn("Copying result to userspace"); |
544 | 546 | ||
545 | if (copy_to_user((void *)(uintptr_t)args->ops, ops, ops_size)) { | 547 | if (copy_to_user((void __user *)(uintptr_t)args->ops, ops, ops_size)) { |
546 | dev_err(dev, "copy_to_user failed!"); | 548 | dev_err(dev, "copy_to_user failed!"); |
547 | err = -EFAULT; | 549 | err = -EFAULT; |
548 | goto clean_up; | 550 | goto clean_up; |