summaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-10-24 09:54:12 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-24 09:54:12 -0400
commitba3e2084f268bdfed7627046e58a2218037e15af (patch)
tree36b99da43ee72f81b31f0627dbfc69f50c97378f /drivers/net/xen-netfront.c
parenta72c9512bf2bef12c5e66a4d910c4b348fe31d61 (diff)
parentce9d9b8e5c2b7486edf76958bcdb5e6534a915b0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/ipv6/xfrm6_output.c net/openvswitch/flow_netlink.c net/openvswitch/vport-gre.c net/openvswitch/vport-vxlan.c net/openvswitch/vport.c net/openvswitch/vport.h The openvswitch conflicts were overlapping changes. One was the egress tunnel info fix in 'net' and the other was the vport ->send() op simplification in 'net-next'. The xfrm6_output.c conflicts was also a simplification overlapping a bug fix. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 9bf63c27a9b7..441b158d04f7 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1706,19 +1706,19 @@ static void xennet_destroy_queues(struct netfront_info *info)
1706} 1706}
1707 1707
1708static int xennet_create_queues(struct netfront_info *info, 1708static int xennet_create_queues(struct netfront_info *info,
1709 unsigned int num_queues) 1709 unsigned int *num_queues)
1710{ 1710{
1711 unsigned int i; 1711 unsigned int i;
1712 int ret; 1712 int ret;
1713 1713
1714 info->queues = kcalloc(num_queues, sizeof(struct netfront_queue), 1714 info->queues = kcalloc(*num_queues, sizeof(struct netfront_queue),
1715 GFP_KERNEL); 1715 GFP_KERNEL);
1716 if (!info->queues) 1716 if (!info->queues)
1717 return -ENOMEM; 1717 return -ENOMEM;
1718 1718
1719 rtnl_lock(); 1719 rtnl_lock();
1720 1720
1721 for (i = 0; i < num_queues; i++) { 1721 for (i = 0; i < *num_queues; i++) {
1722 struct netfront_queue *queue = &info->queues[i]; 1722 struct netfront_queue *queue = &info->queues[i];
1723 1723
1724 queue->id = i; 1724 queue->id = i;
@@ -1728,7 +1728,7 @@ static int xennet_create_queues(struct netfront_info *info,
1728 if (ret < 0) { 1728 if (ret < 0) {
1729 dev_warn(&info->netdev->dev, 1729 dev_warn(&info->netdev->dev,
1730 "only created %d queues\n", i); 1730 "only created %d queues\n", i);
1731 num_queues = i; 1731 *num_queues = i;
1732 break; 1732 break;
1733 } 1733 }
1734 1734
@@ -1738,11 +1738,11 @@ static int xennet_create_queues(struct netfront_info *info,
1738 napi_enable(&queue->napi); 1738 napi_enable(&queue->napi);
1739 } 1739 }
1740 1740
1741 netif_set_real_num_tx_queues(info->netdev, num_queues); 1741 netif_set_real_num_tx_queues(info->netdev, *num_queues);
1742 1742
1743 rtnl_unlock(); 1743 rtnl_unlock();
1744 1744
1745 if (num_queues == 0) { 1745 if (*num_queues == 0) {
1746 dev_err(&info->netdev->dev, "no queues\n"); 1746 dev_err(&info->netdev->dev, "no queues\n");
1747 return -EINVAL; 1747 return -EINVAL;
1748 } 1748 }
@@ -1788,7 +1788,7 @@ static int talk_to_netback(struct xenbus_device *dev,
1788 if (info->queues) 1788 if (info->queues)
1789 xennet_destroy_queues(info); 1789 xennet_destroy_queues(info);
1790 1790
1791 err = xennet_create_queues(info, num_queues); 1791 err = xennet_create_queues(info, &num_queues);
1792 if (err < 0) 1792 if (err < 0)
1793 goto destroy_ring; 1793 goto destroy_ring;
1794 1794