qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/tcx: Remove unused 'addr' field and the property that sets it
@ 2013-03-26 12:35 Peter Maydell
  2013-03-28  9:33 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2013-03-26 12:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Blue Swirl, patches

Remove the 'addr' field from TCXState (since it is completely unused),
also the qdev property which sets it. This seems to be a relic from
many years past; devices don't need to know where they are mapped.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Random minor cleanup, but I'm hoping we might be able to get rid of
the 'taddr' properties altogether; there aren't very many of them...

 hw/sparc/sun4m.c |    1 -
 hw/tcx.c         |    2 --
 2 files changed, 3 deletions(-)

diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index 2f214da..9ebda02 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -575,7 +575,6 @@ static void tcx_init(hwaddr addr, int vram_size, int width,
     SysBusDevice *s;
 
     dev = qdev_create(NULL, "SUNW,tcx");
-    qdev_prop_set_taddr(dev, "addr", addr);
     qdev_prop_set_uint32(dev, "vram_size", vram_size);
     qdev_prop_set_uint16(dev, "width", width);
     qdev_prop_set_uint16(dev, "height", height);
diff --git a/hw/tcx.c b/hw/tcx.c
index f1edffd..c44068e 100644
--- a/hw/tcx.c
+++ b/hw/tcx.c
@@ -37,7 +37,6 @@
 
 typedef struct TCXState {
     SysBusDevice busdev;
-    hwaddr addr;
     QemuConsole *con;
     uint8_t *vram;
     uint32_t *vram24, *cplane;
@@ -707,7 +706,6 @@ write_err:
 }
 
 static Property tcx_properties[] = {
-    DEFINE_PROP_TADDR("addr",      TCXState, addr,      -1),
     DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1),
     DEFINE_PROP_UINT16("width",    TCXState, width,     -1),
     DEFINE_PROP_UINT16("height",   TCXState, height,    -1),
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/tcx: Remove unused 'addr' field and the property that sets it
  2013-03-26 12:35 [Qemu-devel] [PATCH] hw/tcx: Remove unused 'addr' field and the property that sets it Peter Maydell
@ 2013-03-28  9:33 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-03-28  9:33 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-trivial, Blue Swirl, qemu-devel, patches

On Tue, Mar 26, 2013 at 12:35:09PM +0000, Peter Maydell wrote:
> Remove the 'addr' field from TCXState (since it is completely unused),
> also the qdev property which sets it. This seems to be a relic from
> many years past; devices don't need to know where they are mapped.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Random minor cleanup, but I'm hoping we might be able to get rid of
> the 'taddr' properties altogether; there aren't very many of them...
> 
>  hw/sparc/sun4m.c |    1 -
>  hw/tcx.c         |    2 --
>  2 files changed, 3 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-28  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-26 12:35 [Qemu-devel] [PATCH] hw/tcx: Remove unused 'addr' field and the property that sets it Peter Maydell
2013-03-28  9:33 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

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).