Skip to contentSkip to conversation

Staging: lustre: ptlrpc: Declare functions as static

PATCH In review Shraddha Barke 2 participants 2 messages Oct 1, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: lustre: ptlrpc: Declare functions as static

Declare function as static since it is accessed from this particular file only. Also remove it's declaration from header file

---
 drivers/staging/lustre/lustre/include/lustre_sec.h | 1 -
 drivers/staging/lustre/lustre/ptlrpc/sec_config.c  | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/lustre/lustre/include/lustre_sec.h +0 -1
index 707ff69..3b38b5e 100644
@@ -330,7 +330,6 @@ static inline void sptlrpc_rule_set_init(struct sptlrpc_rule_set *set)
 	memset(set, 0, sizeof(*set));
 }
 
-void sptlrpc_rule_set_free(struct sptlrpc_rule_set *set);
 int  sptlrpc_rule_set_expand(struct sptlrpc_rule_set *set);
 int  sptlrpc_rule_set_merge(struct sptlrpc_rule_set *set,
 			    struct sptlrpc_rule *rule);
drivers/staging/lustre/lustre/ptlrpc/sec_config.c +1 -2
index e7f2f33..d3bee4b 100644
@@ -236,7 +236,7 @@ int sptlrpc_parse_rule(char *param, struct sptlrpc_rule *rule)
 }
 EXPORT_SYMBOL(sptlrpc_parse_rule);
 
-void sptlrpc_rule_set_free(struct sptlrpc_rule_set *rset)
+static void sptlrpc_rule_set_free(struct sptlrpc_rule_set *rset)
 {
 	LASSERT(rset->srs_nslot ||
 		(rset->srs_nrule == 0 && rset->srs_rules == NULL));
@@ -246,7 +246,6 @@ void sptlrpc_rule_set_free(struct sptlrpc_rule_set *rset)
 		sptlrpc_rule_set_init(rset);
 	}
 }
-EXPORT_SYMBOL(sptlrpc_rule_set_free);
 
 /*
  * return 0 if the rule set could accommodate one more rule.
Signature · 1 line
2.1.4
#1 lore raw
Quoted 5 lines · On Thursday 01 October 2015 19:00:28 Shraddha Barke wrote:

Declare function as static since it is accessed from this particular file only. Also remove it's declaration from header file

The patch looks good to me, but the subject line should be more specific. There are other functions that need to be changed the same way, and we want each subject line to be unique.

Arnd