Skip to contentSkip to conversation

sunrpc: Give parameter names to rpc_count_iostasts_metrics()

PATCH In review Anna Schumaker 2 participants 3 messages Feb 9, 2015

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

PATCH 1/1 sunrpc: Give parameter names to rpc_count_iostasts_metrics()

We fall back to an empty function in the case that CONFIG_PROC_FS=n, so give this function named parameters to silence a "parameter name omitted" warning.

---
 include/linux/sunrpc/metrics.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/sunrpc/metrics.h +2 -2
index 7e61a17..b23b8ed 100644
@@ -89,8 +89,8 @@ void			rpc_free_iostats(struct rpc_iostats *);
 static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
 static inline void rpc_count_iostats(const struct rpc_task *task,
 				     struct rpc_iostats *stats) {}
-static inline void rpc_count_iostats_metrics(const struct rpc_task *,
-					     struct rpc_iostats *) {}
+static inline void rpc_count_iostats_metrics(const struct rpc_task *task,
+					     struct rpc_iostats *op_metrics) {}
 static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
 static inline void rpc_free_iostats(struct rpc_iostats *stats) {}
 
Signature · 1 line
2.3.0
#1 lore raw
Quoted 18 lines · Anna Schumaker

We fall back to an empty function in the case that CONFIG_PROC_FS=n, so give this function named parameters to silence a "parameter name omitted" warning.

---
include/linux/sunrpc/metrics.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/sunrpc/metrics.h +0 -0
index 7e61a17..b23b8ed 100644

include/linux/sunrpc/metrics.h void rpc_free_iostats(struct rpc_iostats *); · line 91

Quoted 3 lines
include/linux/sunrpc/metrics.h +0 -0
@@ -89,8 +89,8 @@ void			rpc_free_iostats(struct rpc_iostats *);
 static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
 static inline void rpc_count_iostats(const struct rpc_task *task,
 				     struct rpc_iostats *stats) {}

Hi Anna,

Why doesn’t the above also emit the warning?

Thanks,
Tom

Quoted 14 lines
include/linux/sunrpc/metrics.h +2 -2
-static inline void rpc_count_iostats_metrics(const struct rpc_task *,
-					     struct rpc_iostats *) {}
+static inline void rpc_count_iostats_metrics(const struct rpc_task *task,
+					     struct rpc_iostats *op_metrics) {}
 static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
 static inline void rpc_free_iostats(struct rpc_iostats *stats) {}
 
Signature · 6 lines
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 24 lines · Tom Haynes
Quoted 18 lines · Anna Schumaker

We fall back to an empty function in the case that CONFIG_PROC_FS=n, so give this function named parameters to silence a "parameter name omitted" warning.

---
include/linux/sunrpc/metrics.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/sunrpc/metrics.h +0 -0
index 7e61a17..b23b8ed 100644

include/linux/sunrpc/metrics.h void rpc_free_iostats(struct rpc_iostats *); · line 91

Quoted 3 lines
include/linux/sunrpc/metrics.h +0 -0
@@ -89,8 +89,8 @@ void			rpc_free_iostats(struct rpc_iostats *);
 static inline struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt) { return NULL; }
 static inline void rpc_count_iostats(const struct rpc_task *task,
 				     struct rpc_iostats *stats) {}

Hi Anna,

Quoted 1 line

Why doesn’t the above also emit the warning?

Because the parameters have names: in rpc_count_iostats you have an rpc_task named "task" and an rpc_iostats named "stats".

Anna

Quoted 20 lines

Thanks,
Tom

Quoted 14 lines
include/linux/sunrpc/metrics.h +2 -2
-static inline void rpc_count_iostats_metrics(const struct rpc_task *,
-					     struct rpc_iostats *) {}
+static inline void rpc_count_iostats_metrics(const struct rpc_task *task,
+					     struct rpc_iostats *op_metrics) {}
 static inline void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) {}
 static inline void rpc_free_iostats(struct rpc_iostats *stats) {}
 
Signature · 6 lines
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html