qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@linux.vnet.ibm.com>, qemu-trivial@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 5/8] ioport: Remove unused functions
Date: Mon, 09 Mar 2015 20:23:24 +0100	[thread overview]
Message-ID: <54FDF32C.5060305@redhat.com> (raw)
In-Reply-To: <1425922215-20819-6-git-send-email-thuth@linux.vnet.ibm.com>



On 09/03/2015 18:30, Thomas Huth wrote:
> The functions portio_list_destroy() and portio_list_del()
> are not used anywhere, so let's remove them.
> 
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>

I think it's better to provide a complete API, mimicking memory_region_*
as much as possible, so I'd rather keep these.

Paolo

> ---
>  include/exec/ioport.h |    2 --
>  ioport.c              |   24 ------------------------
>  2 files changed, 0 insertions(+), 26 deletions(-)
> 
> diff --git a/include/exec/ioport.h b/include/exec/ioport.h
> index 3bd6722..218c835 100644
> --- a/include/exec/ioport.h
> +++ b/include/exec/ioport.h
> @@ -71,10 +71,8 @@ void portio_list_init(PortioList *piolist, Object *owner,
>                        const struct MemoryRegionPortio *callbacks,
>                        void *opaque, const char *name);
>  void portio_list_set_flush_coalesced(PortioList *piolist);
> -void portio_list_destroy(PortioList *piolist);
>  void portio_list_add(PortioList *piolist,
>                       struct MemoryRegion *address_space,
>                       uint32_t addr);
> -void portio_list_del(PortioList *piolist);
>  
>  #endif /* IOPORT_H */
> diff --git a/ioport.c b/ioport.c
> index 783a3ae..712b9e2 100644
> --- a/ioport.c
> +++ b/ioport.c
> @@ -147,19 +147,6 @@ void portio_list_set_flush_coalesced(PortioList *piolist)
>      piolist->flush_coalesced_mmio = true;
>  }
>  
> -void portio_list_destroy(PortioList *piolist)
> -{
> -    MemoryRegionPortioList *mrpio;
> -    unsigned i;
> -
> -    for (i = 0; i < piolist->nr; ++i) {
> -        mrpio = container_of(piolist->regions[i], MemoryRegionPortioList, mr);
> -        object_unparent(OBJECT(&mrpio->mr));
> -        g_free(mrpio);
> -    }
> -    g_free(piolist->regions);
> -}
> -
>  static const MemoryRegionPortio *find_portio(MemoryRegionPortioList *mrpio,
>                                               uint64_t offset, unsigned size,
>                                               bool write)
> @@ -290,14 +277,3 @@ void portio_list_add(PortioList *piolist,
>      /* There will always be an open sub-list.  */
>      portio_list_add_1(piolist, pio_start, count, start, off_low, off_high);
>  }
> -
> -void portio_list_del(PortioList *piolist)
> -{
> -    MemoryRegionPortioList *mrpio;
> -    unsigned i;
> -
> -    for (i = 0; i < piolist->nr; ++i) {
> -        mrpio = container_of(piolist->regions[i], MemoryRegionPortioList, mr);
> -        memory_region_del_subregion(piolist->address_space, &mrpio->mr);
> -    }
> -}
> 

  reply	other threads:[~2015-03-09 19:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 17:30 [Qemu-devel] [PATCH 0/8] Remove more unused functions Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 1/8] migration: Remove " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 2/8] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags() Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 3/8] pci: Remove unused functions Thomas Huth
2015-03-10 15:05   ` Michael S. Tsirkin
2015-03-18 13:19   ` Michael S. Tsirkin
2015-03-09 17:30 ` [Qemu-devel] [PATCH 4/8] monitor: " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 5/8] ioport: " Thomas Huth
2015-03-09 19:23   ` Paolo Bonzini [this message]
2015-03-10  6:09     ` Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 6/8] usb: " Thomas Huth
2015-03-10  8:38   ` Gerd Hoffmann
2015-03-09 17:30 ` [Qemu-devel] [PATCH 7/8] util: " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 8/8] Remove various " Thomas Huth

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=54FDF32C.5060305@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@linux.vnet.ibm.com \
    /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).