diff options
author | Stefan Wahren <stefan.wahren@i2se.com> | 2018-04-28 17:47:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-06 19:04:43 -0700 |
commit | b0ae3f55758ff661b239a1240a30e49584c87ac4 (patch) | |
tree | d39da6ba02d660610b083c9664099b916109f0f9 /drivers/staging/vc04_services | |
parent | staging: vchiq_arm: Rework second abort criterion (diff) | |
download | linux-dev-b0ae3f55758ff661b239a1240a30e49584c87ac4.tar.xz linux-dev-b0ae3f55758ff661b239a1240a30e49584c87ac4.zip |
staging: vchiq_arm: Make index variable more self-explaining
The chance to mixup i and j is very high. So rename variable j to a more
explaining one.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services')
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 01fcd15af8a1..2b0d7648c6cb 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -3426,7 +3426,7 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state) { VCHIQ_ARM_STATE_T *arm_state = vchiq_platform_get_arm_state(state); struct service_data_struct *service_data; - int i, j = 0; + int i, found = 0; /* If there's more than 64 services, only dump ones with * non-zero counts */ int only_nonzero = 0; @@ -3467,11 +3467,11 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state) if (service_ptr->srvstate == VCHIQ_SRVSTATE_FREE) continue; - service_data[j].fourcc = service_ptr->base.fourcc; - service_data[j].clientid = service_ptr->client_id; - service_data[j].use_count = service_ptr->service_use_count; - j++; - if (j >= MAX_SERVICES) + service_data[found].fourcc = service_ptr->base.fourcc; + service_data[found].clientid = service_ptr->client_id; + service_data[found].use_count = service_ptr->service_use_count; + found++; + if (found >= MAX_SERVICES) break; } @@ -3487,9 +3487,9 @@ vchiq_dump_service_use_state(VCHIQ_STATE_T *state) if (only_nonzero) vchiq_log_warning(vchiq_susp_log_level, "Too many active " "services (%d). Only dumping up to first %d services " - "with non-zero use-count", active_services, j); + "with non-zero use-count", active_services, found); - for (i = 0; i < j; i++) { + for (i = 0; i < found; i++) { vchiq_log_warning(vchiq_susp_log_level, "----- %c%c%c%c:%d service count %d %s", VCHIQ_FOURCC_AS_4CHARS(service_data[i].fourcc), |