Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1710385 > unrolled thread

[PATCH] virtio-net: make array guest_offloads static

Started byColin King <colin.king@canonical.com>
First post2017-08-12 23:50 +0200
Last post2017-08-14 05:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] virtio-net: make array guest_offloads static Colin King <colin.king@canonical.com> - 2017-08-12 23:50 +0200
    Re: [PATCH] virtio-net: make array guest_offloads static David Miller <davem@davemloft.net> - 2017-08-14 05:20 +0200

#1710385 — [PATCH] virtio-net: make array guest_offloads static

FromColin King <colin.king@canonical.com>
Date2017-08-12 23:50 +0200
Subject[PATCH] virtio-net: make array guest_offloads static
Message-ID<udMs9-6nR-13@gated-at.bofh.it>
From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/net/virtio_net.c | 10 ++++++----
 1 file 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;
-- 
2.11.0

[toc] | [next] | [standalone]


#1710620

FromDavid Miller <davem@davemloft.net>
Date2017-08-14 05:20 +0200
Message-ID<uee54-7hJ-5@gated-at.bofh.it>
In reply to#1710385
From: Colin King <colin.king@canonical.com>
Date: Sat, 12 Aug 2017 22:45:53 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> 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>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web