]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: nvmap: remove unused variable global
authorKrishna Reddy <vdumpa@nvidia.com>
Mon, 24 Mar 2014 15:59:10 +0000 (08:59 -0700)
committerKrishna Reddy <vdumpa@nvidia.com>
Mon, 24 Mar 2014 23:36:17 +0000 (16:36 -0700)
Remove unused variable global from handle struct.
Force the size of flags to fixed length.

Change-Id: I2d1d60318936cc3dca35ed94ff9d561da145b1db
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/385715
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/video/tegra/nvmap/nvmap_dmabuf.c
drivers/video/tegra/nvmap/nvmap_ioctl.c
drivers/video/tegra/nvmap/nvmap_priv.h

index 46f4f63ca45aa9080ac815dd0c5254d9b72ad7cb..37470b95c1e53bbe2cadd7e06c33c1ffbfb98230 100644 (file)
@@ -782,7 +782,7 @@ static int __nvmap_dmabuf_stashes_show(struct seq_file *s, void *data)
                }
 
                seq_printf(s, "%s: ", name);
-               seq_printf(s, " flags = 0x%08lx, refs = %d\n",
+               seq_printf(s, " flags = 0x%08x, refs = %d\n",
                           handle->flags, atomic_read(&handle->ref));
 
                seq_printf(s, "  device = %s\n",
index 3ebd16ef1ee6c7068b4593326961d42c3d8ec723..5b5acd8f1195ac8e0a14f7c0dd374c493118d094 100644 (file)
@@ -239,7 +239,6 @@ out:
 
 int nvmap_ioctl_getid(struct file *filp, void __user *arg)
 {
-       struct nvmap_client *client = filp->private_data;
        struct nvmap_create_handle op;
        struct nvmap_handle *h = NULL;
 
@@ -256,9 +255,6 @@ int nvmap_ioctl_getid(struct file *filp, void __user *arg)
                return -EPERM;
 
        op.id = marshal_id(h);
-       if (client == h->owner)
-               h->global = true;
-
        nvmap_handle_put(h);
 
        return copy_to_user(arg, &op, sizeof(op)) ? -EFAULT : 0;
index bc73a0578afb2da3c743b8d7650a9851a7e8d7d3..6fe4baf0cd01fa42681f4332581f9635662423f1 100644 (file)
@@ -32,6 +32,8 @@
 #include <linux/atomic.h>
 #include <linux/dma-buf.h>
 #include <linux/syscalls.h>
+#include <linux/mm.h>
+#include <linux/miscdevice.h>
 #include <linux/nvmap.h>
 #include <linux/workqueue.h>
 #include <linux/dma-mapping.h>
@@ -97,7 +99,7 @@ struct nvmap_handle {
        struct rb_node node;    /* entry on global handle tree */
        atomic_t ref;           /* reference count (i.e., # of duplications) */
        atomic_t pin;           /* pin count */
-       unsigned long flags;    /* caching flags */
+       u32 flags;              /* caching flags */
        size_t size;            /* padded (as-allocated) size */
        size_t orig_size;       /* original (as-requested) size */
        size_t align;
@@ -115,10 +117,9 @@ struct nvmap_handle {
                struct nvmap_pgalloc pgalloc;
                struct nvmap_heap_block *carveout;
        };
-       bool global;            /* handle may be duplicated by other clients */
        bool heap_pgalloc;      /* handle is page allocated (sysmem / iovmm) */
        bool alloc;             /* handle has memory allocated */
-       unsigned int userflags; /* flags passed from userspace */
+       u32 userflags;          /* flags passed from userspace */
        void *vaddr;            /* mapping used inside kernel */
        struct mutex lock;
        void *nvhost_priv;      /* nvhost private data */
@@ -215,9 +216,6 @@ struct nvmap_vma_priv {
        atomic_t        count;  /* number of processes cloning the VMA */
 };
 
-#include <linux/mm.h>
-#include <linux/miscdevice.h>
-
 struct nvmap_device {
        struct rb_root  handles;
        spinlock_t      handle_lock;