From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WES-0001io-Km for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3WEL-0007GY-DJ for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3WEL-0007GJ-8B for qemu-devel@nongnu.org; Thu, 19 May 2016 18:15:45 -0400 From: Bandan Das Date: Thu, 19 May 2016 18:15:15 -0400 Message-Id: <1463696116-31631-4-git-send-email-bsd@redhat.com> In-Reply-To: <1463696116-31631-1-git-send-email-bsd@redhat.com> References: <1463696116-31631-1-git-send-email-bsd@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] nmi: add errp function parameter to inject_nmi() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, aik@ozlabs.ru If caller has errp, set it appropriately in case of an error and pass it along. Signed-off-by: Bandan Das --- hw/core/nmi.c | 4 ++-- hw/watchdog/watchdog.c | 2 +- include/hw/nmi.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/core/nmi.c b/hw/core/nmi.c index cc47025..40324a9 100644 --- a/hw/core/nmi.c +++ b/hw/core/nmi.c @@ -73,9 +73,9 @@ void nmi_monitor_handle(int cpu_index, Error **errp) } } -void inject_nmi(void) +void inject_nmi(Error **errp) { - nmi_monitor_handle(0, NULL); + nmi_monitor_handle(0, errp); } static const TypeInfo nmi_info = { diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c index bbf3646..c3f2c87 100644 --- a/hw/watchdog/watchdog.c +++ b/hw/watchdog/watchdog.c @@ -143,7 +143,7 @@ void watchdog_perform_action(void) case WDT_NMI: qapi_event_send_watchdog(WATCHDOG_EXPIRATION_ACTION_INJECT_NMI, &error_abort); - inject_nmi(); + inject_nmi(NULL); break; } } diff --git a/include/hw/nmi.h b/include/hw/nmi.h index f4cec62..63794d9 100644 --- a/include/hw/nmi.h +++ b/include/hw/nmi.h @@ -45,6 +45,6 @@ typedef struct NMIClass { } NMIClass; void nmi_monitor_handle(int cpu_index, Error **errp); -void inject_nmi(void); +void inject_nmi(Error **errp); #endif /* NMI_H */ -- 2.5.5