All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: lustre: obdclass: Declare function as static
@ 2016-02-12  6:23 Bhumika Goyal
  2016-02-12  6:50 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-12  6:23 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: Bhumika Goyal

Declare the function cache_stats_print as static since it is used
only  in this file. Used grep to find occurences. Problem found using
sparse.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index 57c8d54..f118983 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -362,7 +362,8 @@ void cache_stats_init(struct cache_stats *cs, const char *name)
 		atomic_set(&cs->cs_stats[i], 0);
 }
 
-int cache_stats_print(const struct cache_stats *cs, struct seq_file *m, int h)
+static int cache_stats_print(const struct cache_stats *cs,
+			     struct seq_file *m, int h)
 {
 	int i;
 	/*
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging: lustre: obdclass: Declare function as static
  2016-02-12  6:23 [PATCH] Staging: lustre: obdclass: Declare function as static Bhumika Goyal
@ 2016-02-12  6:50 ` Julia Lawall
  2016-02-13  6:37   ` Bhumika Goyal
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-02-12  6:50 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Fri, 12 Feb 2016, Bhumika Goyal wrote:

> Declare the function cache_stats_print as static since it is used
> only  in this file. Used grep to find occurences. Problem found using
> sparse.

Good idea. You may also find some functions that are simply not used at 
all.

julia

> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/lustre/lustre/obdclass/cl_object.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
> index 57c8d54..f118983 100644
> --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
> @@ -362,7 +362,8 @@ void cache_stats_init(struct cache_stats *cs, const char *name)
>  		atomic_set(&cs->cs_stats[i], 0);
>  }
>  
> -int cache_stats_print(const struct cache_stats *cs, struct seq_file *m, int h)
> +static int cache_stats_print(const struct cache_stats *cs,
> +			     struct seq_file *m, int h)
>  {
>  	int i;
>  	/*
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455258208-7768-1-git-send-email-bhumirks%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 


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

* Re: [Outreachy kernel] [PATCH] Staging: lustre: obdclass: Declare function as static
  2016-02-12  6:50 ` [Outreachy kernel] " Julia Lawall
@ 2016-02-13  6:37   ` Bhumika Goyal
  0 siblings, 0 replies; 3+ messages in thread
From: Bhumika Goyal @ 2016-02-13  6:37 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: bhumirks


[-- Attachment #1.1: Type: text/plain, Size: 80 bytes --]

I am surely sending some patches for removing unused functions.
Thanks,
Bhumika

[-- Attachment #1.2: Type: text/html, Size: 110 bytes --]

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

end of thread, other threads:[~2016-02-13  6:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-12  6:23 [PATCH] Staging: lustre: obdclass: Declare function as static Bhumika Goyal
2016-02-12  6:50 ` [Outreachy kernel] " Julia Lawall
2016-02-13  6:37   ` Bhumika Goyal

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.