From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKq8M-0007YL-C5 for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:39:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKq8K-0002nY-PE for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:39:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKq8K-0002nT-G5 for qemu-devel@nongnu.org; Sun, 07 Oct 2012 08:39:00 -0400 From: Avi Kivity Date: Sun, 7 Oct 2012 14:38:16 +0200 Message-Id: <1349613508-22980-12-git-send-email-avi@redhat.com> In-Reply-To: <1349613508-22980-1-git-send-email-avi@redhat.com> References: <1349613508-22980-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH v1 11/23] xen_pt: use new MEMORY_LISTENER_DEFAULT_OPS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Anthony Liguori , liu ping fan , "Michael S. Tsirkin" , Paolo Bonzini , Blue Swirl Removes quite a bit of useless code. Signed-off-by: Avi Kivity --- hw/xen_pt.c | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/hw/xen_pt.c b/hw/xen_pt.c index 438ad54..4dcf46a 100644 --- a/hw/xen_pt.c +++ b/hw/xen_pt.c @@ -598,14 +598,6 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, } } -static void xen_pt_begin(MemoryListener *l) -{ -} - -static void xen_pt_commit(MemoryListener *l) -{ -} - static void xen_pt_region_add(MemoryListener *l, MemoryRegionSection *sec) { XenPCIPassthroughState *s = container_of(l, XenPCIPassthroughState, @@ -638,52 +630,17 @@ static void xen_pt_io_region_del(MemoryListener *l, MemoryRegionSection *sec) xen_pt_region_update(s, sec, false); } -static void xen_pt_region_nop(MemoryListener *l, MemoryRegionSection *s) -{ -} - -static void xen_pt_log_fns(MemoryListener *l, MemoryRegionSection *s) -{ -} - -static void xen_pt_log_global_fns(MemoryListener *l) -{ -} - -static void xen_pt_eventfd_fns(MemoryListener *l, MemoryRegionSection *s, - bool match_data, uint64_t data, EventNotifier *n) -{ -} - static const MemoryListener xen_pt_memory_listener = { - .begin = xen_pt_begin, - .commit = xen_pt_commit, + MEMORY_LISTENER_DEFAULT_OPS, .region_add = xen_pt_region_add, - .region_nop = xen_pt_region_nop, .region_del = xen_pt_region_del, - .log_start = xen_pt_log_fns, - .log_stop = xen_pt_log_fns, - .log_sync = xen_pt_log_fns, - .log_global_start = xen_pt_log_global_fns, - .log_global_stop = xen_pt_log_global_fns, - .eventfd_add = xen_pt_eventfd_fns, - .eventfd_del = xen_pt_eventfd_fns, .priority = 10, }; static const MemoryListener xen_pt_io_listener = { - .begin = xen_pt_begin, - .commit = xen_pt_commit, + MEMORY_LISTENER_DEFAULT_OPS, .region_add = xen_pt_io_region_add, - .region_nop = xen_pt_region_nop, .region_del = xen_pt_io_region_del, - .log_start = xen_pt_log_fns, - .log_stop = xen_pt_log_fns, - .log_sync = xen_pt_log_fns, - .log_global_start = xen_pt_log_global_fns, - .log_global_stop = xen_pt_log_global_fns, - .eventfd_add = xen_pt_eventfd_fns, - .eventfd_del = xen_pt_eventfd_fns, .priority = 10, }; -- 1.7.12