From: Zhao Liu <zhao1....@intel.com>

Hi,

This series is the v2 to add missing ERRP_GUARD() for error_prepend(),
which collects the previous v1 part 1 [1] and v1 part 2 (and excludes
the 4 patches that have already been merged).

The @errp's second restriction (in qapi/error) said:

* Without ERRP_GUARD(), use of the @errp parameter is restricted:
...
* - It should not be passed to error_prepend() or
*   error_append_hint(), because that doesn't work with &error_fatal.
* ERRP_GUARD() lifts these restrictions.

With this series, all error_prepend() will follow the above usage rules.

In this series, 2 cases of error_prepend() with &error_fatal are
recognized (patch 30 & patch 31).

And there are some remaining TODOs:
* follow-up cleanup for related @err use cases. (Suggested by Thomas)
* continue to cleanup error_append_hint().


The cleanup looks very trivial and thanks for your review!

[1]: 
https://lore.kernel.org/qemu-devel/20240228163723.1775791-1-zhao1....@linux.intel.com/
[2]: 
https://lore.kernel.org/qemu-devel/20240229143914.1977550-1-zhao1....@linux.intel.com/

Thanks and Best Regards,
Zhao

---
Zhao Liu (29):
  error: Add error_vprepend() in comment of ERRP_GUARD() rules
  backends/iommufd: Fix missing ERRP_GUARD() for error_prepend()
  block: Fix missing ERRP_GUARD() for error_prepend()
  block/copy-before-write: Fix missing ERRP_GUARD() for error_prepend()
  block/nbd: Fix missing ERRP_GUARD() for error_prepend()
  block/nvme: Fix missing ERRP_GUARD() for error_prepend()
  block/qcow2-bitmap: Fix missing ERRP_GUARD() for error_prepend()
  block/qcow2: Fix missing ERRP_GUARD() for error_prepend()
  block/qed: Fix missing ERRP_GUARD() for error_prepend()
  block/snapshot: Fix missing ERRP_GUARD() for error_prepend()
  block/vdi: Fix missing ERRP_GUARD() for error_prepend()
  block/vmdk: Fix missing ERRP_GUARD() for error_prepend()
  block/virtio-blk: Fix missing ERRP_GUARD() for error_prepend()
  hw/core/loader-fit: Fix missing ERRP_GUARD() for error_prepend()
  hw/core/qdev-properties-system: Fix missing ERRP_GUARD() for
    error_prepend()
  hw/misc/ivshmem: Fix missing ERRP_GUARD() for error_prepend()
  hw/scsi/vhost-scsi: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/ap: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/container: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/helpers: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/iommufd: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/pci-quirks: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/pci: Fix missing ERRP_GUARD() for error_prepend()
  hw/vfio/platform: Fix missing ERRP_GUARD() for error_prepend()
  hw/virtio/vhost-vsock: Fix missing ERRP_GUARD() for error_prepend()
  hw/virtio/vhost: Fix missing ERRP_GUARD() for error_prepend()
  migration/option: Fix missing ERRP_GUARD() for error_prepend()
  net/vhost-vdpa: Fix missing ERRP_GUARD() for error_prepend()
  target/s390x/cpu_models: Fix missing ERRP_GUARD() for error_prepend()

 backends/iommufd.c               | 1 +
 block.c                          | 4 ++++
 block/copy-before-write.c        | 1 +
 block/nbd.c                      | 1 +
 block/nvme.c                     | 3 +++
 block/qcow2-bitmap.c             | 1 +
 block/qcow2.c                    | 2 ++
 block/qed.c                      | 1 +
 block/snapshot.c                 | 2 ++
 block/vdi.c                      | 1 +
 block/vmdk.c                     | 1 +
 hw/block/virtio-blk.c            | 1 +
 hw/core/loader-fit.c             | 2 ++
 hw/core/qdev-properties-system.c | 1 +
 hw/misc/ivshmem.c                | 1 +
 hw/scsi/vhost-scsi.c             | 1 +
 hw/vfio/ap.c                     | 1 +
 hw/vfio/container.c              | 1 +
 hw/vfio/helpers.c                | 3 +++
 hw/vfio/iommufd.c                | 1 +
 hw/vfio/pci-quirks.c             | 2 ++
 hw/vfio/pci.c                    | 2 ++
 hw/vfio/platform.c               | 1 +
 hw/virtio/vhost-vsock.c          | 1 +
 hw/virtio/vhost.c                | 2 ++
 include/qapi/error.h             | 2 +-
 migration/options.c              | 2 ++
 net/vhost-vdpa.c                 | 1 +
 target/s390x/cpu_models.c        | 2 ++
 29 files changed, 44 insertions(+), 1 deletion(-)

-- 
2.34.1


Reply via email to