<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/hwspinlock, branch v5.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-03-26T05:30:46Z</updated>
<entry>
<title>hwspinlock: hwspinlock_internal.h: Replace zero-length array with flexible-array member</title>
<updated>2020-03-26T05:30:46Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2020-03-19T21:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef17f5193edd42e8913c93d0b601c101c56a15bb'/>
<id>urn:sha1:ef17f5193edd42e8913c93d0b601c101c56a15bb</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Reviewed-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Link: https://lore.kernel.org/r/20200319213839.GA10669@embeddedor.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: Allow drivers to be built with COMPILE_TEST</title>
<updated>2020-03-26T05:30:46Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-02-10T09:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725'/>
<id>urn:sha1:ffd0bbfb378ecd56eac22bf932ccdbf89ac7f725</id>
<content type='text'>
Allow drivers to be built with COMPILE_TEST.

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/5a95c3de07ef020a4e2f2776fa5adb00637ee387.1581324976.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: sirf: Use devm_hwspin_lock_register() to register hwlock controller</title>
<updated>2020-01-22T00:16:36Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:23:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb36017a8b1b582bcb7063e44c598c3e36aa0228'/>
<id>urn:sha1:cb36017a8b1b582bcb7063e44c598c3e36aa0228</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.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/8f94e67b5f9af20a93418a2fc9cc71b194f1285c.1578453662.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: sirf: Remove redundant PM runtime functions</title>
<updated>2020-01-22T00:16:30Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8f2a0dc87dad7f5c644fc9210a1efb4617acd6a1'/>
<id>urn:sha1:8f2a0dc87dad7f5c644fc9210a1efb4617acd6a1</id>
<content type='text'>
Since the hwspinlock core has changed the PM runtime to be optional, and
the SIRF hardware spinlock has no pm runtime requirement, thus remove
these redundant PM runtime functions.

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/c921e391aa2a652d8d6ae0e4041202cec9d917e7.1578453662.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: sirf: Change to use devm_platform_ioremap_resource()</title>
<updated>2020-01-22T00:16:16Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77d99a6a9df2ac3d1832b408123e48549d1e01fd'/>
<id>urn:sha1:77d99a6a9df2ac3d1832b408123e48549d1e01fd</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.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/dfa043f317c609a6172468ac11598968dd751bce.1578453662.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: omap: Use devm_kzalloc() to allocate memory</title>
<updated>2020-01-22T00:11:25Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42f291ebfdd83a5bf04254f6bdc169f6e5a4152b'/>
<id>urn:sha1:42f291ebfdd83a5bf04254f6bdc169f6e5a4152b</id>
<content type='text'>
Use devm_kzalloc() to allocate memory, which can simplify the error
handling.

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/c066ad704c1a5fd52c3002cac80ddd59b3901b01.1578453062.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: omap: Change to use devm_platform_ioremap_resource()</title>
<updated>2020-01-22T00:11:11Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:13:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf2740068a87e258ccc695d366c8a2c05b46de71'/>
<id>urn:sha1:bf2740068a87e258ccc695d366c8a2c05b46de71</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.
Meanwhile renaming the error label to make more sense after removing
iounmap().

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/6c09c5034a7e68fdfc22d2cb5daa375bccb33a66.1578453062.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller</title>
<updated>2020-01-22T00:10:07Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed0611a604297a642c3fbec86d3482d580b4f764'/>
<id>urn:sha1:ed0611a604297a642c3fbec86d3482d580b4f764</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.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/d69ad8611a68b0cac3c927d19901f3c113c5435c.1578452735.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: qcom: Remove redundant PM runtime functions</title>
<updated>2020-01-22T00:09:10Z</updated>
<author>
<name>Baolin Wang</name>
<email>baolin.wang7@gmail.com</email>
</author>
<published>2020-01-08T03:09:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98ec52ad814013042e0ed386dcfb0c571782e844'/>
<id>urn:sha1:98ec52ad814013042e0ed386dcfb0c571782e844</id>
<content type='text'>
Since the hwspinlock core has changed the PM runtime to be optional, and
the Qualcomm hardware spinlock has no pm runtime requirement, thus remove
these redundant PM runtime functions.

Signed-off-by: Baolin Wang &lt;baolin.wang7@gmail.com&gt;
Link: https://lore.kernel.org/r/e0bb751feb7af709f92e52a07d0e8ebcf1ee44ff.1578452735.git.baolin.wang7@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>hwspinlock: stm32: convert to devm_platform_ioremap_resource</title>
<updated>2019-12-29T04:43:23Z</updated>
<author>
<name>Yangtao Li</name>
<email>tiny.windzz@gmail.com</email>
</author>
<published>2019-12-28T19:15:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d4824486b676ef87071081bdb77a6de2a5a341c7'/>
<id>urn:sha1:d4824486b676ef87071081bdb77a6de2a5a341c7</id>
<content type='text'>
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li &lt;tiny.windzz@gmail.com&gt;
Link: https://lore.kernel.org/r/20191228191541.26999-1-tiny.windzz@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
