linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPVS: ip_vs_ftp.c: local functions should not be exposed globally
@ 2012-04-26 18:17 ` H Hartley Sweeten
  2012-04-27  1:01   ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2012-04-26 18:17 UTC (permalink / raw)
  To: Linux Kernel; +Cc: netdev, davem

Functions not referenced outside of a source file should be marked
static to prevent it from being exposed globally.

This quiets the sparse warnings:

warning: symbol 'ip_vs_ftp_init' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: "David S. Miller" <davem@davemloft.net>

---

diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index debb8c7..091bec9 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -483,7 +483,7 @@ static struct pernet_operations ip_vs_ftp_ops = {
 	.exit = __ip_vs_ftp_exit,
 };
 
-int __init ip_vs_ftp_init(void)
+static int __init ip_vs_ftp_init(void)
 {
 	int rv;
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] IPVS: ip_vs_proto.c: local functions should not be exposed globally
@ 2012-04-26 18:26 H Hartley Sweeten
  2012-04-26 18:17 ` [PATCH] IPVS: ip_vs_ftp.c: " H Hartley Sweeten
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2012-04-26 18:26 UTC (permalink / raw)
  To: Linux Kernel; +Cc: netdev, davem

Functions not referenced outside of a source file should be marked
static to prevent it from being exposed globally.

This quiets the sparse warnings:

warning: symbol '__ipvs_proto_data_get' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: "David S. Miller" <davem@davemloft.net>

---

diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 6eda11d..d5d1d92 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -153,7 +153,7 @@ EXPORT_SYMBOL(ip_vs_proto_get);
 /*
  *	get ip_vs_protocol object data by netns and proto
  */
-struct ip_vs_proto_data *
+static struct ip_vs_proto_data *
 __ipvs_proto_data_get(struct netns_ipvs *ipvs, unsigned short proto)
 {
 	struct ip_vs_proto_data *pd;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] IPVS: ip_vs_ftp.c: local functions should not be exposed globally
  2012-04-26 18:17 ` [PATCH] IPVS: ip_vs_ftp.c: " H Hartley Sweeten
@ 2012-04-27  1:01   ` Simon Horman
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Horman @ 2012-04-27  1:01 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, netdev, davem

On Thu, Apr 26, 2012 at 11:17:28AM -0700, H Hartley Sweeten wrote:
> Functions not referenced outside of a source file should be marked
> static to prevent it from being exposed globally.
> 
> This quiets the sparse warnings:
> 
> warning: symbol 'ip_vs_ftp_init' was not declared. Should it be static?

On Thu, Apr 26, 2012 at 11:26:15AM -0700, H Hartley Sweeten wrote:
> Functions not referenced outside of a source file should be marked
> static to prevent it from being exposed globally.
> 
> This quiets the sparse warnings:
> 
> warning: symbol '__ipvs_proto_data_get' was not declared. Should it be static?
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: "David S. Miller" <davem@davemloft.net>

Thanks, I have applied these to ipvs-next.

git://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs-next.git

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-27  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-26 18:26 [PATCH] IPVS: ip_vs_proto.c: local functions should not be exposed globally H Hartley Sweeten
2012-04-26 18:17 ` [PATCH] IPVS: ip_vs_ftp.c: " H Hartley Sweeten
2012-04-27  1:01   ` Simon Horman

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).