coresight: Few cleanups
cover coresight: Few cleanups
This patchset is just a clean up and should not cause a functional change.
Junhao He (3):
coresight: core: Fix use of uninitialized pointer
coresight: core: Remove unnecessary assignment
coresight: etm4x: core: Remove redundant check of attr
drivers/hwtracing/coresight/coresight-core.c | 3 +-- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 coresight: core: Fix use of uninitialized pointer
From: Junhao He <[email protected]>
Currently the pointer "sink" might be checked before initialized. Fix this by initializing this pointer.
--- drivers/hwtracing/coresight/coresight-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwtracing/coresight/coresight-core.c +1 -1
@@ -608,7 +608,7 @@ static struct coresight_device * coresight_find_enabled_sink(struct coresight_device *csdev) {int i; -struct coresight_device *sink; +struct coresight_device *sink =NULL ; if ((csdev->type == CORESIGHT_DEV_TYPE_SINK || csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) &&
Signature · 1 line
2.7.4
PATCH 2/3 coresight: core: Remove unnecessary assignment
In reply to Qi LiuFrom: Junhao He <[email protected]>
Remove unnecessary assignment of "path" in coresight_release_path().
--- drivers/hwtracing/coresight/coresight-core.c | 1 - 1 file changed, 1 deletion(-)
drivers/hwtracing/coresight/coresight-core.c +0 -1
@@ -886,7 +886,6 @@ void coresight_release_path(struct list_head *path) }kfree (path); - path =NULL ; }/* return true if the device is a suitable type for a default sink */
Signature · 1 line
2.7.4
PATCH 3/3 coresight: etm4x: core: Remove redundant check of attr
In reply to Qi LiuFrom: Junhao He <[email protected]>
"attr" is checked by perf framework, so remove the redundant check in etm4_parse_event_config().
--- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/hwtracing/coresight/coresight-etm4x-core.c +0 -5
@@ -568,11 +568,6 @@ static int etm4_parse_event_config(struct etmv4_drvdata *drvdata,struct etmv4_config *config = &drvdata->config;struct perf_event_attr *attr = &event->attr; -if (!attr) { - ret = -EINVAL ; - goto out; - } -/* Clear configuration from previous run */ memset (config,0 ,sizeof (struct etmv4_config ));
Signature · 1 line
2.7.4
Suzuki K Poulose
maintainerQuoted 11 lines · Qi Liu
This patchset is just a clean up and should not cause a functional change.
Junhao He (3):
coresight: core: Fix use of uninitialized pointer
coresight: core: Remove unnecessary assignment
coresight: etm4x: core: Remove redundant check of attrdrivers/hwtracing/coresight/coresight-core.c | 3 +-- drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-)
Thanks for the cleanups. I will queue them
Suzuki