mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.ibm.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: linux-kernel@vger.kernel.org, Peng Fan <peng.fan@nxp.com>,
	linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Subject: Re: [PATCH] KVM: PPC: use assign_bit() where applicable
Date: Mon, 21 Sep 2026 14:39:34 +0530	[thread overview]
Message-ID: <aed4e6a7-1678-4e27-9091-d621d3fe1535@linux.ibm.com> (raw)
In-Reply-To: <20260920022618.3145649-1-peng.fan@oss.nxp.com>

Hi Peng.

On 9/20/26 7:56 AM, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Convert open-coded if/else with set_bit/clear_bit to the assign_bit API.
> 

Reviewed-by: Shrikanth Hegde <sshegde@linux.ibm.com>

> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>   arch/powerpc/kvm/powerpc.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 9194cf492d1c..a567b63a5f1f 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -2210,10 +2210,7 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>   			break;
>   		if (!kvmppc_book3s_hcall_implemented(kvm, hcall))
>   			break;
> -		if (cap->args[1])
> -			set_bit(hcall / 4, kvm->arch.enabled_hcalls);
> -		else
> -			clear_bit(hcall / 4, kvm->arch.enabled_hcalls);
> +		assign_bit(hcall / 4, kvm->arch.enabled_hcalls, cap->args[1]);
>   		r = 0;
>   		break;
>   	}


Just ensure you have covered all such possible open coding where applicable
in arch/powerpc/.

  reply	other threads:[~2026-09-21  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20  2:26 Peng Fan (OSS)
2026-09-21  9:09 ` Shrikanth Hegde [this message]
2026-09-21 12:37   ` Peng Fan
2026-09-21 11:59 ` Gautam Menghani

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=aed4e6a7-1678-4e27-9091-d621d3fe1535@linux.ibm.com \
    --to=sshegde@linux.ibm.com \
    --cc=chleroy@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=ritesh.list@gmail.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

all inboxes | Powered by JetHome®