From patchwork Mon Jul 23 05:32:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 172543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 223762C00B2 for ; Mon, 23 Jul 2012 15:33:29 +1000 (EST) Received: from localhost ([::1]:56089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StBGo-0003nk-OV for incoming@patchwork.ozlabs.org; Mon, 23 Jul 2012 01:33:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StBGW-0003eB-DO for qemu-devel@nongnu.org; Mon, 23 Jul 2012 01:33:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StBGV-0004D3-Al for qemu-devel@nongnu.org; Mon, 23 Jul 2012 01:33:08 -0400 Received: from mail-gg0-f173.google.com ([209.85.161.173]:63382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StBGV-0004Cs-6V for qemu-devel@nongnu.org; Mon, 23 Jul 2012 01:33:07 -0400 Received: by ggnp1 with SMTP id p1so5206812ggn.4 for ; Sun, 22 Jul 2012 22:33:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SaX5vgcOkIs7v8ocL4s2HFqw/Ppz/BEHH28ENKBepv4=; b=ASXVLPZ5T42f9XSbqhwO74ZUCkE4dL/pvlNLG+J+cXE4uqNbkK1VqHjIVwH3XgQ/x7 VH5a8aO7Wpk2J8GXOKWWMbMGqNJa/iQkLhOdBHpQwToP0+3iazA7pcBEq7voBqGw9FHA 1Rqd7JE1FypzP0zoy4saOpdM50ULHHwLpwy1DAn7u7KJE1jAkY0F1E+4Q6r6RFONBu9I n58vGNCy38Tt1hV+wEUYUN9g0LhLBLPLGHv7Tb0YpReZ+bDXCRY3/TFMkBgcftlm92QT oK2gVjWolDDU/TAMt8hFXji3pQECy/N3aAy1BifIZ7K/kjCMbMiOPY1vPUimlAZS6jKv z1xA== Received: by 10.66.77.7 with SMTP id o7mr28135491paw.37.1343021586312; Sun, 22 Jul 2012 22:33:06 -0700 (PDT) Received: from ka1.ozlabs.ibm.com (ibmaus65.lnk.telstra.net. [165.228.126.9]) by mx.google.com with ESMTPS id wf7sm9238869pbc.34.2012.07.22.22.33.03 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 22 Jul 2012 22:33:05 -0700 (PDT) From: Alexey Kardashevskiy To: Alex Williamson Date: Mon, 23 Jul 2012 15:32:46 +1000 Message-Id: <1343021567-3701-3-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1343021567-3701-1-git-send-email-aik@ozlabs.ru> References: <1342070995.2229.88.camel@bling.home> <1343021567-3701-1-git-send-email-aik@ozlabs.ru> X-Gm-Message-State: ALoCoQnSLQDQBlrj+YsizQ8bn0DgIL7CKTxxU0VXT2r6LFQSWlF9+BKBSsc7mZuSygM8mFxOMj4j X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.173 Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH 2/3] ioapic: removed obsolete ioapic_remove_gsi_eoi_notifier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org As the Notifier struct contains everything it needs to get removed from the notifiers list, there is no need in ioapic_remove_gsi_eoi_notifier(). This patch removes it. Signed-off-by: Alexey Kardashevskiy --- hw/ioapic.c | 19 ++----------------- hw/ioapic.h | 1 - 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/hw/ioapic.c b/hw/ioapic.c index a6e0387..ead1b5f 100644 --- a/hw/ioapic.c +++ b/hw/ioapic.c @@ -139,8 +139,7 @@ void ioapic_eoi_broadcast(int vector) } } -static void ioapic_update_gsi_eoi_notifier(Notifier *notify, uint32_t gsi, - bool add) +void ioapic_add_gsi_eoi_notifier(Notifier *notify, uint32_t gsi) { IOAPICCommonState *s; int i; @@ -159,25 +158,11 @@ static void ioapic_update_gsi_eoi_notifier(Notifier *notify, uint32_t gsi, continue; } - if (add) { - notifier_list_add(&s->eoi_notifiers[pin], notify); - } else { - notifier_remove(notify); - } + notifier_list_add(&s->eoi_notifiers[pin], notify); return; } } -void ioapic_add_gsi_eoi_notifier(Notifier *notify, uint32_t gsi) -{ - ioapic_update_gsi_eoi_notifier(notify, gsi, true); -} - -void ioapic_remove_gsi_eoi_notifier(Notifier *notify, uint32_t gsi) -{ - ioapic_update_gsi_eoi_notifier(notify, gsi, false); -} - static uint64_t ioapic_mem_read(void *opaque, target_phys_addr_t addr, unsigned int size) { diff --git a/hw/ioapic.h b/hw/ioapic.h index a28fada..2d7d6a2 100644 --- a/hw/ioapic.h +++ b/hw/ioapic.h @@ -27,6 +27,5 @@ void ioapic_eoi_broadcast(int vector); void ioapic_add_gsi_eoi_notifier(Notifier *notify, uint32_t gsi); -void ioapic_remove_gsi_eoi_notifier(Notifier *notify, uint32_t gsi); #endif /* !HW_IOAPIC_H */