Thread (8 messages) 8 messages, 4 authors, 2025-05-15

Re: [PATCH v3] cpufreq: scmi: Skip SCMI devices that aren't used by the CPUs

From: Sudeep Holla <hidden>
Date: 2025-05-07 13:12:41
Also in: arm-scmi, linux-pm, lkml

On Wed, May 07, 2025 at 12:59:45PM +0100, Cristian Marussi wrote:
On Mon, Apr 28, 2025 at 07:47:28AM -0700, Mike Tipton wrote:
quoted
+static bool scmi_dev_used_by_cpus(struct device *scmi_dev)
+{
+	struct device_node *scmi_np = dev_of_node(scmi_dev);
+	struct device_node *np;
+	struct device *cpu_dev;
+	int cpu, idx;
+
+	if (!scmi_np)
+		return false;
+
+	for_each_possible_cpu(cpu) {
+		cpu_dev = get_cpu_device(cpu);
+		if (!cpu_dev)
+			continue;
+
+		np = dev_of_node(cpu_dev);
+
+		if (of_parse_phandle(np, "clocks", 0) == scmi_np)
Shouldn't this, on Success, be released by an of_node_put() (or, BETTER,
by some OF-related cleanup.h magic...)
Good catch, I missed this.

With the above issue fixed, you can add and post new version:
Reviewed-by: Sudeep Holla <redacted>

I will drop this patch now that you need to fix and repost. Also Viresh
may be away, so better to route via his tree when he is back as I can't
take it without his ack. I was holding off my PR for this, but I will
send SCMI PR without this now.

-- 
Regards,
Sudeep
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help