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


Groups > linux.kernel > #1538134 > unrolled thread

[PATCH 6/8] staging/lustre: Declare lu_context/session_tags_default

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 6/8] staging/lustre: Declare lu_context/session_tags_default Oleg Drokin <green@linuxhacker.ru> - 2016-12-07 23:50 +0100
    Re: [PATCH 6/8] staging/lustre: Declare  lu_context/session_tags_default James Simmons <jsimmons@infradead.org> - 2016-12-08 01:30 +0100

#1538134 — [PATCH 6/8] staging/lustre: Declare lu_context/session_tags_default

FromOleg Drokin <green@linuxhacker.ru>
Date2016-12-07 23:50 +0100
Subject[PATCH 6/8] staging/lustre: Declare lu_context/session_tags_default
Message-ID<sLTcd-6aD-19@gated-at.bofh.it>
Make the declaration in a header, not as an extern in a C file,
that is frowned upon.
This also makes sparse a little bit more happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lu_object.h  | 3 +++
 drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h
index 260643e..69b2812 100644
--- a/drivers/staging/lustre/lustre/include/lu_object.h
+++ b/drivers/staging/lustre/lustre/include/lu_object.h
@@ -1326,5 +1326,8 @@ void lu_buf_realloc(struct lu_buf *buf, size_t size);
 int lu_buf_check_and_grow(struct lu_buf *buf, size_t len);
 struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, size_t len);
 
+extern __u32 lu_context_tags_default;
+extern __u32 lu_session_tags_default;
+
 /** @} lu */
 #endif /* __LUSTRE_LU_OBJECT_H */
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index f5d4e23..703cb67 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -54,6 +54,7 @@
 #include <linux/list.h>
 #include "../../include/linux/libcfs/libcfs_hash.h"	/* for cfs_hash stuff */
 #include "../include/cl_object.h"
+#include "../include/lu_object.h"
 #include "cl_internal.h"
 
 static struct kmem_cache *cl_env_kmem;
@@ -61,8 +62,6 @@ static struct kmem_cache *cl_env_kmem;
 /** Lock class of cl_object_header::coh_attr_guard */
 static struct lock_class_key cl_attr_guard_class;
 
-extern __u32 lu_context_tags_default;
-extern __u32 lu_session_tags_default;
 /**
  * Initialize cl_object_header.
  */
-- 
2.7.4

[toc] | [next] | [standalone]


#1538208 — Re: [PATCH 6/8] staging/lustre: Declare lu_context/session_tags_default

FromJames Simmons <jsimmons@infradead.org>
Date2016-12-08 01:30 +0100
SubjectRe: [PATCH 6/8] staging/lustre: Declare lu_context/session_tags_default
Message-ID<sLUL0-7jL-5@gated-at.bofh.it>
In reply to#1538134
> Make the declaration in a header, not as an extern in a C file,
> that is frowned upon.
> This also makes sparse a little bit more happy.
> 

Reviewed-by: James Simmons <jsimmons@infradead.org>

> Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
> ---
>  drivers/staging/lustre/lustre/include/lu_object.h  | 3 +++
>  drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 +--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h
> index 260643e..69b2812 100644
> --- a/drivers/staging/lustre/lustre/include/lu_object.h
> +++ b/drivers/staging/lustre/lustre/include/lu_object.h
> @@ -1326,5 +1326,8 @@ void lu_buf_realloc(struct lu_buf *buf, size_t size);
>  int lu_buf_check_and_grow(struct lu_buf *buf, size_t len);
>  struct lu_buf *lu_buf_check_and_alloc(struct lu_buf *buf, size_t len);
>  
> +extern __u32 lu_context_tags_default;
> +extern __u32 lu_session_tags_default;
> +
>  /** @} lu */
>  #endif /* __LUSTRE_LU_OBJECT_H */
> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
> index f5d4e23..703cb67 100644
> --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
> @@ -54,6 +54,7 @@
>  #include <linux/list.h>
>  #include "../../include/linux/libcfs/libcfs_hash.h"	/* for cfs_hash stuff */
>  #include "../include/cl_object.h"
> +#include "../include/lu_object.h"
>  #include "cl_internal.h"
>  
>  static struct kmem_cache *cl_env_kmem;
> @@ -61,8 +62,6 @@ static struct kmem_cache *cl_env_kmem;
>  /** Lock class of cl_object_header::coh_attr_guard */
>  static struct lock_class_key cl_attr_guard_class;
>  
> -extern __u32 lu_context_tags_default;
> -extern __u32 lu_session_tags_default;
>  /**
>   * Initialize cl_object_header.
>   */
> -- 
> 2.7.4
> 
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web