[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 07/55] error: Add error_vprepend() in comment of ERRP_GUARD() rule
From: |
Thomas Huth |
Subject: |
[PULL 07/55] error: Add error_vprepend() in comment of ERRP_GUARD() rules |
Date: |
Tue, 12 Mar 2024 13:42:51 +0100 |
From: Zhao Liu <zhao1.liu@intel.com>
The error_vprepend() should use ERRP_GUARD() just as the documentation
of ERRP_GUARD() says:
> It must be used when the function dereferences @errp or passes
> @errp to error_prepend(), error_vprepend(), or error_append_hint().
Considering that error_vprepend() is also an API provided in error.h,
it is necessary to add it to the description of the rules for using
ERRP_GUARD().
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Michael Roth <michael.roth@amd.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240311033822.3142585-2-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
include/qapi/error.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qapi/error.h b/include/qapi/error.h
index f21a231bb1..71f8fb2c50 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -207,7 +207,7 @@
*
* Without ERRP_GUARD(), use of the @errp parameter is restricted:
* - It must not be dereferenced, because it may be null.
- * - It should not be passed to error_prepend() or
+ * - It should not be passed to error_prepend(), error_vprepend(), or
* error_append_hint(), because that doesn't work with &error_fatal.
* ERRP_GUARD() lifts these restrictions.
*
--
2.44.0
- [PULL 00/55] Misc ERRP_GUARD() and cpu_env() patches, Thomas Huth, 2024/03/12
- [PULL 01/55] hw/cxl/cxl-host: Fix missing ERRP_GUARD() in cxl_fixed_memory_window_config(), Thomas Huth, 2024/03/12
- [PULL 06/55] hw/intc: Check @errp to handle the error of IOAPICCommonClass.realize(), Thomas Huth, 2024/03/12
- [PULL 03/55] hw/mem/cxl_type3: Fix missing ERRP_GUARD() in ct3_realize(), Thomas Huth, 2024/03/12
- [PULL 04/55] hw/misc/xlnx-versal-trng: Check returned bool in trng_prop_fault_event_set(), Thomas Huth, 2024/03/12
- [PULL 07/55] error: Add error_vprepend() in comment of ERRP_GUARD() rules,
Thomas Huth <=
- [PULL 08/55] backends/iommufd: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 05/55] hw/pci-bridge/cxl_upstream: Fix missing ERRP_GUARD() in cxl_usp_realize(), Thomas Huth, 2024/03/12
- [PULL 09/55] block: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 11/55] block/nbd: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 12/55] block/nvme: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 02/55] hw/display/macfb: Fix missing ERRP_GUARD() in macfb_nubus_realize(), Thomas Huth, 2024/03/12
- [PULL 10/55] block/copy-before-write: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 14/55] block/qcow2: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 15/55] block/qed: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12
- [PULL 17/55] block/vdi: Fix missing ERRP_GUARD() for error_prepend(), Thomas Huth, 2024/03/12