From: Oliver Upton <oupton@kernel•org>
To: Jackie Liu <liu.yun@linux•dev>
Cc: maz@kernel•org, linux-arm-kernel@lists•infradead.org,
yuzenghui@huawei•com, will@kernel•org, kvmarm@lists•linux.dev
Subject: Re: [PATCH v2] KVM/arm64: vgic-its: Make ABI commit helpers return void
Date: Thu, 4 Jun 2026 23:01:52 -0700 [thread overview]
Message-ID: <aiJmUCvsSt6k4bvd@kernel.org> (raw)
In-Reply-To: <20260604075147.53299-1-liu.yun@linux.dev>
On Thu, Jun 04, 2026 at 03:51:47PM +0800, Jackie Liu wrote:
> From: Jackie Liu <liuyun01@kylinos•cn>
>
> The return values of vgic_its_set_abi() and vgic_its_commit_v0() are always
> 0 and do not carry useful error information. Simplify by changing them to
> void.
>
> Suggested-by: Oliver Upton <oupton@kernel•org>
> Signed-off-by: Jackie Liu <liuyun01@kylinos•cn>
Reviewed-by: Oliver Upton <oupton@kernel•org>
Thanks,
Oliver
> ---
> arch/arm64/kvm/vgic/vgic-its.c | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm64/kvm/vgic/vgic-its.c b/arch/arm64/kvm/vgic/vgic-its.c
> index 1d7e5d560af4..ca48b34dec20 100644
> --- a/arch/arm64/kvm/vgic/vgic-its.c
> +++ b/arch/arm64/kvm/vgic/vgic-its.c
> @@ -27,7 +27,7 @@ static struct kvm_device_ops kvm_arm_vgic_its_ops;
>
> static int vgic_its_save_tables_v0(struct vgic_its *its);
> static int vgic_its_restore_tables_v0(struct vgic_its *its);
> -static int vgic_its_commit_v0(struct vgic_its *its);
> +static void vgic_its_commit_v0(struct vgic_its *its);
> static int update_lpi_config(struct kvm *kvm, struct vgic_irq *irq,
> struct kvm_vcpu *filter_vcpu, bool needs_inv);
>
> @@ -168,7 +168,7 @@ struct vgic_its_abi {
> int ite_esz;
> int (*save_tables)(struct vgic_its *its);
> int (*restore_tables)(struct vgic_its *its);
> - int (*commit)(struct vgic_its *its);
> + void (*commit)(struct vgic_its *its);
> };
>
> #define ABI_0_ESZ 8
> @@ -192,13 +192,13 @@ inline const struct vgic_its_abi *vgic_its_get_abi(struct vgic_its *its)
> return &its_table_abi_versions[its->abi_rev];
> }
>
> -static int vgic_its_set_abi(struct vgic_its *its, u32 rev)
> +static void vgic_its_set_abi(struct vgic_its *its, u32 rev)
> {
> const struct vgic_its_abi *abi;
>
> its->abi_rev = rev;
> abi = vgic_its_get_abi(its);
> - return abi->commit(its);
> + abi->commit(its);
> }
>
> /*
> @@ -472,7 +472,8 @@ static int vgic_mmio_uaccess_write_its_iidr(struct kvm *kvm,
>
> if (rev >= NR_ITS_ABIS)
> return -EINVAL;
> - return vgic_its_set_abi(its, rev);
> + vgic_its_set_abi(its, rev);
> + return 0;
> }
>
> static unsigned long vgic_mmio_read_its_idregs(struct kvm *kvm,
> @@ -1888,14 +1889,11 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
> its->baser_coll_table = INITIAL_BASER_VALUE |
> ((u64)GITS_BASER_TYPE_COLLECTION << GITS_BASER_TYPE_SHIFT);
> dev->kvm->arch.vgic.propbaser = INITIAL_PROPBASER_VALUE;
> -
> dev->private = its;
>
> - ret = vgic_its_set_abi(its, NR_ITS_ABIS - 1);
> -
> + vgic_its_set_abi(its, NR_ITS_ABIS - 1);
> mutex_unlock(&dev->kvm->arch.config_lock);
> -
> - return ret;
> + return 0;
> }
>
> static void vgic_its_destroy(struct kvm_device *kvm_dev)
> @@ -2610,7 +2608,7 @@ static int vgic_its_restore_tables_v0(struct vgic_its *its)
> return ret;
> }
>
> -static int vgic_its_commit_v0(struct vgic_its *its)
> +static void vgic_its_commit_v0(struct vgic_its *its)
> {
> const struct vgic_its_abi *abi;
>
> @@ -2623,7 +2621,6 @@ static int vgic_its_commit_v0(struct vgic_its *its)
>
> its->baser_device_table |= (GIC_ENCODE_SZ(abi->dte_esz, 5)
> << GITS_BASER_ENTRY_SIZE_SHIFT);
> - return 0;
> }
>
> static void vgic_its_reset(struct kvm *kvm, struct vgic_its *its)
> --
> 2.54.0
>
>
prev parent reply other threads:[~2026-06-05 6:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 7:51 [PATCH v2] KVM/arm64: vgic-its: Make ABI commit helpers return void Jackie Liu
2026-06-04 8:27 ` Eric Auger
2026-06-05 6:01 ` Oliver Upton [this message]
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=aiJmUCvsSt6k4bvd@kernel.org \
--to=oupton@kernel$(echo .)org \
--cc=kvmarm@lists$(echo .)linux.dev \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=liu.yun@linux$(echo .)dev \
--cc=maz@kernel$(echo .)org \
--cc=will@kernel$(echo .)org \
--cc=yuzenghui@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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