]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: nvmap: fix sparse warning
authorSri Krishna chowdary <schowdary@nvidia.com>
Thu, 30 Oct 2014 05:26:30 +0000 (10:56 +0530)
committerSri Krishna Chowdary <schowdary@nvidia.com>
Sat, 1 Nov 2014 11:54:23 +0000 (04:54 -0700)
limit the scope of local variables/functions by using
static keyword.

Bug 200032218

Change-Id: Id3165670e02c330a143349bff221378e053ea3d1
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/591553
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
drivers/video/tegra/nvmap/nvmap_dmabuf.c
drivers/video/tegra/nvmap/nvmap_handle.c
drivers/video/tegra/nvmap/nvmap_init.c
drivers/video/tegra/nvmap/nvmap_ioctl.c

index c98e6fe114cdc6719941d74f903e0a4ef4984b51..14e3e664137be22e46429b7fb5351b95e94f0b17 100644 (file)
@@ -246,7 +246,8 @@ static void __nvmap_dmabuf_free_sgt_locked(struct nvmap_handle_sgt *nvmap_sgt)
  * mapping itself - this merely takes the passed nvmap_sgt out of the stash
  * and decrements the necessary cache stats.
  */
-void __nvmap_dmabuf_evict_stash_locked(struct nvmap_handle_sgt *nvmap_sgt)
+static void __nvmap_dmabuf_evict_stash_locked(
+                       struct nvmap_handle_sgt *nvmap_sgt)
 {
        if (!list_empty(&nvmap_sgt->stash_entry))
                list_del_init(&nvmap_sgt->stash_entry);
@@ -258,7 +259,7 @@ void __nvmap_dmabuf_evict_stash_locked(struct nvmap_handle_sgt *nvmap_sgt)
 /*
  * Locks the stash before doing the eviction.
  */
-void __nvmap_dmabuf_evict_stash(struct nvmap_handle_sgt *nvmap_sgt)
+static void __nvmap_dmabuf_evict_stash(struct nvmap_handle_sgt *nvmap_sgt)
 {
        mutex_lock(&nvmap_stashed_maps_lock);
        __nvmap_dmabuf_evict_stash_locked(nvmap_sgt);
index 09cb0153b1a5c6632879ee1865f735479eb74d12..71f7e7061a88789e265cb2947f1569cddbb6e989 100644 (file)
@@ -626,8 +626,9 @@ struct nvmap_handle_ref *nvmap_create_handle_from_fd(
        return ref;
 }
 
-struct nvmap_handle *nvmap_duplicate_handle_id_ex(struct nvmap_client *client,
-                                                       struct nvmap_handle *h)
+static struct nvmap_handle *nvmap_duplicate_handle_id_ex(
+                       struct nvmap_client *client,
+                       struct nvmap_handle *h)
 {
        struct nvmap_handle_ref *ref = nvmap_duplicate_handle(client, h, 0);
 
@@ -638,9 +639,10 @@ struct nvmap_handle *nvmap_duplicate_handle_id_ex(struct nvmap_client *client,
 }
 EXPORT_SYMBOL(nvmap_duplicate_handle_id_ex);
 
-int nvmap_get_page_list_info(struct nvmap_client *client,
-                               struct nvmap_handle *handle, u32 *size,
-                               u32 *flags, u32 *nr_page, bool *contig)
+static int nvmap_get_page_list_info(
+                       struct nvmap_client *client,
+                       struct nvmap_handle *handle, u32 *size,
+                       u32 *flags, u32 *nr_page, bool *contig)
 {
        struct nvmap_handle *h;
 
@@ -676,7 +678,8 @@ int nvmap_get_page_list_info(struct nvmap_client *client,
 }
 EXPORT_SYMBOL(nvmap_get_page_list_info);
 
-int nvmap_acquire_page_list(struct nvmap_client *client,
+static int nvmap_acquire_page_list(
+                       struct nvmap_client *client,
                        struct nvmap_handle *handle, struct page **pages,
                        u32 nr_page)
 {
@@ -717,8 +720,8 @@ int nvmap_acquire_page_list(struct nvmap_client *client,
 }
 EXPORT_SYMBOL(nvmap_acquire_page_list);
 
-int nvmap_release_page_list(struct nvmap_client *client,
-                               struct nvmap_handle *handle)
+static int nvmap_release_page_list(struct nvmap_client *client,
+                                  struct nvmap_handle *handle)
 {
        struct nvmap_handle_ref *ref;
        struct nvmap_handle *h = NULL;
index b87afb49cbbaf670fa1bb118e07f5b3a6bb72820..0af9ff7f51d9812ba03c5578e7b159c43b52fb31 100644 (file)
@@ -92,7 +92,7 @@ static struct nvmap_platform_data nvmap_data = {
 /*
  * In case there is no DT entry.
  */
-struct platform_device nvmap_platform_device  = {
+static struct platform_device nvmap_platform_device  = {
        .name   = "tegra-carveouts",
        .id     = -1,
        .dev    = {
index 9f619551ece9fd6e6fc5894328e8d22d93d8af3e..34f8e8f3369d695ae5d610cf3b43316852c1d70d 100644 (file)
@@ -222,7 +222,7 @@ static int nvmap_share_mmap(struct file *file, struct vm_area_struct *vma)
        return -EPERM;
 }
 
-const struct file_operations nvmap_fd_fops = {
+static const struct file_operations nvmap_fd_fops = {
        .owner          = THIS_MODULE,
        .release        = nvmap_share_release,
        .mmap           = nvmap_share_mmap,
@@ -311,7 +311,7 @@ int nvmap_ioctl_alloc_kind(struct file *filp, void __user *arg)
        return err;
 }
 
-int nvmap_create_fd(struct nvmap_client *client, struct nvmap_handle *h)
+static int nvmap_create_fd(struct nvmap_client *client, struct nvmap_handle *h)
 {
        int fd;