diff options
author | David Ahern <dsahern@gmail.com> | 2012-10-08 13:17:32 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-08 16:15:54 -0400 |
commit | 355afe816312faf20d81fdcade29e0361d72a7b4 (patch) | |
tree | 41518a3a2ea932826b389e6c63a5b49ee654634b | |
parent | e4f7637f8aefa2ad5159a1cda46fedea6eaf64fc (diff) |
perf kvm: Add braces around multi-line statements
Multi-line statements should have braces. Improves readability.
Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Dong Hao <haodong@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1349716656-48165-9-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/builtin-kvm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 72a302e7807e..836c82f01371 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c | |||
@@ -369,9 +369,10 @@ static struct kvm_event *find_create_kvm_event(struct perf_kvm *kvm, | |||
369 | BUG_ON(key->key == INVALID_KEY); | 369 | BUG_ON(key->key == INVALID_KEY); |
370 | 370 | ||
371 | head = &kvm->kvm_events_cache[kvm_events_hash_fn(key->key)]; | 371 | head = &kvm->kvm_events_cache[kvm_events_hash_fn(key->key)]; |
372 | list_for_each_entry(event, head, hash_entry) | 372 | list_for_each_entry(event, head, hash_entry) { |
373 | if (event->key.key == key->key && event->key.info == key->info) | 373 | if (event->key.key == key->key && event->key.info == key->info) |
374 | return event; | 374 | return event; |
375 | } | ||
375 | 376 | ||
376 | event = kvm_alloc_init_event(key); | 377 | event = kvm_alloc_init_event(key); |
377 | if (!event) | 378 | if (!event) |
@@ -610,13 +611,15 @@ static void sort_result(struct perf_kvm *kvm) | |||
610 | int vcpu = kvm->trace_vcpu; | 611 | int vcpu = kvm->trace_vcpu; |
611 | struct kvm_event *event; | 612 | struct kvm_event *event; |
612 | 613 | ||
613 | for (i = 0; i < EVENTS_CACHE_SIZE; i++) | 614 | for (i = 0; i < EVENTS_CACHE_SIZE; i++) { |
614 | list_for_each_entry(event, &kvm->kvm_events_cache[i], hash_entry) | 615 | list_for_each_entry(event, &kvm->kvm_events_cache[i], hash_entry) { |
615 | if (event_is_valid(event, vcpu)) { | 616 | if (event_is_valid(event, vcpu)) { |
616 | update_total_count(kvm, event); | 617 | update_total_count(kvm, event); |
617 | insert_to_result(&kvm->result, event, | 618 | insert_to_result(&kvm->result, event, |
618 | kvm->compare, vcpu); | 619 | kvm->compare, vcpu); |
619 | } | 620 | } |
621 | } | ||
622 | } | ||
620 | } | 623 | } |
621 | 624 | ||
622 | /* returns left most element of result, and erase it */ | 625 | /* returns left most element of result, and erase it */ |