<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/vc04_services, branch v6.10</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>staging: vchiq_debugfs: Fix build if CONFIG_DEBUG_FS is not set</title>
<updated>2024-06-27T13:47:30+00:00</updated>
<author>
<name>Bernhard Rosenkränzer</name>
<email>bero@baylibre.com</email>
</author>
<published>2024-06-27T12:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fcdd7b7bda3c21d1ba1247419e4a1eb8e2d0bfbb'/>
<id>fcdd7b7bda3c21d1ba1247419e4a1eb8e2d0bfbb</id>
<content type='text'>
Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the
dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a
compile time error.

Fixes: c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")
Signed-off-by: Bernhard Rosenkränzer &lt;bero@baylibre.com&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Link: https://lore.kernel.org/r/20240627124419.2498642-1-bero@baylibre.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
vchiq_state") adds a parameter to vchiq_debugfs_init, but leaves the
dummy implementation in the !CONFIG_DEBUG_FS case untouched, causing a
compile time error.

Fixes: c3552ab19aeb ("staging: vchiq_debugfs: Fix NPD in vchiq_dump_state")
Signed-off-by: Bernhard Rosenkränzer &lt;bero@baylibre.com&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Link: https://lore.kernel.org/r/20240627124419.2498642-1-bero@baylibre.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vc04_services: vchiq_arm: Fix initialisation check</title>
<updated>2024-06-24T13:27:45+00:00</updated>
<author>
<name>Kieran Bingham</name>
<email>kieran.bingham@ideasonboard.com</email>
</author>
<published>2024-06-20T22:10:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d941b5877a4eaef367ca48325c22d2e1bd8e8619'/>
<id>d941b5877a4eaef367ca48325c22d2e1bd8e8619</id>
<content type='text'>
The vchiq_state used to be obtained through an accessor which would
validate that the VCHIQ had been initialised correctly with the remote,
or return a null state.

In commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
vchiq_state") the global state was moved to the vchiq_mgnt structures
stored as a vchiq instance specific context. This conversion removed the
helpers and instead replaced users of this helper with the assumption
that the state is always available and the remote connected.

The conversion does ensure that the state is always available, so some
remaining state null pointer checks that remain are unnecessary, but the
assumption that the remote is present and initialised is incorrect.

Fix this broken assumption by re-introducing the logic that was lost
during the conversion.

Fixes: 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state")
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240620221046.2731704-1-kieran.bingham@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The vchiq_state used to be obtained through an accessor which would
validate that the VCHIQ had been initialised correctly with the remote,
or return a null state.

