<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/media/platform/ti, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-04-12T07:46:06Z</updated>
<entry>
<title>media: Prefer designated initializers over memset for subdev pad ops</title>
<updated>2023-04-12T07:46:06Z</updated>
<author>
<name>Laurent Pinchart</name>
</author>
<published>2023-02-15T15:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3a69496a1cde364c74a600d7a370179b58aed29'/>
<id>urn:sha1:e3a69496a1cde364c74a600d7a370179b58aed29</id>
<content type='text'>
Structures passed to subdev pad operations are all zero-initialized, but
not always with the same kind of code constructs. While most drivers
used designated initializers, which zero all the fields that are not
specified, when declaring variables, some use memset(). Those two
methods lead to the same end result, and, depending on compiler
optimizations, may even be completely equivalent, but they're not
consistent.

Improve coding style consistency by using designated initializers
instead of calling memset(). Where applicable, also move the variables
to inner scopes of for loops to ensure correct initialization in all
iterations.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Reviewed-by: Lad Prabhakar &lt;prabhakar.csengg@gmail.com&gt; # For am437x
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: Zero-initialize all structures passed to subdev pad operations</title>
<updated>2023-04-12T07:46:06Z</updated>
<author>
<name>Laurent Pinchart</name>
</author>
<published>2023-02-15T15:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ecefa105cc44fff6d170ac5f441e76cb229f8e19'/>
<id>urn:sha1:ecefa105cc44fff6d170ac5f441e76cb229f8e19</id>
<content type='text'>
Several drivers call subdev pad operations, passing structures that are
not fully zeroed. While the drivers initialize the fields they care
about explicitly, this results in reserved fields having uninitialized
values. Future kernel API changes that make use of those fields thus
risk breaking proper driver operation in ways that could be hard to
detect.

To avoid this, make the code more robust by zero-initializing all the
structures passed to subdev pad operation. Maintain a consistent coding
style by preferring designated initializers (which zero-initialize all
the fields that are not specified) over memset() where possible, and
make variable declarations local to inner scopes where applicable. One
notable exception to this rule is in the ipu3 driver, where a memset()
is needed as the structure is not a local variable but a function
parameter provided by the caller.

Not all fields of those structures can be initialized when declaring the
variables, as the values for those fields are computed later in the
code. Initialize the 'which' field in all cases, and other fields when
the variable declaration is so close to the v4l2_subdev_call() call that
it keeps all the context easily visible when reading the code, to avoid
hindering readability.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt; # For vimc
Reviewed-by: Lad Prabhakar &lt;prabhakar.csengg@gmail.com&gt; # For am437x
Acked-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Reviewed-by: Tomi Valkeinen &lt;tomi.valkeinen@ideasonboard.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Reviewed-by: Philipp Zabel &lt;p.zabel@pengutronix.de&gt; # For drivers/staging/media/imx/
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vpe: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f0f431d3c3aae3be8f40155c21141fd90023a7f5'/>
<id>urn:sha1:f0f431d3c3aae3be8f40155c21141fd90023a7f5</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: isp: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5599fadaf861d90b971023ac01592e6625d9305a'/>
<id>urn:sha1:5599fadaf861d90b971023ac01592e6625d9305a</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: omap_vout: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a44e5f60617eeb0aa4e7f75bda3943b448a9845'/>
<id>urn:sha1:0a44e5f60617eeb0aa4e7f75bda3943b448a9845</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vpif_display: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=801edb6571286b04eb6ac8ac8175d573f302b3cc'/>
<id>urn:sha1:801edb6571286b04eb6ac8ac8175d573f302b3cc</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vpif_capture: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=973be9663e047c1d08a452a2aecc8f795020c0d2'/>
<id>urn:sha1:973be9663e047c1d08a452a2aecc8f795020c0d2</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: vpif: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=add8eb46e72b834a82b9e72b28e71ee0ca344d22'/>
<id>urn:sha1:add8eb46e72b834a82b9e72b28e71ee0ca344d22</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: cal: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f57329adcc52d367c605dfe49a83958ab627ca6f'/>
<id>urn:sha1:f57329adcc52d367c605dfe49a83958ab627ca6f</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>media: am437x-vpfe: Convert to platform remove callback returning void</title>
<updated>2023-04-11T14:59:19Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2023-03-26T14:31:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c4727edc8ca9dbc08cca2aedafa66d16a226499'/>
<id>urn:sha1:2c4727edc8ca9dbc08cca2aedafa66d16a226499</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
</content>
</entry>
</feed>
