hyperv: fix sparse warnings
Subsystems (3)
PATCH 1/1 hyperv: fix sparse warnings
From: "Lad, Prabhakar" <[email protected]>
this patch fixes following sparse warnings:
netvsc.c:688:5: warning: symbol 'netvsc_copy_to_send_buf' was not declared. Should it be static? rndis_filter.c:627:5: warning: symbol 'rndis_filter_set_offload_params' was not declared. Should it be static? rndis_filter.c:702:5: warning: symbol 'rndis_filter_set_rss_param' was not declared. Should it be static?
---
Found this issue on linux-next (gcc version 4.9.2, sparse version 0.4.5-rc1) and applies on top linux-next.
drivers/net/hyperv/netvsc.c | 6 +++--- drivers/net/hyperv/rndis_filter.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/net/hyperv/netvsc.c +3 -3
@@ -685,9 +685,9 @@ static u32 netvsc_get_next_send_section(struct netvsc_device *net_device)return ret_val; } -u32 netvsc_copy_to_send_buf (struct netvsc_device *net_device, -unsigned int section_index, -struct hv_netvsc_packet *packet) +static u32 netvsc_copy_to_send_buf (struct netvsc_device *net_device, +unsigned int section_index, +struct hv_netvsc_packet *packet) {char *start = net_device->send_buf;char *dest = (start + (section_index * net_device->send_section_size));
drivers/net/hyperv/rndis_filter.c +3 -2
@@ -624,7 +624,8 @@ cleanup:return ret; } -int rndis_filter_set_offload_params (struct hv_device *hdev, +static int +rndis_filter_set_offload_params (struct hv_device *hdev,struct ndis_offload_params *req_offloads) {struct netvsc_device *nvdev =hv_get_drvdata (hdev);
@@ -699,7 +700,7 @@ u8 netvsc_hash_key[HASH_KEYLEN] = { 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa }; -int rndis_filter_set_rss_param (struct rndis_device *rdev,int num_queue) +static int rndis_filter_set_rss_param (struct rndis_device *rdev,int num_queue) {struct net_device *ndev = rdev->net_dev->ndev;struct rndis_request *request;
Signature · 1 line
1.9.1
Haiyang Zhang
maintainerQuoted 13 lines
-----Original Message-----
From: Lad Prabhakar [mailto:[email protected]]
Sent: Thursday, February 5, 2015 10:07 AM
To: KY Srinivasan; Haiyang Zhang; [email protected]
Cc: [email protected]; [email protected]; Lad, Prabhakar
Subject: [PATCH] hyperv: fix sparse warningsFrom: "Lad, Prabhakar" <[email protected]>
this patch fixes following sparse warnings:
Quoted 8 lines
netvsc.c:688:5: warning: symbol '
netvsc_copy_to_send_buf' was not declared. Should it be static?
rndis_filter.c:627:5: warning: symbol 'rndis_filter_set_offload_params' was not declared. Should it be static?
rndis_filter.c:702:5: warning: symbol 'rndis_filter_set_rss_param' was not declared. Should it be static?Signed-off-by Lad, Prabhakar <[email protected]>
Thanks.
From: Lad Prabhakar <[email protected]>
Date: Thu, 5 Feb 2015 15:06:33 +0000
Quoted 9 lines
From: "Lad, Prabhakar" <[email protected]>
this patch fixes following sparse warnings:
netvsc.c:688:5: warning: symbol '
netvsc_copy_to_send_buf' was not declared. Should it be static? rndis_filter.c:627:5: warning: symbol 'rndis_filter_set_offload_params' was not declared. Should it be static? rndis_filter.c:702:5: warning: symbol 'rndis_filter_set_rss_param' was not declared. Should it be static?Signed-off-by Lad, Prabhakar <[email protected]>
Applied.