[ovs-dev,net-next] openvswitch: Make local function ovs_nsh_key_attr_size() static

Message ID 1510640823-115387-1-git-send-email-weiyongjun1@huawei.com
State New
Headers show
Series
  • [ovs-dev,net-next] openvswitch: Make local function ovs_nsh_key_attr_size() static
Related show

Commit Message

Wei Yongjun Nov. 14, 2017, 6:27 a.m.
Fixes the following sparse warnings:

net/openvswitch/flow_netlink.c:340:8: warning:
 symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/openvswitch/flow_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pravin Shelar Nov. 14, 2017, 10:57 a.m. | #1
On Tue, Nov 14, 2017 at 11:57 AM, Wei Yongjun <weiyongjun1@huawei.com> wrote:
> Fixes the following sparse warnings:
>
> net/openvswitch/flow_netlink.c:340:8: warning:
>  symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static?
>
Acked-by: Pravin B Shelar <pshelar@ovn.org>


> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  net/openvswitch/flow_netlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index 4201f92..d79c364 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> @@ -337,7 +337,7 @@ size_t ovs_tun_key_attr_size(void)
>                 + nla_total_size(4);   /* OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS */
>  }
>
> -size_t ovs_nsh_key_attr_size(void)
> +static size_t ovs_nsh_key_attr_size(void)
>  {
>         /* Whenever adding new OVS_NSH_KEY_ FIELDS, we should consider
>          * updating this function.
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
David Miller Nov. 14, 2017, 1:02 p.m. | #2
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Tue, 14 Nov 2017 06:27:03 +0000

> Fixes the following sparse warnings:
> 
> net/openvswitch/flow_netlink.c:340:8: warning:
>  symbol 'ovs_nsh_key_attr_size' was not declared. Should it be static?
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

Patch

diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
index 4201f92..d79c364 100644
--- a/net/openvswitch/flow_netlink.c
+++ b/net/openvswitch/flow_netlink.c
@@ -337,7 +337,7 @@  size_t ovs_tun_key_attr_size(void)
 		+ nla_total_size(4);   /* OVS_TUNNEL_KEY_ATTR_ERSPAN_OPTS */
 }
 
-size_t ovs_nsh_key_attr_size(void)
+static size_t ovs_nsh_key_attr_size(void)
 {
 	/* Whenever adding new OVS_NSH_KEY_ FIELDS, we should consider
 	 * updating this function.