linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] coresight: core: Make symbol 'csdev_sink' static
@ 2021-04-09  1:32 Wei Yongjun
  2021-04-09  9:05 ` Anshuman Khandual
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2021-04-09  1:32 UTC (permalink / raw)
  To: weiyongjun1, Anshuman Khandual, Mathieu Poirier,
	Suzuki K Poulose, Alexander Shishkin
  Cc: coresight, linux-arm-kernel, linux-kernel, kernel-janitors, Hulk Robot

The sparse tool complains as follows:

drivers/hwtracing/coresight/coresight-core.c:26:1: warning:
 symbol '__pcpu_scope_csdev_sink' was not declared. Should it be static?

This symbol is not used outside of coresight-core.c, so this
commit marks it static.

Fixes: 2cd87a7b293d ("coresight: core: Add support for dedicated percpu sinks")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/hwtracing/coresight/coresight-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
index 3e779e1619ed..6c68d34d956e 100644
--- a/drivers/hwtracing/coresight/coresight-core.c
+++ b/drivers/hwtracing/coresight/coresight-core.c
@@ -23,7 +23,7 @@
 #include "coresight-priv.h"
 
 static DEFINE_MUTEX(coresight_mutex);
-DEFINE_PER_CPU(struct coresight_device *, csdev_sink);
+static DEFINE_PER_CPU(struct coresight_device *, csdev_sink);
 
 /**
  * struct coresight_node - elements of a path, from source to sink


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH -next] coresight: core: Make symbol 'csdev_sink' static
  2021-04-09  1:32 [PATCH -next] coresight: core: Make symbol 'csdev_sink' static Wei Yongjun
@ 2021-04-09  9:05 ` Anshuman Khandual
  0 siblings, 0 replies; 2+ messages in thread
From: Anshuman Khandual @ 2021-04-09  9:05 UTC (permalink / raw)
  To: Wei Yongjun, Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: coresight, linux-arm-kernel, linux-kernel, kernel-janitors, Hulk Robot



On 4/9/21 7:02 AM, Wei Yongjun wrote:
> The sparse tool complains as follows:
> 
> drivers/hwtracing/coresight/coresight-core.c:26:1: warning:
>  symbol '__pcpu_scope_csdev_sink' was not declared. Should it be static?
> 
> This symbol is not used outside of coresight-core.c, so this
> commit marks it static.

commit ? It is not on the tree yet. s/commit/change instead.

> 
> Fixes: 2cd87a7b293d ("coresight: core: Add support for dedicated percpu sinks")

There is no functional problem that this patch is proposing to fix
and hence the "Fixes:" tag is not warranted. Suzuki/Matihieu ?

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/hwtracing/coresight/coresight-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 3e779e1619ed..6c68d34d956e 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -23,7 +23,7 @@
>  #include "coresight-priv.h"
>  
>  static DEFINE_MUTEX(coresight_mutex);
> -DEFINE_PER_CPU(struct coresight_device *, csdev_sink);
> +static DEFINE_PER_CPU(struct coresight_device *, csdev_sink);
>  
>  /**
>   * struct coresight_node - elements of a path, from source to sink
> 

Otherwise LGTM. As csdev_sink is not being used outside coresight-core.c
file after the introduction of coresight_[set|get]_percpu_sink() helpers.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-04-09  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09  1:32 [PATCH -next] coresight: core: Make symbol 'csdev_sink' static Wei Yongjun
2021-04-09  9:05 ` Anshuman Khandual

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).