From: Cornelia Huck <cohuck@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Xu <peterx@redhat.com>, Halil Pasic <pasic@linux.ibm.com>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PATCH 3/3] vfio-ccw: switch to warn_report_once_cond()
Date: Tue, 28 Aug 2018 14:33:46 +0200 [thread overview]
Message-ID: <20180828123346.17548-4-cohuck@redhat.com> (raw)
In-Reply-To: <20180828123346.17548-1-cohuck@redhat.com>
We can replace the local function with the new common interface.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/vfio/ccw.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index e96bbdc78b..9246729a75 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -37,24 +37,12 @@ typedef struct VFIOCCWDevice {
bool warned_orb_pfch;
} VFIOCCWDevice;
-static inline void warn_once(bool *warned, const char *fmt, ...)
-{
- va_list ap;
-
- if (!warned || *warned) {
- return;
- }
- *warned = true;
- va_start(ap, fmt);
- warn_vreport(fmt, ap);
- va_end(ap);
-}
-
static inline void warn_once_pfch(VFIOCCWDevice *vcdev, SubchDev *sch,
const char *msg)
{
- warn_once(&vcdev->warned_orb_pfch, "vfio-ccw (devno %x.%x.%04x): %s",
- sch->cssid, sch->ssid, sch->devno, msg);
+ warn_report_once_cond(&vcdev->warned_orb_pfch,
+ "vfio-ccw (devno %x.%x.%04x): %s",
+ sch->cssid, sch->ssid, sch->devno, msg);
}
static void vfio_ccw_compute_needs_reset(VFIODevice *vdev)
--
2.14.4
next prev parent reply other threads:[~2018-08-28 12:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 12:33 [Qemu-devel] [PATCH 0/3] qemu-error: advanced report_once handling Cornelia Huck
2018-08-28 12:33 ` [Qemu-devel] [PATCH 1/3] qemu-error: add {error, warn}_report_once_cond Cornelia Huck
2018-08-29 16:07 ` Markus Armbruster
2018-08-29 16:17 ` Cornelia Huck
2018-08-28 12:33 ` [Qemu-devel] [PATCH 2/3] qemu-error: make use of " Cornelia Huck
2018-08-29 16:12 ` Markus Armbruster
2018-08-29 16:23 ` Cornelia Huck
2018-08-28 12:33 ` Cornelia Huck [this message]
2018-08-29 18:56 ` [Qemu-devel] [PATCH 0/3] qemu-error: advanced report_once handling Markus Armbruster
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=20180828123346.17548-4-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=armbru@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.