* [PATCH] hw/char: Remove unused serial_set_frequency
@ 2024-09-18 14:41 dave
2024-10-02 10:31 ` Thomas Huth
2024-10-03 21:14 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: dave @ 2024-09-18 14:41 UTC (permalink / raw)
To: mst, pbonzini; +Cc: marcandre.lureau, qemu-devel, Dr. David Alan Gilbert
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/char: Remove unused serial_set_frequency
2024-09-18 14:41 [PATCH] hw/char: Remove unused serial_set_frequency dave
@ 2024-10-02 10:31 ` Thomas Huth
2024-10-03 21:14 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2024-10-02 10:31 UTC (permalink / raw)
To: dave, mst, pbonzini, QEMU Trivial; +Cc: marcandre.lureau, qemu-devel
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] hw/char: Remove unused serial_set_frequency
2024-09-18 14:41 [PATCH] hw/char: Remove unused serial_set_frequency dave
2024-10-02 10:31 ` Thomas Huth
@ 2024-10-03 21:14 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-10-03 21:14 UTC (permalink / raw)
To: dave, mst, pbonzini, BALATON Zoltan
Cc: marcandre.lureau, qemu-devel, Bernhard Beschow, Mark Cave-Ayland
On 18/9/24 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.
See previous patch from Bernhard:
https://lore.kernel.org/qemu-devel/d8ffe38c-756d-4187-875e-e6697631b7fa@linaro.org/
Anyhow no objection at this point.
>
> 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)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-03 21:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-18 14:41 [PATCH] hw/char: Remove unused serial_set_frequency dave
2024-10-02 10:31 ` Thomas Huth
2024-10-03 21:14 ` Philippe Mathieu-Daudé
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).