In commit 42a2f6664e18 ("staging: vc04_services: Move global g_state to
vchiq_state") the global state was moved to the vchiq_mgnt structures
stored as a vchiq instance specific context. This conversion removed the
helpers and instead replaced users of this helper with the assumption
that the state is always available and the remote connected.

The conversion does ensure that the state is always available, so some
remaining state null pointer checks that remain are unnecessary, but the
assumption that the remote is present and initialised is incorrect.

Fix this broken assumption by re-introducing the logic that was lost
during the conversion.

Fixes: 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state")
Signed-off-by: Kieran Bingham &lt;kieran.bingham@ideasonboard.com&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240620221046.2731704-1-kieran.bingham@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_debugfs: Fix NPD in vchiq_dump_state</title>
<updated>2024-06-04T11:36:44+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-05-24T15:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c3552ab19aeb8101b751e7c7ad45deab9e1134e1'/>
<id>c3552ab19aeb8101b751e7c7ad45deab9e1134e1</id>
<content type='text'>
The commit 42a2f6664e18 ("staging: vc04_services: Move global g_state
to vchiq_state") falsely assumed that the debugfs entry vchiq/state
was created with vchiq_instance as data. This causes now a NULL
pointer derefence while trying to dump the vchiq state. So fix
this by passing vchiq_state as data, because this is the relevant
part here.

Fixes: 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state")
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240524151542.19415-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit 42a2f6664e18 ("staging: vc04_services: Move global g_state
to vchiq_state") falsely assumed that the debugfs entry vchiq/state
was created with vchiq_instance as data. This causes now a NULL
pointer derefence while trying to dump the vchiq state. So fix
this by passing vchiq_state as data, because this is the relevant
part here.

Fixes: 42a2f6664e18 ("staging: vc04_services: Move global g_state to vchiq_state")
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240524151542.19415-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_core: Add missing blank lines</title>
<updated>2024-05-04T16:42:01+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-25T16:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cf707f77a12b905deb22b2a2420a13c359485bff'/>
<id>cf707f77a12b905deb22b2a2420a13c359485bff</id>
<content type='text'>
checkpatch.pl noticed about missing blank line after 2 declarations.
So add them for better readability.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-6-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
checkpatch.pl noticed about missing blank line after 2 declarations.
So add them for better readability.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-6-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_core: Drop unnecessary blank lines</title>
<updated>2024-05-04T16:42:01+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-25T16:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ac0b096351eb9db9c12da44dee49feafc9f1675b'/>
<id>ac0b096351eb9db9c12da44dee49feafc9f1675b</id>
<content type='text'>
checkpatch.pl noticed

CHECK: Please don't use multiple blank lines

So drop them.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-5-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
checkpatch.pl noticed

CHECK: Please don't use multiple blank lines

So drop them.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-5-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_core: Add parentheses to VCHIQ_MSG_SRCPORT</title>
<updated>2024-05-04T16:42:01+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-25T16:58:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=001a3df620d03ae6284c8b2a014d62e5494b1ff2'/>
<id>001a3df620d03ae6284c8b2a014d62e5494b1ff2</id>
<content type='text'>
checkpatch.pl complains

ERROR: Macros with complex values should be enclosed in parentheses
+#define VCHIQ_MSG_SRCPORT(msgid) \
+	(unsigned short)(((unsigned int)(msgid) &gt;&gt; 12) &amp; 0xfff)

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-4-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
checkpatch.pl complains

ERROR: Macros with complex values should be enclosed in parentheses
+#define VCHIQ_MSG_SRCPORT(msgid) \
+	(unsigned short)(((unsigned int)(msgid) &gt;&gt; 12) &amp; 0xfff)

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-4-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_core: Use printk messages for devices</title>
<updated>2024-05-04T16:42:01+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-25T16:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=aab643309b01342b47e8f11565e6ad5936bbfd9e'/>
<id>aab643309b01342b47e8f11565e6ad5936bbfd9e</id>
<content type='text'>
Now that struct vchiq_state has a device reference, we can convert
the remaining printk message helpers.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-3-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that struct vchiq_state has a device reference, we can convert
the remaining printk message helpers.

Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-3-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vchiq_arm: Drop unnecessary NULL check</title>
<updated>2024-05-04T16:42:01+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-25T16:58:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4e81120fe11e2e7f76a9e557f3ca9ab5acb78040'/>
<id>4e81120fe11e2e7f76a9e557f3ca9ab5acb78040</id>
<content type='text'>
Looking at the handling of service instance within the VCHIQ
driver shows that it's not possible that service_callback is
called with instance is a NULL pointer. So drop the unnecessary
NULL check and fix:

vchiq_arm.c:1109 service_callback() warn:
  variable dereferenced before check 'instance' (see line 1091)

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/linux-arm-kernel/202404230315.vx7ESZ3r-lkp@intel.com/
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-2-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Looking at the handling of service instance within the VCHIQ
driver shows that it's not possible that service_callback is
called with instance is a NULL pointer. So drop the unnecessary
NULL check and fix:

vchiq_arm.c:1109 service_callback() warn:
  variable dereferenced before check 'instance' (see line 1091)

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/linux-arm-kernel/202404230315.vx7ESZ3r-lkp@intel.com/
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240425165852.6681-2-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vc04_services: Delete unnecessary NULL check</title>
<updated>2024-05-04T16:41:48+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-04-24T11:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a0e244ec59bdc4caac4b7a105f029fd1af28f0f2'/>
<id>a0e244ec59bdc4caac4b7a105f029fd1af28f0f2</id>
<content type='text'>
The "state" pointer points to an offset in the middle of the "mgmt"
struct so it can't possibly be NULL.  And also we dereferenced it on the
line before.  So this NULL check is pointless.  Delete it.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/526ec2ff-6277-4d5d-b2d9-63b087a97c7c@moroto.mountain
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "state" pointer points to an offset in the middle of the "mgmt"
struct so it can't possibly be NULL.  And also we dereferenced it on the
line before.  So this NULL check is pointless.  Delete it.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/526ec2ff-6277-4d5d-b2d9-63b087a97c7c@moroto.mountain
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: vc04_services: vchiq_arm: Fix NULL ptr dereferences</title>
<updated>2024-05-04T16:41:36+00:00</updated>
<author>
<name>Stefan Wahren</name>
<email>wahrenst@gmx.net</email>
</author>
<published>2024-04-20T09:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=62cbabc6fd228e62daff6ec108fae35632e2b692'/>
<id>62cbabc6fd228e62daff6ec108fae35632e2b692</id>
<content type='text'>
The commit 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop
g_cache_line_size") introduced NULL pointer dereferences by
using the wrong device.

Fixes: 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size")
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240420091240.9552-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop
g_cache_line_size") introduced NULL pointer dereferences by
using the wrong device.

Fixes: 8c9753f63905 ("staging: vc04_services: vchiq_arm: Drop g_cache_line_size")
Signed-off-by: Stefan Wahren &lt;wahrenst@gmx.net&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Umang Jain &lt;umang.jain@ideasonboard.com&gt;
Link: https://lore.kernel.org/r/20240420091240.9552-1-wahrenst@gmx.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
