Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1485777 > unrolled thread

[PATCH] staging: lustre: lmv: add missing function declaration

Started byBaoyou Xie <baoyou.xie@linaro.org>
First post2016-09-18 13:50 +0200
Last post2016-09-18 23:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: lustre: lmv: add missing function declaration Baoyou Xie <baoyou.xie@linaro.org> - 2016-09-18 13:50 +0200
    Re: [PATCH] staging: lustre: lmv: add missing function declaration James Simmons <jsimmons@infradead.org> - 2016-09-18 21:50 +0200
      Re: [PATCH] staging: lustre: lmv: add missing function declaration James Simmons <jsimmons@infradead.org> - 2016-09-18 23:00 +0200
      Re: [PATCH] staging: lustre: lmv: add missing function declaration Arnd Bergmann <arnd@arndb.de> - 2016-09-18 23:10 +0200

#1485777 — [PATCH] staging: lustre: lmv: add missing function declaration

FromBaoyou Xie <baoyou.xie@linaro.org>
Date2016-09-18 13:50 +0200
Subject[PATCH] staging: lustre: lmv: add missing function declaration
Message-ID<siILD-7Ab-3@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1485931

FromJames Simmons <jsimmons@infradead.org>
Date2016-09-18 21:50 +0200
Message-ID<siQg9-3OY-25@gated-at.bofh.it>
In reply to#1485777
> 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
> 
> 

[toc] | [prev] | [next] | [standalone]


#1486039

FromJames Simmons <jsimmons@infradead.org>
Date2016-09-18 23:00 +0200
Message-ID<siRlV-4w1-79@gated-at.bofh.it>
In reply to#1485931
> 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.

[toc] | [prev] | [next] | [standalone]


#1486043

FromArnd Bergmann <arnd@arndb.de>
Date2016-09-18 23:10 +0200
Message-ID<siRlV-4w1-81@gated-at.bofh.it>
In reply to#1485931
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web