Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: host1x: Use not explicitly sized types

The number of words and the offset in a gather don't need to be
explicitly sized, so make them unsigned int instead.

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

+10 -9
+6 -5
drivers/gpu/host1x/job.c
··· 96 96 EXPORT_SYMBOL(host1x_job_put); 97 97 98 98 void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo, 99 - u32 words, u32 offset) 99 + unsigned int words, unsigned int offset) 100 100 { 101 - struct host1x_job_gather *cur_gather = &job->gathers[job->num_gathers]; 101 + struct host1x_job_gather *gather = &job->gathers[job->num_gathers]; 102 102 103 - cur_gather->words = words; 104 - cur_gather->bo = bo; 105 - cur_gather->offset = offset; 103 + gather->words = words; 104 + gather->bo = bo; 105 + gather->offset = offset; 106 + 106 107 job->num_gathers++; 107 108 } 108 109 EXPORT_SYMBOL(host1x_job_add_gather);
+2 -2
drivers/gpu/host1x/job.h
··· 20 20 #define __HOST1X_JOB_H 21 21 22 22 struct host1x_job_gather { 23 - u32 words; 23 + unsigned int words; 24 24 dma_addr_t base; 25 25 struct host1x_bo *bo; 26 - u32 offset; 26 + unsigned int offset; 27 27 bool handled; 28 28 }; 29 29
+2 -2
include/linux/host1x.h
··· 251 251 252 252 struct host1x_job *host1x_job_alloc(struct host1x_channel *ch, 253 253 u32 num_cmdbufs, u32 num_relocs); 254 - void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *mem_id, 255 - u32 words, u32 offset); 254 + void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo, 255 + unsigned int words, unsigned int offset); 256 256 struct host1x_job *host1x_job_get(struct host1x_job *job); 257 257 void host1x_job_put(struct host1x_job *job); 258 258 int host1x_job_pin(struct host1x_job *job, struct device *dev);