Skip to contentSkip to conversation

sunrpc/auth_gss: fix sparse warnings for gss_mech_switch

PATCH In review Silviu-Mihai Popescu 2 participants 2 messages Feb 21, 2013

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunrpc/auth_gss: fix sparse warnings for gss_mech_switch

This fixes the following sparse warnings:
* net/sunrpc/auth_gss/gss_mech_switch.c:143:21: warning: symbol
'_gss_mech_get_by_name' was not declared. Should it be static?
* net/sunrpc/auth_gss/gss_mech_switch.c:208:21: warning: symbol
'_gss_mech_get_by_pseudoflavor' was not declared. Should it be static?

---
 net/sunrpc/auth_gss/gss_mech_switch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/auth_gss/gss_mech_switch.c +2 -2
index b174fcd..f0f4eee 100644
@@ -140,7 +140,7 @@ gss_mech_get(struct gss_api_mech *gm)
 
 EXPORT_SYMBOL_GPL(gss_mech_get);
 
-struct gss_api_mech *
+static struct gss_api_mech *
 _gss_mech_get_by_name(const char *name)
 {
 	struct gss_api_mech	*pos, *gm = NULL;
@@ -205,7 +205,7 @@ mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
 	return 0;
 }
 
-struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
+static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
 {
 	struct gss_api_mech *gm = NULL, *pos;
 
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 25 lines · Silviu-Mihai Popescu

This fixes the following sparse warnings:
* net/sunrpc/auth_gss/gss_mech_switch.c:143:21: warning: symbol
'_gss_mech_get_by_name' was not declared. Should it be static?
* net/sunrpc/auth_gss/gss_mech_switch.c:208:21: warning: symbol
'_gss_mech_get_by_pseudoflavor' was not declared. Should it be static?

---
 net/sunrpc/auth_gss/gss_mech_switch.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/auth_gss/gss_mech_switch.c +1 -1
index b174fcd..f0f4eee 100644
@@ -140,7 +140,7 @@ gss_mech_get(struct gss_api_mech *gm)
 
 EXPORT_SYMBOL_GPL(gss_mech_get);
 
-struct gss_api_mech *
+static struct gss_api_mech *
 _gss_mech_get_by_name(const char *name)
 {
 	struct gss_api_mech	*pos, *gm = NULL;

net/sunrpc/auth_gss/gss_mech_switch.c mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor) · line 211

Quoted 8 lines
net/sunrpc/auth_gss/gss_mech_switch.c +1 -1
@@ -205,7 +205,7 @@ mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
 	return 0;
 }
 
-struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
+static struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
 {
 	struct gss_api_mech *gm = NULL, *pos;
 

This is identical to commit c5f5e9c5d2e9178fb0bfe4f44f0afcc8ad6488ef (SUNRPC: Add missing static declaration to _gss_mech_get_by_name) which is already upstream.

Cheers
Trond

Signature · 6 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com