coresight: tmc: mark coresight_tmc_groups with static
PATCH 1/1 coresight: tmc: mark coresight_tmc_groups with static
From: Chunyan Zhang <[email protected]>
Sparse reports a warning like:drivers/hwtracing/coresight/coresight-tmc.c:364:30: warning: symbol 'coresight_tmc_groups' was not declared. Should it be static? [sparse]
coresight_tmc_groups is used in the local file only, so it should be marked with static.
--- drivers/hwtracing/coresight/coresight-tmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-tmc.c +1 -1
@@ -361,7 +361,7 @@ static ssize_t buffer_size_store(struct device *dev, .name = "mgmt", }; -const struct attribute_group *coresight_tmc_groups[] = { +static const struct attribute_group *coresight_tmc_groups[] = { &coresight_tmc_group, &coresight_tmc_mgmt_group,NULL ,
Signature · 1 line
1.9.1
Hi Chunyan,
Quoted 19 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Sparse reports a warning like:
drivers/hwtracing/coresight/coresight-tmc.c:364:30: warning: symbol 'coresight_tmc_groups' was not declared. Should it be static? [sparse]
coresight_tmc_groupsis used in the local file only, so it should be marked with static.Signed-off-by Chunyan Zhang <[email protected]>--- drivers/hwtracing/coresight/coresight-tmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwtracing/coresight/coresight-tmc.c +0
-0
drivers/hwtracing/coresight/coresight-tmc.c static ssize_t buffer_size_store(struct device *dev, · line 364
Quoted 5 lines
drivers/hwtracing/coresight/coresight-tmc.c +1
-1@@ -361,7 +361,7 @@ static ssize_t buffer_size_store(struct device *dev, .name = "mgmt", }; -const struct attribute_group *coresight_tmc_groups[] = { +static const struct attribute_group *coresight_tmc_groups[] = {
This has already been addressed by Stephen [1] earlier in this cycle. It is currently in linux-next and will be submitted for inclusion in the next cycle.
Thanks,
Mathieu
[1]. https://www.spinics.net/lists/arm-kernel/msg801714.html
Quoted 6 lines
drivers/hwtracing/coresight/coresight-tmc.c +0
-0&coresight_tmc_group, &coresight_tmc_mgmt_group, NULL,Signature · 1 line
1.9.1
Quoted 32 lines · Mathieu Poirier
Hi Chunyan,
Quoted 19 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Sparse reports a warning like:
drivers/hwtracing/coresight/coresight-tmc.c:364:30: warning: symbol 'coresight_tmc_groups' was not declared. Should it be static? [sparse]
coresight_tmc_groupsis used in the local file only, so it should be marked with static.Signed-off-by Chunyan Zhang <[email protected]>--- drivers/hwtracing/coresight/coresight-tmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwtracing/coresight/coresight-tmc.c +0
-0drivers/hwtracing/coresight/coresight-tmc.c static ssize_t buffer_size_store(struct device *dev, · line 364
Quoted 5 lines
drivers/hwtracing/coresight/coresight-tmc.c +1
-1@@ -361,7 +361,7 @@ static ssize_t buffer_size_store(struct device *dev, .name = "mgmt", }; -const struct attribute_group *coresight_tmc_groups[] = { +static const struct attribute_group *coresight_tmc_groups[] = {This has already been addressed by Stephen [1] earlier in this cycle. It is currently in linux-next and will be submitted for inclusion in the next cycle.
Quoted 4 lines
Thanks,
Mathieu[1]. https://www.spinics.net/lists/arm-kernel/msg801714.html
It is better, I will backport this patch。
Thanks Mathieu!
Quoted 7 lines
Quoted 7 lines
drivers/hwtracing/coresight/coresight-tmc.c +0
-1&coresight_tmc_group, &coresight_tmc_mgmt_group, NULL, --1.9.1
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel