* [PATCH] staging: lustre: lmv: add missing function declaration
@ 2016-09-18 11:39 Baoyou Xie
2016-09-18 19:43 ` James Simmons
0 siblings, 1 reply; 4+ messages in thread
From: Baoyou Xie @ 2016-09-18 11:39 UTC (permalink / raw)
To: oleg.drokin, andreas.dilger, jsimmons, gregkh, di.wang,
john.hammond, fan.yong
Cc: lustre-devel, devel, linux-kernel, arnd, baoyou.xie, xie.baoyou
We get 1 warning when building kernel with W=1:
drivers/staging/lustre/lustre/lmv/lmv_obd.c:2774:5: warning: no previous prototype for 'lmv_pack_md' [-Wmissing-prototypes]
In fact, this function is not declared in any file,but should be
declared in a header file, thus can be recognized in other file.
So this patch adds the declarations into
drivers/staging/lustre/lustre/include/lustre_lmv.h.
Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
---
drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/lustre/lustre/include/lustre_lmv.h b/drivers/staging/lustre/lustre/include/lustre_lmv.h
index 085e596..21302c7 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lmv.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lmv.h
@@ -119,3 +119,5 @@ static inline void lmv_le_to_cpu(union lmv_mds_md *lmv_dst,
}
+int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
+ int stripe_count);
#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lustre: lmv: add missing function declaration
2016-09-18 11:39 [PATCH] staging: lustre: lmv: add missing function declaration Baoyou Xie
@ 2016-09-18 19:43 ` James Simmons
2016-09-18 20:35 ` Arnd Bergmann
0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2016-09-18 19:43 UTC (permalink / raw)
To: Baoyou Xie
Cc: oleg.drokin, andreas.dilger, gregkh, di.wang, john.hammond,
fan.yong, lustre-devel, devel, linux-kernel, arnd, xie.baoyou
> We get 1 warning when building kernel with W=1:
> drivers/staging/lustre/lustre/lmv/lmv_obd.c:2774:5: warning: no previous prototype for 'lmv_pack_md' [-Wmissing-prototypes]
>
> In fact, this function is not declared in any file,but should be
> declared in a header file, thus can be recognized in other file.
>
> So this patch adds the declarations into
> drivers/staging/lustre/lustre/include/lustre_lmv.h.
>
> Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
> ---
> drivers/staging/lustre/lustre/include/lustre_lmv.h | 2 ++
> 1 file changed, 2 insertions(+)
Nak. I'm not seeing this error with W=1. Also if you look
lmv_pack_md() is only used in lmv_obd.c and the function
appears early in the file before it is used, so no prototype
missing errors should happen.
> diff --git a/drivers/staging/lustre/lustre/include/lustre_lmv.h b/drivers/staging/lustre/lustre/include/lustre_lmv.h
> index 085e596..21302c7 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_lmv.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_lmv.h
> @@ -119,3 +119,5 @@ static inline void lmv_le_to_cpu(union lmv_mds_md *lmv_dst,
> }
>
> +int lmv_pack_md(union lmv_mds_md **lmmp, const struct lmv_stripe_md *lsm,
> + int stripe_count);
> #endif
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lustre: lmv: add missing function declaration
2016-09-18 19:43 ` James Simmons
@ 2016-09-18 20:35 ` Arnd Bergmann
2016-09-18 20:53 ` James Simmons
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-09-18 20:35 UTC (permalink / raw)
To: James Simmons
Cc: Baoyou Xie, oleg.drokin, andreas.dilger, gregkh, di.wang,
john.hammond, fan.yong, lustre-devel, devel, linux-kernel,
xie.baoyou
On Sunday, September 18, 2016 8:43:18 PM CEST James Simmons wrote:
>
> Nak. I'm not seeing this error with W=1. Also if you look
> lmv_pack_md() is only used in lmv_obd.c and the function
> appears early in the file before it is used, so no prototype
> missing errors should happen.
So it should be marked "static" and the EXPORT_SYMBOL() removed,
right?
Arnd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: lustre: lmv: add missing function declaration
2016-09-18 20:35 ` Arnd Bergmann
@ 2016-09-18 20:53 ` James Simmons
0 siblings, 0 replies; 4+ messages in thread
From: James Simmons @ 2016-09-18 20:53 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Baoyou Xie, oleg.drokin, andreas.dilger, gregkh, di.wang,
john.hammond, fan.yong, lustre-devel, devel, linux-kernel,
xie.baoyou
> On Sunday, September 18, 2016 8:43:18 PM CEST James Simmons wrote:
> >
> > Nak. I'm not seeing this error with W=1. Also if you look
> > lmv_pack_md() is only used in lmv_obd.c and the function
> > appears early in the file before it is used, so no prototype
> > missing errors should happen.
>
> So it should be marked "static" and the EXPORT_SYMBOL() removed,
> right?
Already done. See patch
[PATCH 109/124] staging: lustre: misc: remove unnecessary EXPORT_SYMBOL
which is from Frank Zago which I just pushed to Greg.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-18 21:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-18 11:39 [PATCH] staging: lustre: lmv: add missing function declaration Baoyou Xie
2016-09-18 19:43 ` James Simmons
2016-09-18 20:35 ` Arnd Bergmann
2016-09-18 20:53 ` James Simmons
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).