From: Anthony Krowiak <akrowiak@linux.ibm.com>
To: "Cédric Le Goater" <clg@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Thomas Huth <thuth@redhat.com>,
Zhenzhong Duan <zhenzhong.duan@intel.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Eric Farman <farman@linux.ibm.com>
Subject: Re: [PATCH 5/7] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize()
Date: Fri, 24 May 2024 09:14:48 -0400 [thread overview]
Message-ID: <4cbe27d0-ee4c-4a8f-8a3e-76578f90c651@linux.ibm.com> (raw)
In-Reply-To: <20240522170107.289532-6-clg@redhat.com>
On 5/22/24 1:01 PM, Cédric Le Goater wrote:
> The local error variable is kept for vfio_ccw_register_irq_notifier()
> because it is not considered as a failing condition. We will change
> how error reporting is done in following changes.
>
> Remove the error_propagate() call.
>
> Cc: Zhenzhong Duan <zhenzhong.duan@intel.com>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com>
> ---
> hw/vfio/ccw.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index 9a8e052711fe2f7c067c52808b2af30d0ebfee0c..a468fa2342b97e0ee36bd5fb8443025cc90a0453 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -582,8 +582,8 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
>
> /* Call the class init function for subchannel. */
> if (cdc->realize) {
> - if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, &err)) {
> - goto out_err_propagate;
> + if (!cdc->realize(cdev, vcdev->vdev.sysfsdev, errp)) {
> + return;
> }
> }
>
> @@ -596,17 +596,17 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
> goto out_attach_dev_err;
> }
>
> - if (!vfio_ccw_get_region(vcdev, &err)) {
> + if (!vfio_ccw_get_region(vcdev, errp)) {
> goto out_region_err;
> }
>
> - if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, &err)) {
> + if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX, errp)) {
> goto out_io_notifier_err;
> }
>
> if (vcdev->crw_region) {
> if (!vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX,
> - &err)) {
> + errp)) {
> goto out_irq_notifier_err;
> }
> }
> @@ -634,8 +634,6 @@ out_attach_dev_err:
> if (cdc->unrealize) {
> cdc->unrealize(cdev);
> }
> -out_err_propagate:
> - error_propagate(errp, err);
> }
>
> static void vfio_ccw_unrealize(DeviceState *dev)
next prev parent reply other threads:[~2024-05-24 13:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 17:01 [PATCH 0/7] s390x/ccw: Error reporting cleanups Cédric Le Goater
2024-05-22 17:01 ` [PATCH 1/7] hw/s390x/ccw: Make s390_ccw_get_dev_info() return a bool Cédric Le Goater
2024-05-23 8:43 ` Duan, Zhenzhong
2024-05-24 13:13 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 2/7] s390x/css: Make CCWDeviceClass::realize return bool Cédric Le Goater
2024-05-23 8:43 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 3/7] hw/s390x/ccw: Remove local Error variable from s390_ccw_realize() Cédric Le Goater
2024-05-23 8:44 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 4/7] s390x/css: Make S390CCWDeviceClass::realize return bool Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-22 17:01 ` [PATCH 5/7] vfio/ccw: Use the 'Error **errp' argument of vfio_ccw_realize() Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak [this message]
2024-05-22 17:01 ` [PATCH 6/7] vfio/ccw: Fix the missed unrealize() call in error path Cédric Le Goater
2024-05-23 8:52 ` Cédric Le Goater
2024-05-22 17:01 ` [PATCH 7/7] vfio/{ap, ccw}: Use warn_report_err() for IRQ notifier registration errors Cédric Le Goater
2024-05-23 8:45 ` Duan, Zhenzhong
2024-05-24 13:14 ` Anthony Krowiak
2024-05-23 20:27 ` [PATCH 0/7] s390x/ccw: Error reporting cleanups Eric Farman
2024-05-27 6:23 ` Thomas Huth
2024-05-27 6:43 ` Cédric Le Goater
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=4cbe27d0-ee4c-4a8f-8a3e-76578f90c651@linux.ibm.com \
--to=akrowiak@linux.ibm.com \
--cc=clg@redhat.com \
--cc=farman@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
--cc=zhenzhong.duan@intel.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;
as well as URLs for NNTP newsgroup(s).