gpu: host1x: Cleanup loop variable usage
Use unsigned int where possible and don't unnecessarily initialize the loop variable. Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
Родитель
bf3d41ccab
Коммит
d4ad3ad9b8
|
@ -103,7 +103,7 @@ static void show_syncpts(struct host1x *m, struct output *o)
|
||||||
|
|
||||||
static void show_all(struct host1x *m, struct output *o, bool show_fifo)
|
static void show_all(struct host1x *m, struct output *o, bool show_fifo)
|
||||||
{
|
{
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
host1x_hw_show_mlocks(m, o);
|
host1x_hw_show_mlocks(m, o);
|
||||||
show_syncpts(m, o);
|
show_syncpts(m, o);
|
||||||
|
|
|
@ -144,7 +144,7 @@ static const action_handler action_handlers[HOST1X_INTR_ACTION_COUNT] = {
|
||||||
static void run_handlers(struct list_head completed[HOST1X_INTR_ACTION_COUNT])
|
static void run_handlers(struct list_head completed[HOST1X_INTR_ACTION_COUNT])
|
||||||
{
|
{
|
||||||
struct list_head *head = completed;
|
struct list_head *head = completed;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
for (i = 0; i < HOST1X_INTR_ACTION_COUNT; ++i, ++head) {
|
for (i = 0; i < HOST1X_INTR_ACTION_COUNT; ++i, ++head) {
|
||||||
action_handler handler = action_handlers[i];
|
action_handler handler = action_handlers[i];
|
||||||
|
|
|
@ -196,10 +196,10 @@ unpin:
|
||||||
|
|
||||||
static int do_relocs(struct host1x_job *job, struct host1x_job_gather *g)
|
static int do_relocs(struct host1x_job *job, struct host1x_job_gather *g)
|
||||||
{
|
{
|
||||||
int i = 0;
|
|
||||||
u32 last_page = ~0;
|
u32 last_page = ~0;
|
||||||
void *cmdbuf_page_addr = NULL;
|
void *cmdbuf_page_addr = NULL;
|
||||||
struct host1x_bo *cmdbuf = g->bo;
|
struct host1x_bo *cmdbuf = g->bo;
|
||||||
|
unsigned int i;
|
||||||
|
|
||||||
/* pin & patch the relocs for one gather */
|
/* pin & patch the relocs for one gather */
|
||||||
for (i = 0; i < job->num_relocs; i++) {
|
for (i = 0; i < job->num_relocs; i++) {
|
||||||
|
@ -451,7 +451,7 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
|
||||||
struct host1x_firewall fw;
|
struct host1x_firewall fw;
|
||||||
size_t size = 0;
|
size_t size = 0;
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
int i;
|
unsigned int i;
|
||||||
|
|
||||||
fw.job = job;
|
fw.job = job;
|
||||||
fw.dev = dev;
|
fw.dev = dev;
|
||||||
|
|
|
@ -57,8 +57,8 @@ static struct host1x_syncpt *host1x_syncpt_alloc(struct host1x *host,
|
||||||
struct host1x_client *client,
|
struct host1x_client *client,
|
||||||
unsigned long flags)
|
unsigned long flags)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
struct host1x_syncpt *sp = host->syncpt;
|
struct host1x_syncpt *sp = host->syncpt;
|
||||||
|
unsigned int i;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
mutex_lock(&host->syncpt_mutex);
|
mutex_lock(&host->syncpt_mutex);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче