linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH -next] coresight: etm: perf: Make symbol 'format_attr_contextid' static
  2021-03-08 12:32 [PATCH -next] coresight: etm: perf: Make symbol 'format_attr_contextid' static 'Wei Yongjun
@ 2021-03-08 12:31 ` Suzuki K Poulose
  0 siblings, 0 replies; 2+ messages in thread
From: Suzuki K Poulose @ 2021-03-08 12:31 UTC (permalink / raw)
  To: 'Wei Yongjun, Mathieu Poirier, Alexander Shishkin
  Cc: coresight, linux-arm-kernel, linux-kernel, Hulk Robot

On 3/8/21 12:32 PM, 'Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
> 
> The sparse tool complains as follows:
> 
> drivers/hwtracing/coresight/coresight-etm-perf.c:61:25: warning:
>   symbol 'format_attr_contextid' was not declared. Should it be static?
> 
> This symbol is not used outside of coresight-etm-perf.c, so this
> commit marks it static.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

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

* [PATCH -next] coresight: etm: perf: Make symbol 'format_attr_contextid' static
@ 2021-03-08 12:32 'Wei Yongjun
  2021-03-08 12:31 ` Suzuki K Poulose
  0 siblings, 1 reply; 2+ messages in thread
From: 'Wei Yongjun @ 2021-03-08 12:32 UTC (permalink / raw)
  To: weiyongjun1, Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin
  Cc: coresight, linux-arm-kernel, linux-kernel, Hulk Robot

From: Wei Yongjun <weiyongjun1@huawei.com>

The sparse tool complains as follows:

drivers/hwtracing/coresight/coresight-etm-perf.c:61:25: warning:
 symbol 'format_attr_contextid' was not declared. Should it be static?

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

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index 0f603b4094f2..bdbb77334329 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -58,7 +58,7 @@ static ssize_t format_attr_contextid_show(struct device *dev,
 	return sprintf(page, "config:%d\n", pid_fmt);
 }
 
-struct device_attribute format_attr_contextid =
+static struct device_attribute format_attr_contextid =
 	__ATTR(contextid, 0444, format_attr_contextid_show, NULL);
 
 static struct attribute *etm_config_formats_attr[] = {


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

end of thread, other threads:[~2021-03-08 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 12:32 [PATCH -next] coresight: etm: perf: Make symbol 'format_attr_contextid' static 'Wei Yongjun
2021-03-08 12:31 ` Suzuki K Poulose

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).