Skip to contentSkip to conversation

cryptodev: remove dead code

PATCH In review Paolo Bonzini 4 participants 6 messages Jul 30, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cryptodev: remove dead code

Reported by Coverity as CID 1390600.

---
 backends/cryptodev-vhost-user.c | 5 -----
 1 file changed, 5 deletions(-)
backends/cryptodev-vhost-user.c +0 -5
index d52daccfcd..d539f14d59 100644
@@ -157,7 +157,6 @@ static void cryptodev_vhost_user_event(void *opaque, int event)
 {
     CryptoDevBackendVhostUser *s = opaque;
     CryptoDevBackend *b = CRYPTODEV_BACKEND(s);
-    Error *err = NULL;
     int queues = b->conf.peers.queues;
 
     assert(queues < MAX_CRYPTO_QUEUE_NUM);
@@ -174,10 +173,6 @@ static void cryptodev_vhost_user_event(void *opaque, int event)
         cryptodev_vhost_user_stop(queues, s);
         break;
     }
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
 static void cryptodev_vhost_user_init(
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 40 lines

-----Original Message-----
From: Qemu-devel [mailto:[email protected]] On Behalf Of Paolo Bonzini
Sent: Monday, July 30, 2018 4:51 PM
To: [email protected]
Subject: [Qemu-devel] [PATCH] cryptodev: remove dead code

Reported by Coverity as CID 1390600.

---
 backends/cryptodev-vhost-user.c | 5 -----
 1 file changed, 5 deletions(-)
backends/cryptodev-vhost-user.c +0 -1
index d52daccfcd..d539f14d59 100644
@@ -157,7 +157,6 @@ static void cryptodev_vhost_user_event(void *opaque,
 int event)
 {
     CryptoDevBackendVhostUser *s = opaque;
     CryptoDevBackend *b = CRYPTODEV_BACKEND(s);
-    Error *err = NULL;
     int queues = b->conf.peers.queues;
 
     assert(queues < MAX_CRYPTO_QUEUE_NUM);
backends/cryptodev-vhost-user.c +0 -4
@@ -174,10 +173,6 @@ static void cryptodev_vhost_user_event(void
 *opaque, int event)
         cryptodev_vhost_user_stop(queues, s);
         break;
     }
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
Quoted 4 lines

static void cryptodev_vhost_user_init(
--
2.17.1

Thanks,
-Gonglei

#3 lore raw
Quoted 16 lines

-----Original Message-----
From: Peter Maydell [mailto:[email protected]]
Sent: Monday, July 30, 2018 6:49 PM
To: Paolo Bonzini <[email protected]>
Cc: QEMU Developers <[email protected]>; Gonglei (Arei) <[email protected]>
Subject: Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

Quoted 4 lines · Paolo Bonzini

Reported by Coverity as CID 1390600.

---

Quoted 7 lines

This already has a reviewed patch on-list for this from back in April:

https://patchwork.ozlabs.org/patch/906041/

so I think we should just apply that.

Oh, yes. Would you pick it up directly? Or by qemu-trivial?

Thanks,
-Gonglei

#4 lore raw
In reply to Paolo Bonzini

Hi Paolo,

I've posted a patch before, pls see
https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg05215.html

which reviewed by Stefan
https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01549.html

It seems that it hasn't been merged. Could you pick it up pls?

Regards,
Jay

Quoted 40 lines

-----Original Message-----
From: Qemu-devel [mailto:qemu-devel- [email protected]] On Behalf Of Paolo Bonzini
Sent: Monday, July 30, 2018 4:51 PM
To: [email protected]
Subject: [Qemu-devel] [PATCH] cryptodev: remove dead code

Reported by Coverity as CID 1390600.

---
 backends/cryptodev-vhost-user.c | 5 -----
 1 file changed, 5 deletions(-)
backends/cryptodev-vhost- renamed from backends/cryptodev-vhost-user.c +0 -0

user.c index d52daccfcd..d539f14d59 100644

backends/cryptodev-vhost-user.c +0 -1
@@ -157,7 +157,6 @@ static void cryptodev_vhost_user_event(void *opaque, int
 event)  {
     CryptoDevBackendVhostUser *s = opaque;
     CryptoDevBackend *b = CRYPTODEV_BACKEND(s);
-    Error *err = NULL;
     int queues = b->conf.peers.queues;
 
     assert(queues < MAX_CRYPTO_QUEUE_NUM); @@ -174,10 +173,6 @@ static void

cryptodev_vhost_user_event(void *opaque, int event)

         cryptodev_vhost_user_stop(queues, s);
         break;
     }
backends/cryptodev-vhost-user.c +0 -5
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
 static void cryptodev_vhost_user_init(
--

2.17.1

#5 lore raw
Quoted 9 lines · Zhoujian (jay)

Hi Paolo,

I've posted a patch before, pls see
https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg05215.html

which reviewed by Stefan
https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01549.html

It seems that it hasn't been merged. Could you pick it up pls?

Yes, I will.

Paolo

Quoted 44 lines

Regards,
Jay

Quoted 40 lines

-----Original Message-----
From: Qemu-devel [mailto:qemu-devel- [email protected]] On Behalf Of Paolo Bonzini
Sent: Monday, July 30, 2018 4:51 PM
To: [email protected]
Subject: [Qemu-devel] [PATCH] cryptodev: remove dead code

Reported by Coverity as CID 1390600.

---
 backends/cryptodev-vhost-user.c | 5 -----
 1 file changed, 5 deletions(-)
backends/cryptodev-vhost- renamed from backends/cryptodev-vhost-user.c +0 -0

user.c index d52daccfcd..d539f14d59 100644

backends/cryptodev-vhost-user.c +0 -1
@@ -157,7 +157,6 @@ static void cryptodev_vhost_user_event(void *opaque, int
 event)  {
     CryptoDevBackendVhostUser *s = opaque;
     CryptoDevBackend *b = CRYPTODEV_BACKEND(s);
-    Error *err = NULL;
     int queues = b->conf.peers.queues;
 
     assert(queues < MAX_CRYPTO_QUEUE_NUM); @@ -174,10 +173,6 @@ static void

cryptodev_vhost_user_event(void *opaque, int event)

         cryptodev_vhost_user_stop(queues, s);
         break;
     }
backends/cryptodev-vhost-user.c +0 -5
-
-    if (err) {
-        error_report_err(err);
-    }
 }
 
 static void cryptodev_vhost_user_init(
--

2.17.1