From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [PULL 03/14] error: Drop a few superfluous ERRP_GUARD()
Date: Wed, 14 Dec 2022 17:46:18 +0100 [thread overview]
Message-ID: <20221214164629.919880-4-armbru@redhat.com> (raw)
In-Reply-To: <20221214164629.919880-1-armbru@redhat.com>
include/qapi/error.h on ERRP_GUARD():
* It must be used when the function dereferences @errp or passes
* @errp to error_prepend(), error_vprepend(), or error_append_hint().
* It is safe to use even when it's not needed, but please avoid
* cluttering the source with useless code.
Clean up some of this clutter.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221121085054.683122-3-armbru@redhat.com>
---
block/copy-before-write.c | 1 -
dump/dump.c | 2 --
hw/core/qdev.c | 2 --
hw/pci/msi.c | 1 -
hw/remote/vfio-user-obj.c | 1 -
ui/util.c | 1 -
6 files changed, 8 deletions(-)
diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index 4abaa7339e..6f0157244f 100644
--- a/block/copy-before-write.c
+++ b/block/copy-before-write.c
@@ -522,7 +522,6 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
BlockCopyState **bcs,
Error **errp)
{
- ERRP_GUARD();
BDRVCopyBeforeWriteState *state;
BlockDriverState *top;
QDict *opts;
diff --git a/dump/dump.c b/dump/dump.c
index df117c847f..c9afc30ce2 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -357,7 +357,6 @@ static void write_elf32_notes(WriteCoreDumpFunction f, DumpState *s,
static void write_elf_phdr_note(DumpState *s, Error **errp)
{
- ERRP_GUARD();
Elf32_Phdr phdr32;
Elf64_Phdr phdr64;
void *phdr;
@@ -773,7 +772,6 @@ static void dump_iterate(DumpState *s, Error **errp)
static void dump_end(DumpState *s, Error **errp)
{
int rc;
- ERRP_GUARD();
if (s->elf_section_data_size) {
s->elf_section_data = g_malloc0(s->elf_section_data_size);
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 0145501904..67be2feaf3 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -493,8 +493,6 @@ void qdev_del_unplug_blocker(DeviceState *dev, Error *reason)
bool qdev_unplug_blocked(DeviceState *dev, Error **errp)
{
- ERRP_GUARD();
-
if (dev->unplug_blockers) {
error_propagate(errp, error_copy(dev->unplug_blockers->data));
return true;
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index 058d1d1ef1..1cadf150bc 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -317,7 +317,6 @@ bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
void msi_set_mask(PCIDevice *dev, int vector, bool mask, Error **errp)
{
- ERRP_GUARD();
uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
uint32_t irq_state, vector_mask, pending;
diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c
index 4e36bb8bcf..6d0310cec9 100644
--- a/hw/remote/vfio-user-obj.c
+++ b/hw/remote/vfio-user-obj.c
@@ -719,7 +719,6 @@ static void vfu_object_machine_done(Notifier *notifier, void *data)
*/
static void vfu_object_init_ctx(VfuObject *o, Error **errp)
{
- ERRP_GUARD();
DeviceState *dev = NULL;
vfu_pci_type_t pci_type = VFU_PCI_TYPE_CONVENTIONAL;
int ret;
diff --git a/ui/util.c b/ui/util.c
index 7e8fc1ea53..907d60e032 100644
--- a/ui/util.c
+++ b/ui/util.c
@@ -51,7 +51,6 @@ bool qemu_console_fill_device_address(QemuConsole *con,
size_t size,
Error **errp)
{
- ERRP_GUARD();
DeviceState *dev = DEVICE(object_property_get_link(OBJECT(con),
"device",
&error_abort));
--
2.37.3
next prev parent reply other threads:[~2022-12-14 16:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-14 16:46 [PULL 00/14] Miscellaneous patches for 2022-12-14 Markus Armbruster
2022-12-14 16:46 ` [PULL 01/14] Drop more useless casts from void * to pointer Markus Armbruster
2022-12-14 16:46 ` [PULL 02/14] error: Drop some obviously superfluous error_propagate() Markus Armbruster
2022-12-14 16:46 ` Markus Armbruster [this message]
2022-12-14 16:46 ` [PULL 04/14] error: Move ERRP_GUARD() to the beginning of the function Markus Armbruster
2022-12-14 16:46 ` [PULL 05/14] monitor: Simplify monitor_fd_param()'s error handling Markus Armbruster
2022-12-14 16:46 ` [PULL 06/14] monitor: Use ERRP_GUARD() in monitor_init() Markus Armbruster
2022-12-14 16:46 ` [PULL 07/14] qemu-config: Make config_parse_qdict() return bool Markus Armbruster
2022-12-14 16:46 ` [PULL 08/14] qemu-config: Use ERRP_GUARD() where obviously appropriate Markus Armbruster
2022-12-14 16:46 ` [PULL 09/14] sockets: " Markus Armbruster
2022-12-14 16:46 ` [PULL 10/14] qapi: Use returned bool to check for failure (again) Markus Armbruster
2022-12-14 16:46 ` [PULL 11/14] io: Tidy up fat-fingered parameter name Markus Armbruster
2022-12-14 16:46 ` [PULL 12/14] cleanup: Tweak and re-run return_directly.cocci Markus Armbruster
2022-12-14 16:46 ` [PULL 13/14] block/vmdk: Simplify vmdk_co_create() to return directly Markus Armbruster
2022-12-14 16:46 ` [PULL 14/14] ppc4xx_sdram: Simplify sdram_ddr_size() to return Markus Armbruster
2022-12-15 13:06 ` [PULL 00/14] Miscellaneous patches for 2022-12-14 Peter Maydell
2022-12-15 13:10 ` Peter Maydell
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=20221214164629.919880-4-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).