qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ladi Prosek <lprosek@redhat.com>
To: qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, pbonzini@redhat.com,
	Ladi Prosek <lprosek@redhat.com>,
	pagupta@redhat.com
Subject: [Qemu-devel] [PATCH v2 1/4] rng: remove the unused request cancellation code
Date: Wed, 10 Feb 2016 16:53:22 +0100	[thread overview]
Message-ID: <1455119605-31261-2-git-send-email-lprosek@redhat.com> (raw)
In-Reply-To: <1455119605-31261-1-git-send-email-lprosek@redhat.com>

rng_backend_cancel_requests has no callers and none of the code
deleted in this commit ever runs.

Signed-off-by: Ladi Prosek <lprosek@redhat.com>
---
 backends/rng-egd.c   | 12 ------------
 backends/rng.c       |  9 ---------
 include/sysemu/rng.h | 11 -----------
 3 files changed, 32 deletions(-)

diff --git a/backends/rng-egd.c b/backends/rng-egd.c
index 2de5cd5..0b2976a 100644
--- a/backends/rng-egd.c
+++ b/backends/rng-egd.c
@@ -125,17 +125,6 @@ static void rng_egd_free_requests(RngEgd *s)
     s->requests = NULL;
 }
 
-static void rng_egd_cancel_requests(RngBackend *b)
-{
-    RngEgd *s = RNG_EGD(b);
-
-    /* We simply delete the list of pending requests.  If there is data in the 
-     * queue waiting to be read, this is okay, because there will always be
-     * more data than we requested originally
-     */
-    rng_egd_free_requests(s);
-}
-
 static void rng_egd_opened(RngBackend *b, Error **errp)
 {
     RngEgd *s = RNG_EGD(b);
@@ -213,7 +202,6 @@ static void rng_egd_class_init(ObjectClass *klass, void *data)
     RngBackendClass *rbc = RNG_BACKEND_CLASS(klass);
 
     rbc->request_entropy = rng_egd_request_entropy;
-    rbc->cancel_requests = rng_egd_cancel_requests;
     rbc->opened = rng_egd_opened;
 }
 
diff --git a/backends/rng.c b/backends/rng.c
index b7820ef..2f2f3ee 100644
--- a/backends/rng.c
+++ b/backends/rng.c
@@ -26,15 +26,6 @@ void rng_backend_request_entropy(RngBackend *s, size_t size,
     }
 }
 
-void rng_backend_cancel_requests(RngBackend *s)
-{
-    RngBackendClass *k = RNG_BACKEND_GET_CLASS(s);
-
-    if (k->cancel_requests) {
-        k->cancel_requests(s);
-    }
-}
-
 static bool rng_backend_prop_get_opened(Object *obj, Error **errp)
 {
     RngBackend *s = RNG_BACKEND(obj);
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index 0a27c9b..c7da17d 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -38,7 +38,6 @@ struct RngBackendClass
 
     void (*request_entropy)(RngBackend *s, size_t size,
                             EntropyReceiveFunc *receive_entropy, void *opaque);
-    void (*cancel_requests)(RngBackend *s);
 
     void (*opened)(RngBackend *s, Error **errp);
 };
@@ -69,14 +68,4 @@ struct RngBackend
 void rng_backend_request_entropy(RngBackend *s, size_t size,
                                  EntropyReceiveFunc *receive_entropy,
                                  void *opaque);
-
-/**
- * rng_backend_cancel_requests:
- * @s: the backend to cancel all pending requests in
- *
- * Cancels all pending requests submitted by @rng_backend_request_entropy.  This
- * should be used by a device during reset or in preparation for live migration
- * to stop tracking any request.
- */
-void rng_backend_cancel_requests(RngBackend *s);
 #endif
-- 
2.5.0

  reply	other threads:[~2016-02-10 15:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 15:53 [Qemu-devel] [PATCH v2 0/4] rng-random: implement request queue Ladi Prosek
2016-02-10 15:53 ` Ladi Prosek [this message]
2016-02-10 15:53 ` [Qemu-devel] [PATCH v2 2/4] rng: move request queue from RngEgd to RngBackend Ladi Prosek
2016-02-10 15:53 ` [Qemu-devel] [PATCH v2 3/4] rng: move request queue cleanup " Ladi Prosek
2016-03-02  7:15   ` Amit Shah
2016-03-02  8:32     ` Ladi Prosek
2016-03-02  9:56       ` Amit Shah
2016-02-10 15:53 ` [Qemu-devel] [PATCH v2 4/4] rng: add request queue support to rng-random Ladi Prosek
2016-02-10 16:23   ` Paolo Bonzini
2016-02-10 16:40     ` Ladi Prosek
2016-02-10 16:40       ` Paolo Bonzini
2016-03-02  9:56   ` Amit Shah
2016-03-02 10:07     ` Ladi Prosek
2016-02-15 13:36 ` [Qemu-devel] [PATCH v2 0/4] rng-random: implement request queue Pankaj Gupta

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=1455119605-31261-2-git-send-email-lprosek@redhat.com \
    --to=lprosek@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=pagupta@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).