DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] vhost: remove unneeded variable assignment
@ 2017-01-24 20:31 Emmanuel Roullit
  2017-01-30 12:47 ` Yuanhan Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Roullit @ 2017-01-24 20:31 UTC (permalink / raw)
  To: huawei.xie, yuanhan.liu; +Cc: dev

Found with clang static analysis:
lib/librte_vhost/vhost_user.c:996:3: warning:
Value stored to 'ret' is never read
        ret = vhost_user_get_vring_base(dev, &msg.payload.state);
        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 73c8f9f69c6c ("vhost: introduce reply ack feature")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
---
 lib/librte_vhost/vhost_user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 7343a00a1..3391d5ea5 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -995,7 +995,7 @@ vhost_user_msg_handler(int vid, int fd)
 		break;
 
 	case VHOST_USER_GET_VRING_BASE:
-		ret = vhost_user_get_vring_base(dev, &msg.payload.state);
+		vhost_user_get_vring_base(dev, &msg.payload.state);
 		msg.size = sizeof(msg.payload.state);
 		send_vhost_message(fd, &msg);
 		break;
-- 
2.11.0

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

* Re: [dpdk-dev] [PATCH] vhost: remove unneeded variable assignment
  2017-01-24 20:31 [dpdk-dev] [PATCH] vhost: remove unneeded variable assignment Emmanuel Roullit
@ 2017-01-30 12:47 ` Yuanhan Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuanhan Liu @ 2017-01-30 12:47 UTC (permalink / raw)
  To: Emmanuel Roullit; +Cc: huawei.xie, dev

On Tue, Jan 24, 2017 at 09:31:29PM +0100, Emmanuel Roullit wrote:
> Found with clang static analysis:
> lib/librte_vhost/vhost_user.c:996:3: warning:
> Value stored to 'ret' is never read
>         ret = vhost_user_get_vring_base(dev, &msg.payload.state);
>         ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fixes: 73c8f9f69c6c ("vhost: introduce reply ack feature")

Again, you were referencing the bad commit. For this case, I'd like to
remove such fixline, as this patch doesn't really "fix" anything. But
since you made it, I could apply it.

So applied to dpdk-next-virtio.

	--yliu

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

end of thread, other threads:[~2017-01-30 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 20:31 [dpdk-dev] [PATCH] vhost: remove unneeded variable assignment Emmanuel Roullit
2017-01-30 12:47 ` Yuanhan Liu

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