Skip to content

Commit

Permalink
Merge tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm…
Browse files Browse the repository at this point in the history
…/linux/kernel/git/coresight/linux into char-misc-next

Suzuki writes:

coresight: Updates for v6.11

Coresight/hwtracing subsystem updates targeting v6.11 includes a few minor
fixes and cleanups

Signed-off-by: Suzuki K Poulose <[email protected]>

* tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
  hwtracing: use for_each_endpoint_of_node()
  coresight: constify the struct device_type usage
  coresight: tmc: Remove duplicated include in coresight-tmc-core.c
  coresight: Fix ref leak when of_coresight_parse_endpoint() fails
  • Loading branch information
gregkh committed Jul 3, 2024
2 parents 7254a29 + 2e5657a commit 7269d76
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions drivers/hwtracing/coresight/coresight-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev,
*/
if (!parent) {
/*
* Avoid warnings in of_graph_get_next_endpoint()
* Avoid warnings in for_each_endpoint_of_node()
* if the device doesn't have any graph connections
*/
if (!of_graph_is_present(node))
Expand All @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev,
}

/* Iterate through each output port to discover topology */
while ((ep = of_graph_get_next_endpoint(parent, ep))) {
for_each_endpoint_of_node(parent, ep) {
/*
* Legacy binding mixes input/output ports under the
* same parent. So, skip the input ports if we are dealing
Expand All @@ -297,8 +297,10 @@ static int of_get_coresight_platform_data(struct device *dev,
continue;

ret = of_coresight_parse_endpoint(dev, ep, pdata);
if (ret)
if (ret) {
of_node_put(ep);
return ret;
}
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/pm_runtime.h>

extern struct mutex coresight_mutex;
extern struct device_type coresight_dev_type[];
extern const struct device_type coresight_dev_type[];

/*
* Coresight management registers (0xf00-0xfcc)
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwtracing/coresight/coresight-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static struct attribute *coresight_source_attrs[] = {
};
ATTRIBUTE_GROUPS(coresight_source);

struct device_type coresight_dev_type[] = {
const struct device_type coresight_dev_type[] = {
[CORESIGHT_DEV_TYPE_SINK] = {
.name = "sink",
.groups = coresight_sink_groups,
Expand Down
1 change: 0 additions & 1 deletion drivers/hwtracing/coresight/coresight-tmc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/coresight.h>
#include <linux/amba/bus.h>
#include <linux/platform_device.h>
#include <linux/acpi.h>

#include "coresight-priv.h"
#include "coresight-tmc.h"
Expand Down

0 comments on commit 7269d76

Please sign in to comment.