All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] Staging: lustre: Remove extern in .c file
@ 2015-03-02 22:03 Haneen Mohammed
  2015-03-03 17:03 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Haneen Mohammed @ 2015-03-02 22:03 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes extern from .c file; for The variable is not used
anywhere else in the file.
Issue addressed by checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v4: remove extern declaration from .h

 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
index d20d277..3d264e9 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
@@ -141,8 +141,6 @@
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
 	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Outreachy kernel] [PATCH v4] Staging: lustre: Remove extern in .c file
  2015-03-02 22:03 [PATCH v4] Staging: lustre: Remove extern in .c file Haneen Mohammed
@ 2015-03-03 17:03 ` Greg KH
  2015-03-21  5:51   ` [PATCH v5] Staging: lustre: remove " Haneen Mohammed
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2015-03-03 17:03 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: outreachy-kernel

On Tue, Mar 03, 2015 at 01:03:00AM +0300, Haneen Mohammed wrote:
> This patch removes extern from .c file; for The variable is not used
> anywhere else in the file.
> Issue addressed by checkpatch.pl.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
> ---
> v4: remove extern declaration from .h
> 
>  drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> index d20d277..3d264e9 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
> @@ -141,8 +141,6 @@
>   */
>  #define LDLM_POOL_SLV_SHIFT (10)
>  
> -extern struct proc_dir_entry *ldlm_ns_proc_dir;
> -
>  static inline __u64 dru(__u64 val, __u32 shift, int round_up)
>  {
>  	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;

Please also mark it static in the one file it is in in the same patch.

thanks,

greg k-h


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v5] Staging: lustre: remove extern in .c file
  2015-03-03 17:03 ` [Outreachy kernel] " Greg KH
@ 2015-03-21  5:51   ` Haneen Mohammed
  0 siblings, 0 replies; 3+ messages in thread
From: Haneen Mohammed @ 2015-03-21  5:51 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Haneen Mohammed

This patch removes extern from .c file; for the variable is not used
anywhere else in the file.
In addition, it mark it static in the one file it is in
"ldlm_resource.c".

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
v5: mark struct as static
v4: remove extern instead of adding its declaration to .h

 drivers/staging/lustre/lustre/ldlm/ldlm_pool.c     | 2 --
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
index 7574502..a9f4833 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c
@@ -141,8 +141,6 @@
  */
 #define LDLM_POOL_SLV_SHIFT (10)
 
-extern struct proc_dir_entry *ldlm_ns_proc_dir;
-
 static inline __u64 dru(__u64 val, __u32 shift, int round_up)
 {
 	return (val + (round_up ? (1 << shift) - 1 : 0)) >> shift;
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index c6f62a9..f750d42 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -62,7 +62,7 @@ LIST_HEAD(ldlm_cli_active_namespace_list);
 LIST_HEAD(ldlm_cli_inactive_namespace_list);
 
 struct proc_dir_entry *ldlm_type_proc_dir = NULL;
-struct proc_dir_entry *ldlm_ns_proc_dir = NULL;
+static struct proc_dir_entry *ldlm_ns_proc_dir = NULL;
 struct proc_dir_entry *ldlm_svc_proc_dir = NULL;
 
 extern unsigned int ldlm_cancel_unused_locks_before_replay;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-21 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02 22:03 [PATCH v4] Staging: lustre: Remove extern in .c file Haneen Mohammed
2015-03-03 17:03 ` [Outreachy kernel] " Greg KH
2015-03-21  5:51   ` [PATCH v5] Staging: lustre: remove " Haneen Mohammed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.