* [RESEND PATCH net-next 0/4] net: several cleanups
@ 2013-11-28 1:31 Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 1/4] vhost: remove the dead branch Zhi Yong Wu
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 1:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Per David's request, it's time to resend them now.
Zhi Yong Wu (4):
vhost: remove the dead branch
vhost: adjust vhost_dev_init() to be void
macvtap: remove the dead branch
macvtap: adjust macvtap_skb_to_vnet_hdr() to be void
drivers/net/macvtap.c | 8 ++------
drivers/vhost/net.c | 9 ++-------
drivers/vhost/scsi.c | 7 +------
drivers/vhost/test.c | 8 +-------
drivers/vhost/vhost.c | 4 +---
drivers/vhost/vhost.h | 2 +-
6 files changed, 8 insertions(+), 30 deletions(-)
--
1.7.6.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RESEND PATCH net-next 1/4] vhost: remove the dead branch
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
@ 2013-11-28 1:31 ` Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 2/4] vhost: adjust vhost_dev_init() to be void Zhi Yong Wu
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 1:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Since vhost_dev_init() forever return 0, some branches are never run,
therefore need to be removed.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/net.c | 5 -----
drivers/vhost/scsi.c | 5 -----
drivers/vhost/test.c | 5 -----
3 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 831eb4f..0554785 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -707,11 +707,6 @@ static int vhost_net_open(struct inode *inode, struct file *f)
n->vqs[i].sock_hlen = 0;
}
r = vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX);
- if (r < 0) {
- kfree(n);
- kfree(vqs);
- return r;
- }
vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, POLLOUT, dev);
vhost_poll_init(n->poll + VHOST_NET_VQ_RX, handle_rx_net, POLLIN, dev);
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index f175629..3164680 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1421,14 +1421,9 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
tcm_vhost_init_inflight(vs, NULL);
- if (r < 0)
- goto err_init;
-
f->private_data = vs;
return 0;
-err_init:
- kfree(vqs);
err_vqs:
vhost_scsi_free(vs);
err_vs:
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index 339eae8..99cb960 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -118,11 +118,6 @@ static int vhost_test_open(struct inode *inode, struct file *f)
vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ];
n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick;
r = vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX);
- if (r < 0) {
- kfree(vqs);
- kfree(n);
- return r;
- }
f->private_data = n;
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH net-next 2/4] vhost: adjust vhost_dev_init() to be void
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 1/4] vhost: remove the dead branch Zhi Yong Wu
@ 2013-11-28 1:31 ` Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 3/4] macvtap: remove the dead branch Zhi Yong Wu
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 1:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/vhost/net.c | 4 ++--
drivers/vhost/scsi.c | 2 +-
drivers/vhost/test.c | 3 +--
drivers/vhost/vhost.c | 4 +---
drivers/vhost/vhost.h | 2 +-
5 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 0554785..9a68409 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -683,7 +683,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
struct vhost_net *n = kmalloc(sizeof *n, GFP_KERNEL);
struct vhost_dev *dev;
struct vhost_virtqueue **vqs;
- int r, i;
+ int i;
if (!n)
return -ENOMEM;
@@ -706,7 +706,7 @@ static int vhost_net_open(struct inode *inode, struct file *f)
n->vqs[i].vhost_hlen = 0;
n->vqs[i].sock_hlen = 0;
}
- r = vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX);
+ vhost_dev_init(dev, vqs, VHOST_NET_VQ_MAX);
vhost_poll_init(n->poll + VHOST_NET_VQ_TX, handle_tx_net, POLLOUT, dev);
vhost_poll_init(n->poll + VHOST_NET_VQ_RX, handle_rx_net, POLLIN, dev);
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 3164680..1e4c75c 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -1417,7 +1417,7 @@ static int vhost_scsi_open(struct inode *inode, struct file *f)
vqs[i] = &vs->vqs[i].vq;
vs->vqs[i].vq.handle_kick = vhost_scsi_handle_kick;
}
- r = vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ);
+ vhost_dev_init(&vs->dev, vqs, VHOST_SCSI_MAX_VQ);
tcm_vhost_init_inflight(vs, NULL);
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c
index 99cb960..c2a54fb 100644
--- a/drivers/vhost/test.c
+++ b/drivers/vhost/test.c
@@ -104,7 +104,6 @@ static int vhost_test_open(struct inode *inode, struct file *f)
struct vhost_test *n = kmalloc(sizeof *n, GFP_KERNEL);
struct vhost_dev *dev;
struct vhost_virtqueue **vqs;
- int r;
if (!n)
return -ENOMEM;
@@ -117,7 +116,7 @@ static int vhost_test_open(struct inode *inode, struct file *f)
dev = &n->dev;
vqs[VHOST_TEST_VQ] = &n->vqs[VHOST_TEST_VQ];
n->vqs[VHOST_TEST_VQ].handle_kick = handle_vq_kick;
- r = vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX);
+ vhost_dev_init(dev, vqs, VHOST_TEST_VQ_MAX);
f->private_data = n;
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 69068e0..78987e4 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -290,7 +290,7 @@ static void vhost_dev_free_iovecs(struct vhost_dev *dev)
vhost_vq_free_iovecs(dev->vqs[i]);
}
-long vhost_dev_init(struct vhost_dev *dev,
+void vhost_dev_init(struct vhost_dev *dev,
struct vhost_virtqueue **vqs, int nvqs)
{
struct vhost_virtqueue *vq;
@@ -319,8 +319,6 @@ long vhost_dev_init(struct vhost_dev *dev,
vhost_poll_init(&vq->poll, vq->handle_kick,
POLLIN, dev);
}
-
- return 0;
}
EXPORT_SYMBOL_GPL(vhost_dev_init);
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 4465ed5..35eeb2a 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -127,7 +127,7 @@ struct vhost_dev {
struct task_struct *worker;
};
-long vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs);
+void vhost_dev_init(struct vhost_dev *, struct vhost_virtqueue **vqs, int nvqs);
long vhost_dev_set_owner(struct vhost_dev *dev);
bool vhost_dev_has_owner(struct vhost_dev *dev);
long vhost_dev_check_owner(struct vhost_dev *);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH net-next 3/4] macvtap: remove the dead branch
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 1/4] vhost: remove the dead branch Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 2/4] vhost: adjust vhost_dev_init() to be void Zhi Yong Wu
@ 2013-11-28 1:31 ` Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 4/4] macvtap: adjust macvtap_skb_to_vnet_hdr() to be void Zhi Yong Wu
2013-11-28 4:43 ` [RESEND PATCH net-next 0/4] net: several cleanups David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 1:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
drivers/net/macvtap.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index dc76670..eeb1a97 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -780,8 +780,6 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
return -EINVAL;
ret = macvtap_skb_to_vnet_hdr(skb, &vnet_hdr);
- if (ret)
- return ret;
if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr)))
return -EFAULT;
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [RESEND PATCH net-next 4/4] macvtap: adjust macvtap_skb_to_vnet_hdr() to be void
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
` (2 preceding siblings ...)
2013-11-28 1:31 ` [RESEND PATCH net-next 3/4] macvtap: remove the dead branch Zhi Yong Wu
@ 2013-11-28 1:31 ` Zhi Yong Wu
2013-11-28 4:43 ` [RESEND PATCH net-next 0/4] net: several cleanups David Miller
4 siblings, 0 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 1:31 UTC (permalink / raw)
To: netdev; +Cc: linux-kernel, Zhi Yong Wu
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
drivers/net/macvtap.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index eeb1a97..155d60e 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -588,7 +588,7 @@ static int macvtap_skb_from_vnet_hdr(struct sk_buff *skb,
return 0;
}
-static int macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
+static void macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
struct virtio_net_hdr *vnet_hdr)
{
memset(vnet_hdr, 0, sizeof(*vnet_hdr));
@@ -619,8 +619,6 @@ static int macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
} else if (skb->ip_summed == CHECKSUM_UNNECESSARY) {
vnet_hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;
} /* else everything is zero */
-
- return 0;
}
/* Get packet from user space buffer */
@@ -779,7 +777,7 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
if ((len -= vnet_hdr_len) < 0)
return -EINVAL;
- ret = macvtap_skb_to_vnet_hdr(skb, &vnet_hdr);
+ macvtap_skb_to_vnet_hdr(skb, &vnet_hdr);
if (memcpy_toiovecend(iv, (void *)&vnet_hdr, 0, sizeof(vnet_hdr)))
return -EFAULT;
--
1.7.6.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH net-next 0/4] net: several cleanups
2013-11-28 4:43 ` [RESEND PATCH net-next 0/4] net: several cleanups David Miller
@ 2013-11-28 4:42 ` Zhi Yong Wu
0 siblings, 0 replies; 7+ messages in thread
From: Zhi Yong Wu @ 2013-11-28 4:42 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-kernel mlist, Zhi Yong Wu
On Thu, Nov 28, 2013 at 12:43 PM, David Miller <davem@davemloft.net> wrote:
> From: Zhi Yong Wu <zwu.kernel@gmail.com>
> Date: Thu, 28 Nov 2013 09:31:29 +0800
>
>> Per David's request, it's time to resend them now.
>
> No, it is not the time.
>
> You should not submit these kinds of patches until the net-next
> tree is open again, and I make an announcement here when that
> is the case. I have yet to make such an announcement, and I
> do not plan to do so for several days as I am travelling and
> will be busy dealing with my backlog of patches once I get
> home.
ok, will wait for your announcement to be out.
--
Regards,
Zhi Yong Wu
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RESEND PATCH net-next 0/4] net: several cleanups
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
` (3 preceding siblings ...)
2013-11-28 1:31 ` [RESEND PATCH net-next 4/4] macvtap: adjust macvtap_skb_to_vnet_hdr() to be void Zhi Yong Wu
@ 2013-11-28 4:43 ` David Miller
2013-11-28 4:42 ` Zhi Yong Wu
4 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2013-11-28 4:43 UTC (permalink / raw)
To: zwu.kernel; +Cc: netdev, linux-kernel, wuzhy
From: Zhi Yong Wu <zwu.kernel@gmail.com>
Date: Thu, 28 Nov 2013 09:31:29 +0800
> Per David's request, it's time to resend them now.
No, it is not the time.
You should not submit these kinds of patches until the net-next
tree is open again, and I make an announcement here when that
is the case. I have yet to make such an announcement, and I
do not plan to do so for several days as I am travelling and
will be busy dealing with my backlog of patches once I get
home.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-11-28 4:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-28 1:31 [RESEND PATCH net-next 0/4] net: several cleanups Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 1/4] vhost: remove the dead branch Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 2/4] vhost: adjust vhost_dev_init() to be void Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 3/4] macvtap: remove the dead branch Zhi Yong Wu
2013-11-28 1:31 ` [RESEND PATCH net-next 4/4] macvtap: adjust macvtap_skb_to_vnet_hdr() to be void Zhi Yong Wu
2013-11-28 4:43 ` [RESEND PATCH net-next 0/4] net: several cleanups David Miller
2013-11-28 4:42 ` Zhi Yong Wu
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).