Skip to contentSkip to conversation

examples/vhost_crypto: fix unchecked return value

PATCH Applied Fan Zhang 4 participants 8 messages May 15, 2019 – Jun 24, 2019

lore
Share & tools
lore

Fan Zhang

author
#0 lore raw

PATCH 1/1 examples/vhost_crypto: fix unchecked return value

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
 examples/vhost_crypto/main.c | 6 ------
 1 file changed, 6 deletions(-)
examples/vhost_crypto/main.c +0 -6
index ac7118e7e..cfb9dfda2 100644
@@ -354,12 +354,6 @@ static const struct vhost_device_ops virtio_crypto_device_ops = {
 	.destroy_device = destroy_device,
 };
 
-__attribute__((unused))
-static void clrscr(void)
-{
-	system("@cls||clear");
-}
-
 static int
 vhost_crypto_worker(void *arg)
 {
Signature · 1 line
2.14.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Fan Zhang

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Quoted 9 lines

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")

---
examples/vhost_crypto/main.c | 6 ------

1 file changed, 6 deletions(-)

It really is unused.

#2 lore raw

Hi Jens,

You are right. Sorry the code wasn't cleaned up properly in the first place. Do you want me to send a v2 with new title?

Regards,
Fan

Quoted 27 lines

-----Original Message-----
From: Jens Freimann [mailto:[email protected]]
Sent: Thursday, May 16, 2019 9:07 AM
To: Zhang, Roy Fan <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [dpdk-dev] [PATCH] examples/vhost_crypto: fix unchecked return value

Quoted 4 lines · Fan Zhang

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Quoted 9 lines

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")

---
examples/vhost_crypto/main.c | 6 ------

1 file changed, 6 deletions(-)

It really is unused.

#3 lore raw
Quoted 4 lines · Roy Fan

Hi Jens,

You are right. Sorry the code wasn't cleaned up properly in the first place. Do you want me to send a v2 with new title?

No it's fine for me :)

regards,
Jens

Acked-by on v1 1/1
#4 lore raw
In reply to Fan Zhang
Quoted 32 lines

Subject: [dpdk-dev] [PATCH] examples/vhost_crypto: fix unchecked return value

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
 examples/vhost_crypto/main.c | 6 ------
 1 file changed, 6 deletions(-)
examples/vhost_crypto/main.c +0 -6
index ac7118e7e..cfb9dfda2 100644
@@ -354,12 +354,6 @@ static const struct vhost_device_ops
 virtio_crypto_device_ops = {
 	.destroy_device = destroy_device,
 };
 
-__attribute__((unused))
-static void clrscr(void)
-{
-	system("@cls||clear");
-}
-
 static int
 vhost_crypto_worker(void *arg)
Quoted 1 line

{

Reviewed-by on v1 1/1
#5 lore raw
In reply to Fan Zhang
Quoted 21 lines · Fan Zhang

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
  examples/vhost_crypto/main.c | 6 ------
  1 file changed, 6 deletions(-)
examples/vhost_crypto/main.c +0 -0
index ac7118e7e..cfb9dfda2 100644
@@ -354,12 +354,6 @@ static const struct vhost_device_ops virtio_crypto_device_ops = {
  	.destroy_device = destroy_device,
  };

examples/vhost_crypto/main.c static const struct vhost_device_ops virtio_crypto_device_ops = { · line 359

Quoted 10 lines
examples/vhost_crypto/main.c +0 -6
 
-__attribute__((unused))
-static void clrscr(void)
-{
-	system("@cls||clear");
-}
-
  static int
  vhost_crypto_worker(void *arg)
  {

I'll change the title to:
examples/vhost_crypto: remove unused function

#6 lore raw

Thanks Maxime.

Quoted 47 lines

-----Original Message-----
From: Maxime Coquelin [mailto:[email protected]]
Sent: Thursday, June 20, 2019 10:44 AM
To: Zhang, Roy Fan <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH] examples/vhost_crypto: fix unchecked return value

examples/vhost_crypto/main.c static const struct vhost_device_ops

Quoted 18 lines · Fan Zhang

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
  examples/vhost_crypto/main.c | 6 ------
  1 file changed, 6 deletions(-)
(quoted diff) +0 -0

b/examples/vhost_crypto/main.c index ac7118e7e..cfb9dfda2 100644

examples/vhost_crypto/main.c +0 -0
@@ -354,12 +354,6 @@ static const struct vhost_device_ops

virtio_crypto_device_ops = {

examples/vhost_crypto/main.c static const struct vhost_device_ops virtio_crypto_device_ops = { · line 359

Quoted 13 lines
examples/vhost_crypto/main.c +0 -6
  	.destroy_device = destroy_device,
  };
 
-__attribute__((unused))
-static void clrscr(void)
-{
-	system("@cls||clear");
-}
-
  static int
  vhost_crypto_worker(void *arg)
  {

I'll change the title to:
examples/vhost_crypto: remove unused function

#7 lore raw
In reply to Fan Zhang
Quoted 4 lines · Fan Zhang

This patch tries to fix the coverity issue of unchecked return value. Since the function that causes the problem is unused, it is removed completely.

Quoted 9 lines

Coverity issue: 336816

Fixes f5188211c721 ("examples/vhost_crypto: add sample application")
---
  examples/vhost_crypto/main.c | 6 ------
  1 file changed, 6 deletions(-)

Applied to dpdk-next-virtio/master.

Thanks,
Maxime