Commit 58472a76 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

virtio: net: remove sparse errors

commit 3fa2a1df (virtio-net: per cpu 64 bit stats (v2)) added extra
__percpu qualifiers and sparse errors.
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fafdbf84
...@@ -255,7 +255,7 @@ static int receive_mergeable(struct virtnet_info *vi, struct sk_buff *skb) ...@@ -255,7 +255,7 @@ static int receive_mergeable(struct virtnet_info *vi, struct sk_buff *skb)
static void receive_buf(struct net_device *dev, void *buf, unsigned int len) static void receive_buf(struct net_device *dev, void *buf, unsigned int len)
{ {
struct virtnet_info *vi = netdev_priv(dev); struct virtnet_info *vi = netdev_priv(dev);
struct virtnet_stats __percpu *stats = this_cpu_ptr(vi->stats); struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
struct sk_buff *skb; struct sk_buff *skb;
struct page *page; struct page *page;
struct skb_vnet_hdr *hdr; struct skb_vnet_hdr *hdr;
...@@ -549,7 +549,7 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi) ...@@ -549,7 +549,7 @@ static unsigned int free_old_xmit_skbs(struct virtnet_info *vi)
{ {
struct sk_buff *skb; struct sk_buff *skb;
unsigned int len, tot_sgs = 0; unsigned int len, tot_sgs = 0;
struct virtnet_stats __percpu *stats = this_cpu_ptr(vi->stats); struct virtnet_stats *stats = this_cpu_ptr(vi->stats);
while ((skb = virtqueue_get_buf(vi->svq, &len)) != NULL) { while ((skb = virtqueue_get_buf(vi->svq, &len)) != NULL) {
pr_debug("Sent skb %p\n", skb); pr_debug("Sent skb %p\n", skb);
...@@ -688,8 +688,7 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev, ...@@ -688,8 +688,7 @@ static struct rtnl_link_stats64 *virtnet_stats(struct net_device *dev,
unsigned int start; unsigned int start;
for_each_possible_cpu(cpu) { for_each_possible_cpu(cpu) {
struct virtnet_stats __percpu *stats struct virtnet_stats *stats = per_cpu_ptr(vi->stats, cpu);
= per_cpu_ptr(vi->stats, cpu);
u64 tpackets, tbytes, rpackets, rbytes; u64 tpackets, tbytes, rpackets, rbytes;
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment