[PATCH -next] coresight: etm-perf: Mark format_attr_contextid with static keyword

Subsystems: arm/coresight framework and drivers, hardware tracing facilities, the rest

STALE1962d

3 messages, 3 authors, 2021-03-23 · open the first message on its own page

[PATCH -next] coresight: etm-perf: Mark format_attr_contextid with static keyword

From: Zou Wei <hidden>
Date: 2021-03-23 07:09:37

Fix the following sparse warning:

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

Signed-off-by: Zou Wei <redacted>
---
 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[] = {
-- 
2.17.1


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

Re: [PATCH -next] coresight: etm-perf: Mark format_attr_contextid with static keyword

From: Leo Yan <hidden>
Date: 2021-03-23 07:20:30

On Tue, Mar 23, 2021 at 07:54:52AM +0000, Zou Wei wrote:
Fix the following sparse warning:

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

Signed-off-by: Zou Wei <redacted>
Reviewed-by: Leo Yan <redacted>
quoted hunk
---
 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[] = {
-- 
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH -next] coresight: etm-perf: Mark format_attr_contextid with static keyword

From: Suzuki K Poulose <suzuki.poulose@arm.com>
Date: 2021-03-23 09:48:57

On 23/03/2021 07:54, Zou Wei wrote:
Fix the following sparse warning:

drivers/hwtracing/coresight/coresight-etm-perf.c:61:25: warning: symbol
'format_attr_contextid' was not declared. Should it be static?
A fix is already queued in coresight/next.

Thanks

Suzuki

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help