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

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>

authored by

Seongsu Park and committed by
Marc Zyngier
d2f14174 9c32cda4

+3 -3
+3 -3
arch/arm64/kvm/trace_arm.h
··· 176 176 ), 177 177 178 178 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)) 180 180 ); 181 181 182 182 TRACE_EVENT(kvm_toggle_cache, ··· 196 196 ), 197 197 198 198 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)) 201 201 ); 202 202 203 203 /*