summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2014-11-04 08:14:28 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:01 -0400
commitb3f575074b66e8af1a9943874f9782b793fa7edc (patch)
treec4aaa1defc512cf5a896edc25445f169de184ece /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c
parent797e4dd319bd2b9e13ce0e44a3bbbb75e4820330 (diff)
gpu: nvgpu: fix sparse warnings
Fix below sparse warnings : warning: Using plain integer as NULL pointer warning: symbol <variable/funcion> was not declared. Should it be static? warning: Initializer entry defined twice Also, remove dead functions Bug 1573254 Change-Id: I29d71ecc01c841233cf6b26c9088ca8874773469 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/593363 Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.c8
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
61int gk20a_dbg_gpu_do_dev_open(struct inode *inode, struct file *filp, bool is_profiler) 61static 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;