From: Nicholas Piggin <npiggin@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org
Subject: [PATCH 2/2] chardev: Remove __-prefixed names
Date: Wed, 28 Aug 2024 14:33:35 +1000 [thread overview]
Message-ID: <20240828043337.14587-3-npiggin@gmail.com> (raw)
In-Reply-To: <20240828043337.14587-1-npiggin@gmail.com>
Peter points out double underscore prefix names tend to be reserved
for the system. Clean these up.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
chardev/char.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/chardev/char.c b/chardev/char.c
index 47a744ebeb..46d4798e4e 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -628,8 +628,8 @@ static void qemu_chardev_set_replay(Chardev *chr, Error **errp)
}
}
-static Chardev *__qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
- bool replay, Error **errp)
+static Chardev *do_qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
+ bool replay, Error **errp)
{
const ChardevClass *cc;
Chardev *base = NULL, *chr = NULL;
@@ -707,12 +707,12 @@ Chardev *qemu_chr_new_from_opts(QemuOpts *opts, GMainContext *context,
Error **errp)
{
/* XXX: should this really not record/replay? */
- return __qemu_chr_new_from_opts(opts, context, false, errp);
+ return do_qemu_chr_new_from_opts(opts, context, false, errp);
}
-static Chardev *__qemu_chr_new(const char *label, const char *filename,
- bool permit_mux_mon, GMainContext *context,
- bool replay)
+static Chardev *qemu_chr_new_from_name(const char *label, const char *filename,
+ bool permit_mux_mon,
+ GMainContext *context, bool replay)
{
const char *p;
Chardev *chr;
@@ -735,7 +735,7 @@ static Chardev *__qemu_chr_new(const char *label, const char *filename,
if (!opts)
return NULL;
- chr = __qemu_chr_new_from_opts(opts, context, replay, &err);
+ chr = do_qemu_chr_new_from_opts(opts, context, replay, &err);
if (!chr) {
error_report_err(err);
goto out;
@@ -760,7 +760,8 @@ out:
Chardev *qemu_chr_new_noreplay(const char *label, const char *filename,
bool permit_mux_mon, GMainContext *context)
{
- return __qemu_chr_new(label, filename, permit_mux_mon, context, false);
+ return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
+ false);
}
static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
@@ -768,7 +769,8 @@ static Chardev *qemu_chr_new_permit_mux_mon(const char *label,
bool permit_mux_mon,
GMainContext *context)
{
- return __qemu_chr_new(label, filename, permit_mux_mon, context, true);
+ return qemu_chr_new_from_name(label, filename, permit_mux_mon, context,
+ true);
}
Chardev *qemu_chr_new(const char *label, const char *filename,
--
2.45.2
next prev parent reply other threads:[~2024-08-28 4:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 4:33 [PATCH 0/2] chardev: fixes for recent record/replay on muxed Nicholas Piggin
2024-08-28 4:33 ` [PATCH 1/2] chardev: Fix record/replay error path NULL deref in device creation Nicholas Piggin
2024-08-28 15:43 ` Peter Maydell
2024-08-28 4:33 ` Nicholas Piggin [this message]
2024-08-28 15:44 ` [PATCH 2/2] chardev: Remove __-prefixed names Peter Maydell
2024-08-28 6:41 ` [PATCH 0/2] chardev: fixes for recent record/replay on muxed Marc-André Lureau
2024-11-27 4:52 ` Nicholas Piggin
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=20240828043337.14587-3-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=alex.bennee@linaro.org \
--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).