[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/29] error: Add error_vprepend() in comment of ERRP_GUARD()
From: |
Zhao Liu |
Subject: |
[PATCH v2 01/29] error: Add error_vprepend() in comment of ERRP_GUARD() rules |
Date: |
Mon, 11 Mar 2024 11:37:54 +0800 |
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>
---
v2: Add a comma after error_vprepend(). (Markus)
---
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 f21a231bb1a6..71f8fb2c50ee 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.34.1
- [PATCH v2 00/29] Cleanup up to fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 01/29] error: Add error_vprepend() in comment of ERRP_GUARD() rules,
Zhao Liu <=
- [PATCH v2 02/29] backends/iommufd: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 03/29] block: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 04/29] block/copy-before-write: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 05/29] block/nbd: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 06/29] block/nvme: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 08/29] block/qcow2: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 10/29] block/snapshot: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10
- [PATCH v2 07/29] block/qcow2-bitmap: Fix missing ERRP_GUARD() for error_prepend(), Zhao Liu, 2024/03/10