* [PATCH 3/14] drivers/vhost/vhost.c: delete double assignment [not found] <1288088743-3725-1-git-send-email-julia@diku.dk> @ 2010-10-26 10:25 ` Julia Lawall 2010-10-26 11:06 ` Michael S. Tsirkin 0 siblings, 1 reply; 2+ messages in thread From: Julia Lawall @ 2010-10-26 10:25 UTC (permalink / raw) To: Michael S. Tsirkin Cc: virtualization, kernel-janitors, linux-kernel, kvm, netdev From: Julia Lawall <julia@diku.dk> Delete successive assignments to the same location. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression i; @@ *i = ...; i = ...; // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> --- drivers/vhost/vhost.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 94701ff..ed27727 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -157,7 +157,6 @@ static void vhost_vq_reset(struct vhost_dev *dev, vq->avail_idx = 0; vq->last_used_idx = 0; vq->used_flags = 0; - vq->used_flags = 0; vq->log_used = false; vq->log_addr = -1ull; vq->vhost_hlen = 0; ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3/14] drivers/vhost/vhost.c: delete double assignment 2010-10-26 10:25 ` [PATCH 3/14] drivers/vhost/vhost.c: delete double assignment Julia Lawall @ 2010-10-26 11:06 ` Michael S. Tsirkin 0 siblings, 0 replies; 2+ messages in thread From: Michael S. Tsirkin @ 2010-10-26 11:06 UTC (permalink / raw) To: Julia Lawall; +Cc: virtualization, kernel-janitors, linux-kernel, kvm, netdev On Tue, Oct 26, 2010 at 12:25:32PM +0200, Julia Lawall wrote: > From: Julia Lawall <julia@diku.dk> > > Delete successive assignments to the same location. > > A simplified version of the semantic match that finds this problem is as > follows: (http://coccinelle.lip6.fr/) > > // <smpl> > @@ > expression i; > @@ > > *i = ...; > i = ...; > // </smpl> > > Signed-off-by: Julia Lawall <julia@diku.dk> Thanks, applied. > --- > drivers/vhost/vhost.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index 94701ff..ed27727 100644 > --- a/drivers/vhost/vhost.c > +++ b/drivers/vhost/vhost.c > @@ -157,7 +157,6 @@ static void vhost_vq_reset(struct vhost_dev *dev, > vq->avail_idx = 0; > vq->last_used_idx = 0; > vq->used_flags = 0; > - vq->used_flags = 0; > vq->log_used = false; > vq->log_addr = -1ull; > vq->vhost_hlen = 0; ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-26 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1288088743-3725-1-git-send-email-julia@diku.dk>
2010-10-26 10:25 ` [PATCH 3/14] drivers/vhost/vhost.c: delete double assignment Julia Lawall
2010-10-26 11:06 ` Michael S. Tsirkin
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).