struct host1x_channel *host1x_channel_request(struct device *dev)
 {
        struct host1x *host = dev_get_drvdata(dev->parent);
-       int max_channels = host->info->nb_channels;
+       unsigned int max_channels = host->info->nb_channels;
        struct host1x_channel *channel = NULL;
        int index, err;
 
 
 
 static void show_syncpts(struct host1x *m, struct output *o)
 {
-       int i;
+       unsigned int i;
        host1x_debug_output(o, "---- syncpts ----\n");
        for (i = 0; i < host1x_syncpt_nb_pts(m); i++) {
                u32 max = host1x_syncpt_read_max(m->syncpt + i);
                u32 min = host1x_syncpt_load(m->syncpt + i);
                if (!min && !max)
                        continue;
-               host1x_debug_output(o, "id %d (%s) min %d max %d\n",
+
+               host1x_debug_output(o, "id %u (%s) min %d max %d\n",
                                    i, m->syncpt[i].name, min, max);
        }
 
                u32 base_val;
                base_val = host1x_syncpt_load_wait_base(m->syncpt + i);
                if (base_val)
-                       host1x_debug_output(o, "waitbase id %d val %d\n", i,
+                       host1x_debug_output(o, "waitbase id %u val %d\n", i,
                                            base_val);
        }
 
 
 };
 
 struct host1x_info {
-       int     nb_channels;            /* host1x: num channels supported */
-       int     nb_pts;                 /* host1x: num syncpoints supported */
-       int     nb_bases;               /* host1x: num syncpoints supported */
-       int     nb_mlocks;              /* host1x: number of mlocks */
-       int     (*init)(struct host1x *); /* initialize per SoC ops */
-       int     sync_offset;
-       u64     dma_mask;               /* mask of addressable memory */
+       unsigned int nb_channels; /* host1x: number of channels supported */
+       unsigned int nb_pts; /* host1x: number of syncpoints supported */
+       unsigned int nb_bases; /* host1x: number of syncpoint bases supported */
+       unsigned int nb_mlocks; /* host1x: number of mlocks supported */
+       int (*init)(struct host1x *host1x); /* initialize per SoC ops */
+       unsigned int sync_offset; /* offset of syncpoint registers */
+       u64 dma_mask; /* mask of addressable memory */
 };
 
 struct host1x {
 
 {
        struct host1x *host1x = cdma_to_host1x(cdma);
        struct push_buffer *pb = &cdma->push_buffer;
-       u32 i;
+       unsigned int i;
 
        for (i = 0; i < syncpt_incrs; i++)
                host1x_syncpt_incr(cdma->timeout.syncpt);
 
        struct host1x_job *job;
 
        list_for_each_entry(job, &cdma->sync_queue, list) {
-               int i;
+               unsigned int i;
+
                host1x_debug_output(o, "\n%p: JOB, syncpt_id=%d, syncpt_val=%d, first_get=%08x, timeout=%d num_slots=%d, num_handles=%d\n",
                                    job, job->syncpt_id, job->syncpt_end,
                                    job->first_get, job->timeout,
 
 static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
 {
-       int i;
+       unsigned int i;
 
        host1x_debug_output(o, "---- mlocks ----\n");
        for (i = 0; i < host1x_syncpt_nb_mlocks(host); i++) {
                u32 owner =
                        host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
                if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
-                       host1x_debug_output(o, "%d: locked by channel %d\n",
+                       host1x_debug_output(o, "%u: locked by channel %u\n",
                                i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
                else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
-                       host1x_debug_output(o, "%d: locked by cpu\n", i);
+                       host1x_debug_output(o, "%u: locked by cpu\n", i);
                else
-                       host1x_debug_output(o, "%d: unlocked\n", i);
+                       host1x_debug_output(o, "%u: unlocked\n", i);
        }
        host1x_debug_output(o, "\n");
 }
 
 {
        struct host1x *host = dev_id;
        unsigned long reg;
-       int i, id;
+       unsigned int i, id;
 
        for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); i++) {
                reg = host1x_sync_readl(host,
 
 static void _host1x_intr_disable_all_syncpt_intrs(struct host1x *host)
 {
-       u32 i;
+       unsigned int i;
 
        for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); ++i) {
                host1x_sync_writel(host, 0xffffffffu,
 static int _host1x_intr_init_host_sync(struct host1x *host, u32 cpm,
        void (*syncpt_thresh_work)(struct work_struct *))
 {
-       int i, err;
+       unsigned int i;
+       int err;
 
        host1x_hw_intr_disable_all_syncpt_intrs(host);
 
 
 static int _host1x_free_syncpt_irq(struct host1x *host)
 {
-       int i;
+       unsigned int i;
 
        devm_free_irq(host->dev, host->intr_syncpt_irq, host);
 
 
  */
 static void syncpt_restore(struct host1x_syncpt *sp)
 {
+       u32 min = host1x_syncpt_read_min(sp);
        struct host1x *host = sp->host;
-       int min = host1x_syncpt_read_min(sp);
+
        host1x_sync_writel(host, min, HOST1X_SYNC_SYNCPT(sp->id));
 }
 
 
 void host1x_syncpt_restore(struct host1x *host)
 {
        struct host1x_syncpt *sp_base = host->syncpt;
-       u32 i;
+       unsigned int i;
 
        for (i = 0; i < host1x_syncpt_nb_pts(host); i++)
                host1x_hw_syncpt_restore(host, sp_base + i);
 void host1x_syncpt_save(struct host1x *host)
 {
        struct host1x_syncpt *sp_base = host->syncpt;
-       u32 i;
+       unsigned int i;
 
        for (i = 0; i < host1x_syncpt_nb_pts(host); i++) {
                if (host1x_syncpt_client_managed(sp_base + i))
 {
        struct host1x_syncpt_base *bases;
        struct host1x_syncpt *syncpt;
-       int i;
+       unsigned int i;
 
        syncpt = devm_kzalloc(host->dev, sizeof(*syncpt) * host->info->nb_pts,
                              GFP_KERNEL);
 
 void host1x_syncpt_deinit(struct host1x *host)
 {
-       int i;
        struct host1x_syncpt *sp = host->syncpt;
+       unsigned int i;
+
        for (i = 0; i < host->info->nb_pts; i++, sp++)
                kfree(sp->name);
 }
 }
 EXPORT_SYMBOL(host1x_syncpt_read);
 
-int host1x_syncpt_nb_pts(struct host1x *host)
+unsigned int host1x_syncpt_nb_pts(struct host1x *host)
 {
        return host->info->nb_pts;
 }
 
-int host1x_syncpt_nb_bases(struct host1x *host)
+unsigned int host1x_syncpt_nb_bases(struct host1x *host)
 {
        return host->info->nb_bases;
 }
 
-int host1x_syncpt_nb_mlocks(struct host1x *host)
+unsigned int host1x_syncpt_nb_mlocks(struct host1x *host)
 {
        return host->info->nb_mlocks;
 }
 
 void host1x_syncpt_deinit(struct host1x *host);
 
 /* Return number of sync point supported. */
-int host1x_syncpt_nb_pts(struct host1x *host);
+unsigned int host1x_syncpt_nb_pts(struct host1x *host);
 
 /* Return number of wait bases supported. */
-int host1x_syncpt_nb_bases(struct host1x *host);
+unsigned int host1x_syncpt_nb_bases(struct host1x *host);
 
 /* Return number of mlocks supported. */
-int host1x_syncpt_nb_mlocks(struct host1x *host);
+unsigned int host1x_syncpt_nb_mlocks(struct host1x *host);
 
 /*
  * Check sync point sanity. If max is larger than min, there have too many