qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: dave@treblig.org, mst@redhat.com, pbonzini@redhat.com,
	QEMU Trivial <qemu-trivial@nongnu.org>
Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Subject: Re: [PATCH] hw/char: Remove unused serial_set_frequency
Date: Wed, 2 Oct 2024 12:31:48 +0200	[thread overview]
Message-ID: <73ef9298-05ba-48ce-9d60-c1e2bf50d729@redhat.com> (raw)
In-Reply-To: <20240918144122.155351-1-dave@treblig.org>

On 18/09/2024 16.41, dave@treblig.org wrote:
> 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)
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2024-10-02 10:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 14:41 [PATCH] hw/char: Remove unused serial_set_frequency dave
2024-10-02 10:31 ` Thomas Huth [this message]
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=73ef9298-05ba-48ce-9d60-c1e2bf50d729@redhat.com \
    --to=thuth@redhat.com \
    --cc=dave@treblig.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).