<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/misc/bcm-vk/bcm_vk_msg.c, branch docs-6.5</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.5</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.5'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2022-04-24T15:30:27+00:00</updated>
<entry>
<title>misc: bcm-vk: replace usage of found with dedicated list iterator variable</title>
<updated>2022-04-24T15:30:27+00:00</updated>
<author>
<name>Jakob Koschel</name>
<email>jakobkoschel@gmail.com</email>
</author>
<published>2022-03-27T21:45:51+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=88517757a829e9ce146a6c7233ad5dcdc66fcbb0'/>
<id>urn:sha1:88517757a829e9ce146a6c7233ad5dcdc66fcbb0</id>
<content type='text'>
To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.

To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].

This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel &lt;jakobkoschel@gmail.com&gt;
Link: https://lore.kernel.org/r/20220327214551.2188544-1-jakobkoschel@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: use list_move_tail instead of list_del/list_add_tail in bcm_vk_msg.c</title>
<updated>2021-06-09T12:52:16+00:00</updated>
<author>
<name>Baokun Li</name>
<email>libaokun1@huawei.com</email>
</author>
<published>2021-06-09T07:14:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=20827dddf27d433e45703a4f9bf0a66ab957dd0c'/>
<id>urn:sha1:20827dddf27d433e45703a4f9bf0a66ab957dd0c</id>
<content type='text'>
Using list_move_tail() instead of list_del() + list_add_tail() in bcm_vk_msg.c.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Baokun Li &lt;libaokun1@huawei.com&gt;
Link: https://lore.kernel.org/r/20210609071430.1337400-1-libaokun1@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: Replace zero-length array with flexible array member</title>
<updated>2021-05-21T20:03:29+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2021-05-14T23:08:01+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=208012f051636d1ab8b7f7f86d6988d4b39758af'/>
<id>urn:sha1:208012f051636d1ab8b7f7f86d6988d4b39758af</id>
<content type='text'>
There is a regular need in the kernel to provide a way to declare
having a dynamically sized set of trailing elements in a structure.
Kernel code should always use “flexible array members”[1] for these
cases. The older style of one-element or zero-length arrays should
no longer be used[2].

Also, make use of the struct_size() helper in kzalloc().

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays

Acked-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20210514230801.GA35863@embeddedor
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: unlock on error in bcm_to_h_msg_dequeue()</title>
<updated>2021-02-03T14:57:57+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2021-02-01T12:22:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d7a4bfcac9a5f229aebfe307280e773b5f565443'/>
<id>urn:sha1:d7a4bfcac9a5f229aebfe307280e773b5f565443</id>
<content type='text'>
Unlock before returning on this error path.

Fixes: 111d746bb476 ("misc: bcm-vk: add VK messaging support")
Acked-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Acked-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Link: https://lore.kernel.org/r/YBfyb+jU5lDUe+5g@mwanda
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: fix set_q_num API precedence issue</title>
<updated>2021-01-29T15:57:38+00:00</updated>
<author>
<name>Desmond Yan</name>
<email>desmond.yan@broadcom.com</email>
</author>
<published>2021-01-29T06:04:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d71277dc9bd6789964405e0a55d70c1fb2098f84'/>
<id>urn:sha1:d71277dc9bd6789964405e0a55d70c1fb2098f84</id>
<content type='text'>
Change set_q_num API to use if-else to make it more explicit,
and avoid a precedence rule issue.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Signed-off-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Link: https://lore.kernel.org/r/20210129060403.14801-1-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: reset_pid support</title>
<updated>2021-01-25T17:44:45+00:00</updated>
<author>
<name>Scott Branden</name>
<email>scott.branden@broadcom.com</email>
</author>
<published>2021-01-20T17:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d63d658f74727749088bfe436230b810f3880b0a'/>
<id>urn:sha1:d63d658f74727749088bfe436230b810f3880b0a</id>
<content type='text'>
Add reset support via ioctl.
Kill user processes that are open when VK card is reset.
If a particular PID has issued the reset request do not kill that process
as it issued the ioctl.

Co-developed-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Signed-off-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Link: https://lore.kernel.org/r/20210120175827.14820-11-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: add VK messaging support</title>
<updated>2021-01-25T17:44:44+00:00</updated>
<author>
<name>Scott Branden</name>
<email>scott.branden@broadcom.com</email>
</author>
<published>2021-01-20T17:58:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=111d746bb4767ad476f80fe49067e3df3d9a9375'/>
<id>urn:sha1:111d746bb4767ad476f80fe49067e3df3d9a9375</id>
<content type='text'>
Add message support in order to be able to communicate
to VK card via message queues.

This info is used for debug purposes via collection of logs via direct
read of BAR space and by sysfs access (in a follow on commit).

Co-developed-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Signed-off-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Link: https://lore.kernel.org/r/20210120175827.14820-10-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: bcm-vk: add open/release</title>
<updated>2021-01-25T17:44:44+00:00</updated>
<author>
<name>Scott Branden</name>
<email>scott.branden@broadcom.com</email>
</author>
<published>2021-01-20T17:58:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=22c30607d1e0c604b2450a7aa5bc90a63e24f088'/>
<id>urn:sha1:22c30607d1e0c604b2450a7aa5bc90a63e24f088</id>
<content type='text'>
Add open/release to replace private data with context for other methods
to use.  Reason for the context is because it is allowed for multiple
sessions to open sysfs.  For each file open, when upper layer queries the
response, only those that are tied to a specified open should be returned.

Co-developed-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Acked-by: Olof Johansson &lt;olof@lixom.net&gt;
Signed-off-by: Desmond Yan &lt;desmond.yan@broadcom.com&gt;
Signed-off-by: Scott Branden &lt;scott.branden@broadcom.com&gt;
Link: https://lore.kernel.org/r/20210120175827.14820-7-scott.branden@broadcom.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
