* [PATCH] virtio-net: make array guest_offloads static
@ 2017-08-12 21:45 Colin King
2017-08-14 3:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-08-12 21:45 UTC (permalink / raw)
To: Michael S . Tsirkin, Jason Wang, virtualization, netdev
Cc: kernel-janitors, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio-net: make array guest_offloads static
2017-08-12 21:45 [PATCH] virtio-net: make array guest_offloads static Colin King
@ 2017-08-14 3:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-14 3:10 UTC (permalink / raw)
To: colin.king; +Cc: mst, netdev, kernel-janitors, linux-kernel, virtualization
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 3:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12 21:45 [PATCH] virtio-net: make array guest_offloads static Colin King
2017-08-14 3:10 ` David Miller
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).