All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: make some symbols static in tracing_map.c
@ 2020-04-10  7:33 Jason Yan
  2020-04-10 13:44 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Yan @ 2020-04-10  7:33 UTC (permalink / raw)
  To: rostedt, mingo, linux-kernel; +Cc: Jason Yan

Fix the following sparse warning:

kernel/trace/tracing_map.c:286:6: warning: symbol
'tracing_map_array_clear' was not declared. Should it be static?
kernel/trace/tracing_map.c:297:6: warning: symbol
'tracing_map_array_free' was not declared. Should it be static?
kernel/trace/tracing_map.c:319:26: warning: symbol
'tracing_map_array_alloc' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 kernel/trace/tracing_map.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
index 9e31bfc818ff..74738c9856f1 100644
--- a/kernel/trace/tracing_map.c
+++ b/kernel/trace/tracing_map.c
@@ -283,7 +283,7 @@ int tracing_map_add_key_field(struct tracing_map *map,
 	return idx;
 }
 
-void tracing_map_array_clear(struct tracing_map_array *a)
+static void tracing_map_array_clear(struct tracing_map_array *a)
 {
 	unsigned int i;
 
@@ -294,7 +294,7 @@ void tracing_map_array_clear(struct tracing_map_array *a)
 		memset(a->pages[i], 0, PAGE_SIZE);
 }
 
-void tracing_map_array_free(struct tracing_map_array *a)
+static void tracing_map_array_free(struct tracing_map_array *a)
 {
 	unsigned int i;
 
@@ -316,7 +316,7 @@ void tracing_map_array_free(struct tracing_map_array *a)
 	kfree(a);
 }
 
-struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts,
+static struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts,
 						  unsigned int entry_size)
 {
 	struct tracing_map_array *a;
-- 
2.17.2


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

* Re: [PATCH] tracing: make some symbols static in tracing_map.c
  2020-04-10  7:33 [PATCH] tracing: make some symbols static in tracing_map.c Jason Yan
@ 2020-04-10 13:44 ` Steven Rostedt
  2020-04-10 13:55   ` Tom Zanussi
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2020-04-10 13:44 UTC (permalink / raw)
  To: Jason Yan, Tom Zanussi; +Cc: mingo, linux-kernel

Tom,

Care to ack this?

-- Steve


On Fri, 10 Apr 2020 15:33:12 +0800
Jason Yan <yanaijie@huawei.com> wrote:

> Fix the following sparse warning:
> 
> kernel/trace/tracing_map.c:286:6: warning: symbol
> 'tracing_map_array_clear' was not declared. Should it be static?
> kernel/trace/tracing_map.c:297:6: warning: symbol
> 'tracing_map_array_free' was not declared. Should it be static?
> kernel/trace/tracing_map.c:319:26: warning: symbol
> 'tracing_map_array_alloc' was not declared. Should it be static?
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
> ---
>  kernel/trace/tracing_map.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
> index 9e31bfc818ff..74738c9856f1 100644
> --- a/kernel/trace/tracing_map.c
> +++ b/kernel/trace/tracing_map.c
> @@ -283,7 +283,7 @@ int tracing_map_add_key_field(struct tracing_map *map,
>  	return idx;
>  }
>  
> -void tracing_map_array_clear(struct tracing_map_array *a)
> +static void tracing_map_array_clear(struct tracing_map_array *a)
>  {
>  	unsigned int i;
>  
> @@ -294,7 +294,7 @@ void tracing_map_array_clear(struct tracing_map_array *a)
>  		memset(a->pages[i], 0, PAGE_SIZE);
>  }
>  
> -void tracing_map_array_free(struct tracing_map_array *a)
> +static void tracing_map_array_free(struct tracing_map_array *a)
>  {
>  	unsigned int i;
>  
> @@ -316,7 +316,7 @@ void tracing_map_array_free(struct tracing_map_array *a)
>  	kfree(a);
>  }
>  
> -struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts,
> +static struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts,
>  						  unsigned int entry_size)
>  {
>  	struct tracing_map_array *a;


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

* Re: [PATCH] tracing: make some symbols static in tracing_map.c
  2020-04-10 13:44 ` Steven Rostedt
@ 2020-04-10 13:55   ` Tom Zanussi
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Zanussi @ 2020-04-10 13:55 UTC (permalink / raw)
  To: Steven Rostedt, Jason Yan; +Cc: mingo, linux-kernel

On Fri, 2020-04-10 at 09:44 -0400, Steven Rostedt wrote:
> Tom,
> 
> Care to ack this?
> 

Sure,

Reviewed-by: Tom Zanussi <zanussi@kernel.org>

Tom


> -- Steve
> 
> 
> On Fri, 10 Apr 2020 15:33:12 +0800
> Jason Yan <yanaijie@huawei.com> wrote:
> 
> > Fix the following sparse warning:
> > 
> > kernel/trace/tracing_map.c:286:6: warning: symbol
> > 'tracing_map_array_clear' was not declared. Should it be static?
> > kernel/trace/tracing_map.c:297:6: warning: symbol
> > 'tracing_map_array_free' was not declared. Should it be static?
> > kernel/trace/tracing_map.c:319:26: warning: symbol
> > 'tracing_map_array_alloc' was not declared. Should it be static?
> > 
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Jason Yan <yanaijie@huawei.com>
> > ---
> >  kernel/trace/tracing_map.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/kernel/trace/tracing_map.c
> > b/kernel/trace/tracing_map.c
> > index 9e31bfc818ff..74738c9856f1 100644
> > --- a/kernel/trace/tracing_map.c
> > +++ b/kernel/trace/tracing_map.c
> > @@ -283,7 +283,7 @@ int tracing_map_add_key_field(struct
> > tracing_map *map,
> >  	return idx;
> >  }
> >  
> > -void tracing_map_array_clear(struct tracing_map_array *a)
> > +static void tracing_map_array_clear(struct tracing_map_array *a)
> >  {
> >  	unsigned int i;
> >  
> > @@ -294,7 +294,7 @@ void tracing_map_array_clear(struct
> > tracing_map_array *a)
> >  		memset(a->pages[i], 0, PAGE_SIZE);
> >  }
> >  
> > -void tracing_map_array_free(struct tracing_map_array *a)
> > +static void tracing_map_array_free(struct tracing_map_array *a)
> >  {
> >  	unsigned int i;
> >  
> > @@ -316,7 +316,7 @@ void tracing_map_array_free(struct
> > tracing_map_array *a)
> >  	kfree(a);
> >  }
> >  
> > -struct tracing_map_array *tracing_map_array_alloc(unsigned int
> > n_elts,
> > +static struct tracing_map_array *tracing_map_array_alloc(unsigned
> > int n_elts,
> >  						  unsigned int
> > entry_size)
> >  {
> >  	struct tracing_map_array *a;
> 
> 


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

end of thread, other threads:[~2020-04-10 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  7:33 [PATCH] tracing: make some symbols static in tracing_map.c Jason Yan
2020-04-10 13:44 ` Steven Rostedt
2020-04-10 13:55   ` Tom Zanussi

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.