From: Amit Shah <amit.shah@redhat.com>
To: qemu list <qemu-devel@nongnu.org>
Cc: Amit Shah <amit.shah@redhat.com>, Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static
Date: Wed, 20 Jul 2011 14:15:11 +0530 [thread overview]
Message-ID: <6561b2f282c7103805fb0a347971e86fbed0687d.1311149456.git.amit.shah@redhat.com> (raw)
In-Reply-To: <cover.1311149456.git.amit.shah@redhat.com>
In-Reply-To: <cover.1311149456.git.amit.shah@redhat.com>
balloon.h had function declarations for a couple of functions that are
local to balloon.c. Make them static.
Drop the 'qemu_' prefix for balloon.c-local variables, and make them
static.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
balloon.c | 22 +++++++++++-----------
balloon.h | 4 ----
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/balloon.c b/balloon.c
index 248c1b5..f9bcf07 100644
--- a/balloon.c
+++ b/balloon.c
@@ -31,30 +31,30 @@
#include "trace.h"
-static QEMUBalloonEvent *qemu_balloon_event;
-void *qemu_balloon_event_opaque;
+static QEMUBalloonEvent *balloon_event_fn;
+static void *balloon_opaque;
void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque)
{
- qemu_balloon_event = func;
- qemu_balloon_event_opaque = opaque;
+ balloon_event_fn = func;
+ balloon_opaque = opaque;
}
-int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
+static int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque)
{
- if (qemu_balloon_event) {
- trace_balloon_event(qemu_balloon_event_opaque, target);
- qemu_balloon_event(qemu_balloon_event_opaque, target, cb, opaque);
+ if (balloon_event_fn) {
+ trace_balloon_event(balloon_opaque, target);
+ balloon_event_fn(balloon_opaque, target, cb, opaque);
return 1;
} else {
return 0;
}
}
-int qemu_balloon_status(MonitorCompletion cb, void *opaque)
+static int qemu_balloon_status(MonitorCompletion cb, void *opaque)
{
- if (qemu_balloon_event) {
- qemu_balloon_event(qemu_balloon_event_opaque, 0, cb, opaque);
+ if (balloon_event_fn) {
+ balloon_event_fn(balloon_opaque, 0, cb, opaque);
return 1;
} else {
return 0;
diff --git a/balloon.h b/balloon.h
index d478e28..06a8a46 100644
--- a/balloon.h
+++ b/balloon.h
@@ -21,10 +21,6 @@ typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target,
void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque);
-int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque);
-
-int qemu_balloon_status(MonitorCompletion cb, void *opaque);
-
void monitor_print_balloon(Monitor *mon, const QObject *data);
int do_info_balloon(Monitor *mon, MonitorCompletion cb, void *opaque);
int do_balloon(Monitor *mon, const QDict *params,
--
1.7.6
next prev parent reply other threads:[~2011-07-20 8:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-20 8:35 [Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault Amit Shah
2011-07-20 8:45 ` Amit Shah [this message]
2011-07-20 8:45 ` [Qemu-devel] [PATCH 2/7] balloon: Add braces around if statements Amit Shah
2011-07-20 8:45 ` [Qemu-devel] [PATCH 3/7] balloon: Simplify code flow Amit Shah
2011-07-20 8:45 ` [Qemu-devel] [PATCH 4/7] virtio-balloon: Separate status handling into separate function Amit Shah
2011-07-20 8:45 ` [Qemu-devel] [PATCH 5/7] balloon: Separate out stat and balloon handling Amit Shah
2011-07-22 14:45 ` Markus Armbruster
2011-07-23 3:10 ` Amit Shah
2011-07-25 14:11 ` Markus Armbruster
2011-07-20 8:45 ` [Qemu-devel] [PATCH 6/7] balloon: Fix header comment; add Copyright Amit Shah
2011-07-20 8:45 ` [Qemu-devel] [PATCH 7/7] virtio-balloon: " Amit Shah
2011-07-25 14:13 ` [Qemu-devel] [PATCH 0/7] balloon: cleanups, fix segfault Markus Armbruster
2011-07-25 15:49 ` Amit Shah
-- strict thread matches above, loose matches on Subject: below --
2011-07-26 9:08 [Qemu-devel] [PULL 0/7] virtio-balloon: cleanups, fix segfault from use-after-free Amit Shah
2011-07-26 9:08 ` [Qemu-devel] [PATCH 1/7] balloon: Make functions, local vars static Amit Shah
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=6561b2f282c7103805fb0a347971e86fbed0687d.1311149456.git.amit.shah@redhat.com \
--to=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--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).