qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] usb: Change *_exitfn return type from void to int
@ 2016-09-30 17:51 Akanksha Srivastava
  2016-09-30 18:06 ` [Qemu-trivial] [Qemu-devel] " Jonathan Neuschäfer
  2016-09-30 18:46 ` Eric Blake
  0 siblings, 2 replies; 3+ messages in thread
From: Akanksha Srivastava @ 2016-09-30 17:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, kraxel, Akanksha Srivastava

The *_exitfn functions cannot fail and should not be
returning int.
Suggested as a Bite-sized task
Signed-off-by: Akanksha Srivastava <akanksha.dlf@gmail.com>
---
 hw/usb/ccid-card-emulated.c | 4 ++--
 hw/usb/ccid-card-passthru.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 3213f9f..abb2773 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -547,7 +547,7 @@ static int emulated_initfn(CCIDCardState *base)
     return 0;
 }
 
-static int emulated_exitfn(CCIDCardState *base)
+static void emulated_exitfn(CCIDCardState *base)
 {
     EmulatedState *card = EMULATED_CCID_CARD(base);
     VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL);
@@ -564,7 +564,7 @@ static int emulated_exitfn(CCIDCardState *base)
     qemu_mutex_destroy(&card->handle_apdu_mutex);
     qemu_mutex_destroy(&card->vreader_mutex);
     qemu_mutex_destroy(&card->event_list_mutex);
-    return 0;
+    return;
 }
 
 static Property emulated_card_properties[] = {
diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c
index 2eacea7..2bd9cb2 100644
--- a/hw/usb/ccid-card-passthru.c
+++ b/hw/usb/ccid-card-passthru.c
@@ -364,9 +364,9 @@ static int passthru_initfn(CCIDCardState *base)
     return 0;
 }
 
-static int passthru_exitfn(CCIDCardState *base)
+static void passthru_exitfn(CCIDCardState *base)
 {
-    return 0;
+    return;
 }
 
 static VMStateDescription passthru_vmstate = {
-- 
1.9.1



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

end of thread, other threads:[~2016-09-30 18:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-30 17:51 [Qemu-trivial] [PATCH] usb: Change *_exitfn return type from void to int Akanksha Srivastava
2016-09-30 18:06 ` [Qemu-trivial] [Qemu-devel] " Jonathan Neuschäfer
2016-09-30 18:46 ` Eric Blake

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