diff mbox

[v2,2/4] 9pfs: drop pdu_push_and_notify()

Message ID 149328635105.30266.13681288439634920908.stgit@bahia
State New
Headers show

Commit Message

Greg Kurz April 27, 2017, 9:45 a.m. UTC
Only pdu_complete() needs to notify the client that a request has completed.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/9pfs/9p.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Stefano Stabellini April 27, 2017, 6:17 p.m. UTC | #1
On Thu, 27 Apr 2017, Greg Kurz wrote:
> Only pdu_complete() needs to notify the client that a request has completed.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  hw/9pfs/9p.c |    7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
> index c80ba67389ce..01deffa0c3b5 100644
> --- a/hw/9pfs/9p.c
> +++ b/hw/9pfs/9p.c
> @@ -65,11 +65,6 @@ ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...)
>      return ret;
>  }
>  
> -static void pdu_push_and_notify(V9fsPDU *pdu)

I would probably turn this into a static inline and keep it around as
syntactic sugar. Regardless:

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> -{
> -    pdu->s->transport->push_and_notify(pdu);
> -}
> -
>  static int omode_to_uflags(int8_t mode)
>  {
>      int ret = 0;
> @@ -668,7 +663,7 @@ static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
>      pdu->size = len;
>      pdu->id = id;
>  
> -    pdu_push_and_notify(pdu);
> +    pdu->s->transport->push_and_notify(pdu);
>  
>      /* Now wakeup anybody waiting in flush for this request */
>      if (!qemu_co_queue_next(&pdu->complete)) {
> 
>
diff mbox

Patch

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index c80ba67389ce..01deffa0c3b5 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -65,11 +65,6 @@  ssize_t pdu_unmarshal(V9fsPDU *pdu, size_t offset, const char *fmt, ...)
     return ret;
 }
 
-static void pdu_push_and_notify(V9fsPDU *pdu)
-{
-    pdu->s->transport->push_and_notify(pdu);
-}
-
 static int omode_to_uflags(int8_t mode)
 {
     int ret = 0;
@@ -668,7 +663,7 @@  static void coroutine_fn pdu_complete(V9fsPDU *pdu, ssize_t len)
     pdu->size = len;
     pdu->id = id;
 
-    pdu_push_and_notify(pdu);
+    pdu->s->transport->push_and_notify(pdu);
 
     /* Now wakeup anybody waiting in flush for this request */
     if (!qemu_co_queue_next(&pdu->complete)) {