qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: dave@treblig.org
To: mst@redhat.com, pbonzini@redhat.com
Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dave@treblig.org>
Subject: [PATCH] hw/char: Remove unused serial_set_frequency
Date: Wed, 18 Sep 2024 15:41:22 +0100	[thread overview]
Message-ID: <20240918144122.155351-1-dave@treblig.org> (raw)

From: "Dr. David Alan Gilbert" <dave@treblig.org>

serial_set_frequnecy has been unused since it was added in 2009:
  038eaf82c8 ("serial: Add interface to set reference oscillator frequency")

It looks like the 'baudbase' is now a property anyway so the wrapper
isn't needed.

Remove it.

Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
---
 hw/char/serial.c         | 7 -------
 include/hw/char/serial.h | 2 --
 2 files changed, 9 deletions(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index d8b2db5082..6c5c4a23c7 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -951,13 +951,6 @@ static void serial_unrealize(DeviceState *dev)
     qemu_unregister_reset(serial_reset, s);
 }
 
-/* Change the main reference oscillator frequency. */
-void serial_set_frequency(SerialState *s, uint32_t frequency)
-{
-    s->baudbase = frequency;
-    serial_update_parameters(s);
-}
-
 const MemoryRegionOps serial_io_ops = {
     .read = serial_ioport_read,
     .write = serial_ioport_write,
diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h
index 6e14099ee7..40aad21df3 100644
--- a/include/hw/char/serial.h
+++ b/include/hw/char/serial.h
@@ -93,8 +93,6 @@ struct SerialMM {
 extern const VMStateDescription vmstate_serial;
 extern const MemoryRegionOps serial_io_ops;
 
-void serial_set_frequency(SerialState *s, uint32_t frequency);
-
 #define TYPE_SERIAL "serial"
 OBJECT_DECLARE_SIMPLE_TYPE(SerialState, SERIAL)
 
-- 
2.46.0



             reply	other threads:[~2024-09-18 14:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 14:41 dave [this message]
2024-10-02 10:31 ` [PATCH] hw/char: Remove unused serial_set_frequency Thomas Huth
2024-10-03 21:14 ` Philippe Mathieu-Daudé

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=20240918144122.155351-1-dave@treblig.org \
    --to=dave@treblig.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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).