public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Seongsu Park <sgsu.park@samsung.com>,
	will@kernel.org, catalin.marinas@arm.com, yuzenghui@huawei.com,
	suzuki.poulose@arm.com, joey.gouly@arm.com,
	oliver.upton@linux.dev, maz@kernel.org
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, cpgs@samsung.com
Subject: Re: [PATCH] arm64: kvm: Replace ternary flags with str_on_off() helper
Date: Tue, 15 Apr 2025 12:06:31 +0530	[thread overview]
Message-ID: <f998cbba-bda0-472b-8f4a-a972a29f21ef@arm.com> (raw)
In-Reply-To: <1891546521.01744691102904.JavaMail.epsvc@epcpadp1new>



On 4/15/25 06:54, Seongsu Park wrote:
> 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>
> ---
>  arch/arm64/kvm/trace_arm.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/kvm/trace_arm.h b/arch/arm64/kvm/trace_arm.h
> index c18c1a95831e..9c60f6465c78 100644
> --- a/arch/arm64/kvm/trace_arm.h
> +++ b/arch/arm64/kvm/trace_arm.h
> @@ -176,7 +176,7 @@ TRACE_EVENT(kvm_set_way_flush,
>  	    ),
>  
>  	    TP_printk("S/W flush at 0x%016lx (cache %s)",
> -		      __entry->vcpu_pc, __entry->cache ? "on" : "off")
> +		      __entry->vcpu_pc, str_on_off(__entry->cache))
>  );
>  
>  TRACE_EVENT(kvm_toggle_cache,
> @@ -196,8 +196,8 @@ TRACE_EVENT(kvm_toggle_cache,
>  	    ),
>  
>  	    TP_printk("VM op at 0x%016lx (cache was %s, now %s)",
> -		      __entry->vcpu_pc, __entry->was ? "on" : "off",
> -		      __entry->now ? "on" : "off")
> +		      __entry->vcpu_pc, str_on_off(__entry->was),
> +		      str_on_off(__entry->now))
>  );
>  
>  /*

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>

  reply	other threads:[~2025-04-15  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250415012410epcas1p42b48977934c21b5db0b19f4185f7a63c@epcas1p4.samsung.com>
2025-04-15  1:24 ` [PATCH] arm64: kvm: Replace ternary flags with str_on_off() helper Seongsu Park
2025-04-15  6:36   ` Anshuman Khandual [this message]
2025-04-28  7:11     ` Seongsu Park
2025-04-28 10:04       ` Marc Zyngier
2025-05-06  3:34   ` Zenghui Yu
2025-05-06  8:39   ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f998cbba-bda0-472b-8f4a-a972a29f21ef@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=cpgs@samsung.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=sgsu.park@samsung.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox