diff mbox

sunrpc: Give parameter names to rpc_count_iostasts_metrics()

Message ID 1423508838-1806-1-git-send-email-Anna.Schumaker@Netapp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Schumaker, Anna Feb. 9, 2015, 7:07 p.m. UTC
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.

Reported-by: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
---
 include/linux/sunrpc/metrics.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Haynes Feb. 9, 2015, 9:30 p.m. UTC | #1
> On Feb 9, 2015, at 11:07 AM, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
> 
> 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.
> 
> Reported-by: Jim Davis <jim.epost@gmail.com>
> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
> ---
> include/linux/sunrpc/metrics.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h
> index 7e61a17..b23b8ed 100644
> --- a/include/linux/sunrpc/metrics.h
> +++ b/include/linux/sunrpc/metrics.h
> @@ -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


> -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) {}
> 
> -- 
> 2.3.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Schumaker, Anna Feb. 9, 2015, 9:31 p.m. UTC | #2
On 02/09/2015 04:30 PM, Tom Haynes wrote:
> 
>> On Feb 9, 2015, at 11:07 AM, Anna Schumaker <Anna.Schumaker@netapp.com> wrote:
>>
>> 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.
>>
>> Reported-by: Jim Davis <jim.epost@gmail.com>
>> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
>> ---
>> include/linux/sunrpc/metrics.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h
>> index 7e61a17..b23b8ed 100644
>> --- a/include/linux/sunrpc/metrics.h
>> +++ b/include/linux/sunrpc/metrics.h
>> @@ -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?

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

Anna

> 
> Thanks,
> Tom
> 
> 
>> -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) {}
>>
>> -- 
>> 2.3.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

Patch

diff --git a/include/linux/sunrpc/metrics.h b/include/linux/sunrpc/metrics.h
index 7e61a17..b23b8ed 100644
--- a/include/linux/sunrpc/metrics.h
+++ b/include/linux/sunrpc/metrics.h
@@ -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) {}