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


Groups > linux.kernel > #1538130 > unrolled thread

[PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header

Started byOleg Drokin <green@linuxhacker.ru>
First post2016-12-07 23:50 +0100
Last post2016-12-08 01:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
    Re: [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a  header James Simmons <jsimmons@infradead.org> - 2016-12-08 01:30 +0100

#1538130 — [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header
Message-ID<sLTcd-6aD-1@gated-at.bofh.it>
This avoids frowned upon extern in the C file, and also
shuts down a sparse warning of
drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static?

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/osc/osc_internal.h | 2 ++
 drivers/staging/lustre/lustre/osc/osc_request.c  | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h
index 688783d..5cce82b 100644
--- a/drivers/staging/lustre/lustre/osc/osc_internal.h
+++ b/drivers/staging/lustre/lustre/osc/osc_internal.h
@@ -181,6 +181,8 @@ static inline struct osc_device *obd2osc_dev(const struct obd_device *d)
 	return container_of0(d->obd_lu_dev, struct osc_device, od_cl.cd_lu_dev);
 }
 
+extern struct lu_kmem_descr osc_caches[];
+
 extern struct kmem_cache *osc_quota_kmem;
 struct osc_quota_info {
 	/** linkage for quota hash table */
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 7143564..f691297 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -2766,8 +2766,6 @@ static struct obd_ops osc_obd_ops = {
 	.quotactl       = osc_quotactl,
 };
 
-extern struct lu_kmem_descr osc_caches[];
-
 static int __init osc_init(void)
 {
 	struct lprocfs_static_vars lvars = { NULL };
-- 
2.7.4

[toc] | [next] | [standalone]


#1538212 — Re: [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:30 +0100
SubjectRe: [PATCH 5/8] staging/lustre/osc: extern declare osc_caches in a header
Message-ID<sLUL0-7jL-21@gated-at.bofh.it>
In reply to#1538130
> This avoids frowned upon extern in the C file, and also
> shuts down a sparse warning of
> drivers/staging/lustre/lustre/osc/osc_dev.c:55:22: warning: symbol 'osc_caches' was not declared. Should it be static?

Reviewed-by: James Simmons <jsimmons@infradead.org>
 
> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/osc/osc_internal.h | 2 ++
>  drivers/staging/lustre/lustre/osc/osc_request.c  | 2 --
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h
> index 688783d..5cce82b 100644
> --- a/drivers/staging/lustre/lustre/osc/osc_internal.h
> +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h
> @@ -181,6 +181,8 @@ static inline struct osc_device *obd2osc_dev(const struct obd_device *d)
>  	return container_of0(d->obd_lu_dev, struct osc_device, od_cl.cd_lu_dev);
>  }
>  
> +extern struct lu_kmem_descr osc_caches[];
> +
>  extern struct kmem_cache *osc_quota_kmem;
>  struct osc_quota_info {
>  	/** linkage for quota hash table */
> diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
> index 7143564..f691297 100644
> --- a/drivers/staging/lustre/lustre/osc/osc_request.c
> +++ b/drivers/staging/lustre/lustre/osc/osc_request.c
> @@ -2766,8 +2766,6 @@ static struct obd_ops osc_obd_ops = {
>  	.quotactl       = osc_quotactl,
>  };
>  
> -extern struct lu_kmem_descr osc_caches[];
> -
>  static int __init osc_init(void)
>  {
>  	struct lprocfs_static_vars lvars = { NULL };
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web