<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/opp, branch v5.10.154</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.10.154</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.10.154'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2022-08-21T13:16:04Z</updated>
<entry>
<title>opp: Fix error check in dev_pm_opp_attach_genpd()</title>
<updated>2022-08-21T13:16:04Z</updated>
<author>
<name>Tang Bin</name>
<email>tangbin@cmss.chinamobile.com</email>
</author>
<published>2022-05-24T12:31:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e2a4e46f52584e43cd0d9866752b51f588cc1173'/>
<id>urn:sha1:e2a4e46f52584e43cd0d9866752b51f588cc1173</id>
<content type='text'>
[ Upstream commit 4ea9496cbc959eb5c78f3e379199aca9ef4e386b ]

dev_pm_domain_attach_by_name() may return NULL in some cases,
so IS_ERR() doesn't meet the requirements. Thus fix it.

Fixes: 6319aee10e53 ("opp: Attach genpds to devices from within OPP core")
Signed-off-by: Tang Bin &lt;tangbin@cmss.chinamobile.com&gt;
[ Viresh: Replace ENODATA with ENODEV ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>OPP: call of_node_put() on error path in _bandwidth_supported()</title>
<updated>2022-06-09T08:21:18Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2022-04-06T06:40:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e0faa14316b96f0556748f00e5aae3ce6c1f5f4'/>
<id>urn:sha1:0e0faa14316b96f0556748f00e5aae3ce6c1f5f4</id>
<content type='text'>
[ Upstream commit 907ed123b9d096c73e9361f6cd4097f0691497f2 ]

This code does not call of_node_put(opp_np) if of_get_next_available_child()
returns NULL.  But it should.

Fixes: 45679f9b508f ("opp: Don't parse icc paths unnecessarily")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Fix return in _opp_add_static_v2()</title>
<updated>2021-11-18T13:04:22Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2021-10-08T07:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=14943891857da24abe5bba4fa132986eb7842713'/>
<id>urn:sha1:14943891857da24abe5bba4fa132986eb7842713</id>
<content type='text'>
[ Upstream commit 27ff8187f13ecfec8a26fb1928e906f46f326cc5 ]

Fix sparse warning:
drivers/opp/of.c:924 _opp_add_static_v2() warn: passing zero to 'ERR_PTR'

For duplicate OPPs 'ret' be set to zero.

Fixes: deac8703da5f ("PM / OPP: _of_add_opp_table_v2(): increment count only if OPP is added")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Don't print an error if required-opps is missing</title>
<updated>2021-09-18T11:40:29Z</updated>
<author>
<name>Rajendra Nayak</name>
<email>rnayak@codeaurora.org</email>
</author>
<published>2021-08-12T11:27:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a99eec36ed39f7717827d15aeb329fe0e17396e5'/>
<id>urn:sha1:a99eec36ed39f7717827d15aeb329fe0e17396e5</id>
<content type='text'>
[ Upstream commit 020d86fc0df8b865f6dc168d88a7c2dccabd0a9e ]

The 'required-opps' property is considered optional, hence remove
the pr_err() in of_parse_required_opp() when we find the property is
missing.
While at it, also fix the return value of
of_get_required_opp_performance_state() when of_parse_required_opp()
fails, return a -ENODEV instead of the -EINVAL.

Signed-off-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Reviewed-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: remove WARN when no valid OPPs remain</title>
<updated>2021-09-03T08:09:26Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2021-07-26T08:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3dea931590389de002718d388117584f65035664'/>
<id>urn:sha1:3dea931590389de002718d388117584f65035664</id>
<content type='text'>
[ Upstream commit 335ffab3ef864539e814b9a2903b0ae420c1c067 ]

This WARN can be triggered per-core and the stack trace is not useful.
Replace it with plain dev_err(). Fix a comment while at it.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Correct debug message in _opp_add_static_v2()</title>
<updated>2021-03-04T10:37:27Z</updated>
<author>
<name>Dmitry Osipenko</name>
<email>digetx@gmail.com</email>
</author>
<published>2021-01-18T00:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=276d6b35f3bc0c5985b3a452d0f06cf0c4ffe84f'/>
<id>urn:sha1:276d6b35f3bc0c5985b3a452d0f06cf0c4ffe84f</id>
<content type='text'>
[ Upstream commit d7b9d9b31a3e55dcc9b5c289abfafe31efa5b5c4 ]

The debug message always prints rate=0 instead of a proper value, fix it.

Fixes: 6c591eec67cb ("OPP: Add helpers for reading the binding properties")
Tested-by: Peter Geis &lt;pgwipeout@gmail.com&gt;
Tested-by: Nicolas Chauvet &lt;kwizart@gmail.com&gt;
Tested-by: Matt Merhar &lt;mattmerhar@protonmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
[ Viresh: Added Fixes tag ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Call the missing clk_put() on error</title>
<updated>2021-01-06T13:56:49Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-12-28T05:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1a58c171a523d2224fe12fb26fc459231f245b0d'/>
<id>urn:sha1:1a58c171a523d2224fe12fb26fc459231f245b0d</id>
<content type='text'>
commit 0e1d9ca1766f5d95fb881f57b6c4a1ffa63d4648 upstream.

Fix the clock reference counting by calling the missing clk_put() in the
error path.

Cc: v5.10 &lt;stable@vger.kernel.org&gt; # v5.10
Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>opp: fix memory leak in _allocate_opp_table</title>
<updated>2021-01-06T13:56:49Z</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2020-12-24T10:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e8322837a2e56d6b8d4b87d81292805948991e2c'/>
<id>urn:sha1:e8322837a2e56d6b8d4b87d81292805948991e2c</id>
<content type='text'>
commit 976509bb310b913d30577f15b58bdd30effb0542 upstream.

In function _allocate_opp_table, opp_dev is allocated and referenced
by opp_table via _add_opp_dev. But in the case that the subsequent calls
return -EPROBE_DEFER, it will jump to err label and opp_table will be
freed. Then opp_dev becomes an unreferenced object to cause memory leak.
So let's call _remove_opp_dev to do the cleanup.

This fixes the following kmemleak report:

unreferenced object 0xffff000801524a00 (size 128):
  comm "swapper/0", pid 1, jiffies 4294892465 (age 84.616s)
  hex dump (first 32 bytes):
    40 00 56 01 08 00 ff ff 40 00 56 01 08 00 ff ff  @.V.....@.V.....
    b8 52 77 7f 08 00 ff ff 00 3c 4c 00 08 00 ff ff  .Rw......&lt;L.....
  backtrace:
    [&lt;00000000b1289fb1&gt;] kmemleak_alloc+0x30/0x40
    [&lt;0000000056da48f0&gt;] kmem_cache_alloc+0x3d4/0x588
    [&lt;00000000a84b3b0e&gt;] _add_opp_dev+0x2c/0x88
    [&lt;0000000062a380cd&gt;] _add_opp_table_indexed+0x124/0x268
    [&lt;000000008b4c8f1f&gt;] dev_pm_opp_of_add_table+0x20/0x1d8
    [&lt;00000000e5316798&gt;] dev_pm_opp_of_cpumask_add_table+0x48/0xf0
    [&lt;00000000db0a8ec2&gt;] dt_cpufreq_probe+0x20c/0x448
    [&lt;0000000030a3a26c&gt;] platform_probe+0x68/0xd8
    [&lt;00000000c618e78d&gt;] really_probe+0xd0/0x3a0
    [&lt;00000000642e856f&gt;] driver_probe_device+0x58/0xb8
    [&lt;00000000f10f5307&gt;] device_driver_attach+0x74/0x80
    [&lt;0000000004f254b8&gt;] __driver_attach+0x58/0xe0
    [&lt;0000000009d5d19e&gt;] bus_for_each_dev+0x70/0xc8
    [&lt;0000000000d22e1c&gt;] driver_attach+0x24/0x30
    [&lt;0000000001d4e952&gt;] bus_add_driver+0x14c/0x1f0
    [&lt;0000000089928aaa&gt;] driver_register+0x64/0x120

Cc: v5.10 &lt;stable@vger.kernel.org&gt; # v5.10
Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
[ Viresh: Added the stable tag ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>opp: Reduce the size of critical section in _opp_table_kref_release()</title>
<updated>2020-10-27T07:51:03Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-22T06:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0df59de670b48a923246fae1f972317b84b2764'/>
<id>urn:sha1:e0df59de670b48a923246fae1f972317b84b2764</id>
<content type='text'>
There is a lot of stuff here which can be done outside of the big
opp_table_lock, do that. This helps avoiding few circular dependency
lockdeps around debugfs and interconnects.

Reported-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reported-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Fix early exit from dev_pm_opp_register_set_opp_helper()</title>
<updated>2020-10-27T05:08:28Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-20T10:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=47efcbcb340cca5d3b3d515964f09e1fec599a29'/>
<id>urn:sha1:47efcbcb340cca5d3b3d515964f09e1fec599a29</id>
<content type='text'>
We returned earlier by mistake even when there were no failures. Fix it.

Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.com&gt;
</content>
</entry>
</feed>
