summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-08-12 23:45:53 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-14 05:09:49 +0200
commit7acd43296889a71ecf9c20498465f672e667a9ad (patch)
tree67679e4566a398f3ed6a7b366c3d0488a4df9061
parentof_mdio: merge branch tails in of_phy_register_fixed_link() (diff)
downloadlinux-7acd43296889a71ecf9c20498465f672e667a9ad.tar.xz
linux-7acd43296889a71ecf9c20498465f672e667a9ad.zip
virtio-net: make array guest_offloads static
The array guest_offloads is local to the source and does not need to be in global scope, so make it static. Also tweak formatting. Cleans up sparse warnings: symbol 'guest_offloads' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/virtio_net.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e90de2186ffc..a3f3c66b4530 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -57,10 +57,12 @@ DECLARE_EWMA(pkt_len, 0, 64)
#define VIRTNET_DRIVER_VERSION "1.0.0"
-const unsigned long guest_offloads[] = { VIRTIO_NET_F_GUEST_TSO4,
- VIRTIO_NET_F_GUEST_TSO6,
- VIRTIO_NET_F_GUEST_ECN,
- VIRTIO_NET_F_GUEST_UFO };
+static const unsigned long guest_offloads[] = {
+ VIRTIO_NET_F_GUEST_TSO4,
+ VIRTIO_NET_F_GUEST_TSO6,
+ VIRTIO_NET_F_GUEST_ECN,
+ VIRTIO_NET_F_GUEST_UFO
+};
struct virtnet_stats {
struct u64_stats_sync tx_syncp;