qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, marcel@redhat.com, armbru@redhat.com,
	dmitry@daynix.com, jasowang@redhat.com, kraxel@redhat.com,
	alex.williamson@redhat.com, pbonzini@redhat.com, rth@twiddle.net,
	ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH v7 0/9]  Convert to realize and cleanup
Date: Mon, 3 Jul 2017 20:41:52 +0300	[thread overview]
Message-ID: <20170703204129-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <cover.1498542538.git.maozy.fnst@cn.fujitsu.com>

On Tue, Jun 27, 2017 at 02:16:46PM +0800, Mao Zhongyi wrote:
> This series mainly implements the conversions of pci-bridge devices
> i82801b11, io3130_upstream/downstream and so on to realize(). Naturally
> part of error messages need to be converted to Error, then propagate
> to its callers via the argument errp, bonus clean related minor flaw
> up. In short, the former patches are prerequisites for latter ones.


Applied, thanks!

Please remember to Cc maintainers on all patches, this was
missing on patch 3.

> v7:
> * patch7: -drop the !local_err assert is really not appropriate,
>            now revert it.    [Marcel Apfelbaum] 
> 
> v6:
> * patch3: -rename the subject.
> * patch6: -simplify the commit message.
>           -use error_append_hint replace original error_setg rather
>            than remove it directly. [Marcel Apfelbaum]
>           -report the error message from local_err. [Marcel Apfelbaum]
> v5:
> * patch5: replace pci_add_capability2() with pci_add_capability(), because
>           it's confusing to have a function named pci_add_capability2() if
>           pci_add_capability() doesn't exist anymore. [Eduardo Habkost]
> * patch8: a new patch that fix the return type of verify_irqchip_kernel().
> * patch9: a new patch that use the errp directly instead of the local_err to
>           propagate the error messages.
> 
> v4:
> * patch4: changed from patch 5 in v3. use a elegant way to check
>           the error, like
> 
>           function(...);
>           if (function succeeded) {
>              /* non-error code path here */
>              foo = bar;
>           }
> 
>           or
> 
>           function(...);
>           if (function succeeded) {
>               /* non-error code path here */
>               foo = bar;
>           } else {
>               /* error path here */
>               return ret;
>           }
> 
>           for readability, instead of this:
> 
>           function(...)
>           if (function failed) {
>               return ...;  /* or: "goto out" */
>           }
> 
>           /* non-error code path here */
>           foo = bar;             [Eduardo Habkost]
> 
>           meanwhile, split previous patch4 out. [Michael S. Tsirkin]
> * patch5: a new patch that replace pci_add_capability() with
>           pci_add_capability2(). [Eduardo Habkost]
> 
> v3:
> * patch2: explain the specified means of the return value, also
>           improve the commit message. [Marcel Apfelbaum]
> * patch3: simplify the subject and commit message, fix another
>           wrong assert. [Marcel Apfelbaum]
> * patch4: adjust the subject.
> * patch5: fix a wrong optimization for errp. [Eduardo Habkost]
> * patch7: a new patch that converts shpc_init() to Error in order
>           to propagate the error better.                                       
> v2:
> * patch1: subject and commit message was rewrited by markus.
> * patch2: comment was added to pci_add_capability2().
> * patch3: a new patch that fix the wrong return value judgment condition.
> * patch4: a new patch that fix code style problems.
> * patch5: add an errp argument for pci_add_capability to pass
>           error for its callers.
> * patch6: convert part of pci-bridge device to realize.
> 
> v1:
> * patch1: fix unreasonable return value check
> 
> Cc: mst@redhat.com
> Cc: marcel@redhat.com
> Cc: armbru@redhat.com
> Cc: dmitry@daynix.com
> Cc: jasowang@redhat.com
> Cc: kraxel@redhat.com
> Cc: alex.williamson@redhat.com
> Cc: pbonzini@redhat.com
> Cc: rth@twiddle.net
> Cc: ehabkost@redhat.com
> 
> Mao Zhongyi (9):
>   pci: Clean up error checking in pci_add_capability()
>   pci: Add comment for pci_add_capability2()
>   pci: Fix the wrong assertion.
>   pci: Make errp the last parameter of pci_add_capability()
>   pci: Replace pci_add_capability2() with pci_add_capability()
>   pci: Convert to realize
>   pci: Convert shpc_init() to Error
>   i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel()
>   i386/kvm/pci-assign: Use errp directly rather than local_err
> 
>  hw/i386/amd_iommu.c                | 24 ++++++++++++-----
>  hw/i386/kvm/pci-assign.c           | 54 ++++++++++++++------------------------
>  hw/ide/ich.c                       |  2 +-
>  hw/net/e1000e.c                    | 30 ++++++++++++---------
>  hw/net/eepro100.c                  | 18 ++++++++++---
>  hw/pci-bridge/i82801b11.c          | 12 ++++-----
>  hw/pci-bridge/pci_bridge_dev.c     | 14 +++++-----
>  hw/pci-bridge/pcie_root_port.c     | 18 ++++++-------
>  hw/pci-bridge/xio3130_downstream.c | 20 +++++++-------
>  hw/pci-bridge/xio3130_upstream.c   | 20 +++++++-------
>  hw/pci/msi.c                       |  2 +-
>  hw/pci/msix.c                      |  2 +-
>  hw/pci/pci.c                       | 24 +++--------------
>  hw/pci/pci_bridge.c                |  8 ++++--
>  hw/pci/pcie.c                      | 28 +++++++++++++++-----
>  hw/pci/shpc.c                      | 10 ++++---
>  hw/pci/slotid_cap.c                | 12 ++++++---
>  hw/usb/hcd-xhci.c                  |  2 +-
>  hw/vfio/pci.c                      | 15 ++++++-----
>  hw/virtio/virtio-pci.c             | 12 ++++++---
>  include/hw/pci/pci.h               |  2 --
>  include/hw/pci/pci_bridge.h        |  3 ++-
>  include/hw/pci/pcie.h              |  3 ++-
>  include/hw/pci/shpc.h              |  3 ++-
>  include/hw/pci/slotid_cap.h        |  3 ++-
>  25 files changed, 183 insertions(+), 158 deletions(-)
> 
> -- 
> 2.9.4
> 
> 

  parent reply	other threads:[~2017-07-03 17:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27  6:16 [Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 1/9] pci: Clean up error checking in pci_add_capability() Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 2/9] pci: Add comment for pci_add_capability2() Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 3/9] pci: Fix the wrong assertion Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 4/9] pci: Make errp the last parameter of pci_add_capability() Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 5/9] pci: Replace pci_add_capability2() with pci_add_capability() Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 6/9] pci: Convert to realize Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 7/9] pci: Convert shpc_init() to Error Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 8/9] i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel() Mao Zhongyi
2017-06-27  6:16 ` [Qemu-devel] [PATCH v7 9/9] i386/kvm/pci-assign: Use errp directly rather than local_err Mao Zhongyi
2017-07-03 17:41 ` Michael S. Tsirkin [this message]
2017-07-04  1:58   ` [Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup Mao Zhongyi

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=20170703204129-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=ehabkost@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=maozy.fnst@cn.fujitsu.com \
    --cc=marcel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).