<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwspinlock/sprd_hwspinlock.c, branch v6.0-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwspinlock: sprd: Use struct_size() helper in devm_kzalloc()</title>
<updated>2022-03-11T20:56:57+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2022-01-25T22:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a41358972eb35e6e45327035a67adfa4a223ed2'/>
<id>9a41358972eb35e6e45327035a67adfa4a223ed2</id>
<content type='text'>
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Also, address the following sparse warnings:
drivers/hwspinlock/sprd_hwspinlock.c:96:36: warning: using sizeof on a flexible structure

Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220125225723.GA78256@embeddedor
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make use of the struct_size() helper instead of an open-coded version,
in order to avoid any potential type mistakes or integer overflows that,
in the worst scenario, could lead to heap overflows.

Also, address the following sparse warnings:
drivers/hwspinlock/sprd_hwspinlock.c:96:36: warning: using sizeof on a flexible structure

Link: https://github.com/KSPP/linux/issues/174
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20220125225723.GA78256@embeddedor
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'</title>
<updated>2020-11-18T03:42:13+00:00</updated>
<author>
<name>Chunyan Zhang</name>
<email>chunyan.zhang@unisoc.com</email>
</author>
<published>2020-11-12T07:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8266b809264caa23038ceab2811fc452cf936e84'/>
<id>8266b809264caa23038ceab2811fc452cf936e84</id>
<content type='text'>
The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this
case Clang compiler would complain the of_device_id variable is unused.

Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this
case Clang compiler would complain the of_device_id variable is unused.

Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: d8c8bbbb1aba ("hwspinlock: sprd: Add hardware spinlock driver")
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
Link: https://lore.kernel.org/r/20201112070410.14810-1-zhang.lyra@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: use module_platform_driver() instead postcore initcall</title>
<updated>2020-11-03T00:04:06+00:00</updated>
<author>
<name>Chunyan Zhang</name>
<email>chunyan.zhang@unisoc.com</email>
</author>
<published>2020-10-30T03:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8308678ebde1cbca9fb628ba2e7b6e4ea0b15acf'/>
<id>8308678ebde1cbca9fb628ba2e7b6e4ea0b15acf</id>
<content type='text'>
The hardware spinlock devices are defined in the DT, there's no need for
init calls order, remove boilerplate code by using module_platform_driver.

Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
Link: https://lore.kernel.org/r/20201030034654.15775-3-zhang.lyra@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hardware spinlock devices are defined in the DT, there's no need for
init calls order, remove boilerplate code by using module_platform_driver.

Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Signed-off-by: Chunyan Zhang &lt;chunyan.zhang@unisoc.com&gt;
Link: https://lore.kernel.org/r/20201030034654.15775-3-zhang.lyra@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Remove redundant header files</title>
<updated>2020-10-26T15:17:54+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linux.alibaba.com</email>
</author>
<published>2020-06-01T06:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3116a9931fa6fa067986a2cb0cc447c58530b1f0'/>
<id>3116a9931fa6fa067986a2cb0cc447c58530b1f0</id>
<content type='text'>
Remove redundant header files.

Signed-off-by: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/1590991552-93643-1-git-send-email-baolin.wang@linux.alibaba.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove redundant header files.

Signed-off-by: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/1590991552-93643-1-git-send-email-baolin.wang@linux.alibaba.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Remove redundant PM runtime implementation</title>
<updated>2019-11-09T00:42:11+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2019-10-14T07:07:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4d0c1c57329ac2db987160aa55ffdca479181dbe'/>
<id>4d0c1c57329ac2db987160aa55ffdca479181dbe</id>
<content type='text'>
Since the hwspinlock core has changed the PM runtime to be optional, thus
remove the redundant PM runtime implementation in the Spreadtrum hwlock
driver.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the hwspinlock core has changed the PM runtime to be optional, thus
remove the redundant PM runtime implementation in the Spreadtrum hwlock
driver.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Use devm_hwspin_lock_register() to register hwlock controller</title>
<updated>2019-10-05T04:10:26+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2019-09-27T07:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b674a30bf8b0edf3b966e32dfcb2e00dfca5a823'/>
<id>b674a30bf8b0edf3b966e32dfcb2e00dfca5a823</id>
<content type='text'>
Use devm_hwspin_lock_register() to register the hwlock controller instead of
unregistering the hwlock controller explicitly when removing the device.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use devm_hwspin_lock_register() to register the hwlock controller instead of
unregistering the hwlock controller explicitly when removing the device.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()</title>
<updated>2019-10-05T04:09:52+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2019-09-27T07:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4d64193d41e52a5d35923bc5a0772d9de250092'/>
<id>b4d64193d41e52a5d35923bc5a0772d9de250092</id>
<content type='text'>
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(),
which can simplify the error handling.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(),
which can simplify the error handling.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Check the return value of clk_prepare_enable()</title>
<updated>2019-10-05T04:07:44+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2019-09-27T07:10:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3070c41643609c66d33de3577fc9d8ca15932513'/>
<id>3070c41643609c66d33de3577fc9d8ca15932513</id>
<content type='text'>
We must check the return value of clk_prepare_enable() to make sure the
hardware spinlock controller can be enabled successfully, otherwise we
should return error.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We must check the return value of clk_prepare_enable() to make sure the
hardware spinlock controller can be enabled successfully, otherwise we
should return error.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Change to use devm_platform_ioremap_resource()</title>
<updated>2019-10-05T04:07:19+00:00</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang@linaro.org</email>
</author>
<published>2019-09-27T07:10:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=74cfa956cbead238cf6c5307be461a087c569c97'/>
<id>74cfa956cbead238cf6c5307be461a087c569c97</id>
<content type='text'>
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together, which can simpify the code.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwspinlock: sprd: Switch to SPDX license identifier</title>
<updated>2018-05-24T19:04:48+00:00</updated>
<author>
<name>Suman Anna</name>
<email>s-anna@ti.com</email>
</author>
<published>2018-05-11T17:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0c3e890b1ef31e0de2a6b35493c7f32d18588ab4'/>
<id>0c3e890b1ef31e0de2a6b35493c7f32d18588ab4</id>
<content type='text'>
Use the appropriate SPDX license identifiers in the Spreadtrum hardware
spinlock driver source file and drop the previous boilerplate license text.

Cc: Baolin Wang &lt;baolin.wang@spreadtrum.com&gt;
Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the appropriate SPDX license identifiers in the Spreadtrum hardware
spinlock driver source file and drop the previous boilerplate license text.

Cc: Baolin Wang &lt;baolin.wang@spreadtrum.com&gt;
Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
