Skip to content

Commit d2f1417

Browse files
Seongsu ParkMarc Zyngier
authored andcommitted
KVM: arm64: Replace ternary flags with str_on_off() helper
Replace repetitive ternary expressions with the str_on_off() helper function. This change improves code readability and ensures consistency in tracepoint string formatting Signed-off-by: Seongsu Park <sgsu.park@samsung.com> Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com> Link: https://lore.kernel.org/r/1891546521.01744691102904.JavaMail.epsvc@epcpadp1new Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent 9c32cda commit d2f1417

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/kvm/trace_arm.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ TRACE_EVENT(kvm_set_way_flush,
176176
),
177177

178178
TP_printk("S/W flush at 0x%016lx (cache %s)",
179-
__entry->vcpu_pc, __entry->cache ? "on" : "off")
179+
__entry->vcpu_pc, str_on_off(__entry->cache))
180180
);
181181

182182
TRACE_EVENT(kvm_toggle_cache,
@@ -196,8 +196,8 @@ TRACE_EVENT(kvm_toggle_cache,
196196
),
197197

198198
TP_printk("VM op at 0x%016lx (cache was %s, now %s)",
199-
__entry->vcpu_pc, __entry->was ? "on" : "off",
200-
__entry->now ? "on" : "off")
199+
__entry->vcpu_pc, str_on_off(__entry->was),
200+
str_on_off(__entry->now))
201201
);
202202

203203
/*

0 commit comments

Comments
 (0)