<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/leds/flash, branch v6.7</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>leds: lm3601x: Convert to use maple tree register cache</title>
<updated>2023-11-01T11:29:00+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-09-29T15:23:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8e31906c75bcb8d36b51992fea318c879f2ae82b'/>
<id>8e31906c75bcb8d36b51992fea318c879f2ae82b</id>
<content type='text'>
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230929-leds-maple-v1-1-ba5f9dcb1e75@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20230929-leds-maple-v1-1-ba5f9dcb1e75@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: mt6370: Annotate struct mt6370_priv with __counted_by</title>
<updated>2023-11-01T11:28:41+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-09-15T20:10:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e3c9d952139c1eb42f35bdcdcb85a66a72587b34'/>
<id>e3c9d952139c1eb42f35bdcdcb85a66a72587b34</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct mt6370_priv.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20230915201051.never.429-kees@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct mt6370_priv.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20230915201051.never.429-kees@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: mt6360: Annotate struct mt6360_priv with __counted_by</title>
<updated>2023-11-01T11:28:40+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-09-15T20:10:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=476301c15d44831413b94d54f248233b14c0ad85'/>
<id>476301c15d44831413b94d54f248233b14c0ad85</id>
<content type='text'>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct mt6360_priv.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20230915201020.never.433-kees@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS
(for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct mt6360_priv.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20230915201020.never.433-kees@kernel.org
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: Convert all platform drivers to return void</title>
<updated>2023-11-01T11:28:35+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-09-17T13:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6061302092305a0584aacf0d82a9d5e66653884c'/>
<id>6061302092305a0584aacf0d82a9d5e66653884c</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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

All platform drivers below drivers/leds/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 ignored (apart
from emitting a warning) 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. Eventually after all drivers
are converted, .remove_new() is renamed to .remove().

All platform drivers below drivers/leds/ unconditionally return zero in
their remove callback and so can be converted trivially to the variant
returning void.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230917130947.1122198-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Put child node if registration failed</title>
<updated>2023-07-28T11:17:40+00:00</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-07-25T09:57:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=546924102de8327a5b2095d2134faed6de971476'/>
<id>546924102de8327a5b2095d2134faed6de971476</id>
<content type='text'>
Put the child node if register flash LED device failed.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Put the child node if register flash LED device failed.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-3-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Turn off LED before setting flash current</title>
<updated>2023-07-28T11:17:32+00:00</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-07-25T09:57:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7c47381c8664d55861036d1d858daf5e9d5d67b8'/>
<id>7c47381c8664d55861036d1d858daf5e9d5d67b8</id>
<content type='text'>
Strobe off the LED before setting flash current to avoid it's being
enabled with an incorrect current if it has been working in torch
mode.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-2-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Strobe off the LED before setting flash current to avoid it's being
enabled with an incorrect current if it has been working in torch
mode.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-2-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Declare the driver as a module</title>
<updated>2023-07-28T11:17:23+00:00</updated>
<author>
<name>Fenglin Wu</name>
<email>quic_fenglinw@quicinc.com</email>
</author>
<published>2023-07-25T09:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=05a576059ac23355a86e4be058cb43997d83c7fd'/>
<id>05a576059ac23355a86e4be058cb43997d83c7fd</id>
<content type='text'>
Explain in Kconfig that the driver can be compiled as a module.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-1-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Explain in Kconfig that the driver can be compiled as a module.

Signed-off-by: Fenglin Wu &lt;quic_fenglinw@quicinc.com&gt;
Link: https://lore.kernel.org/r/20230725-leds-qcom-flash-driver-tiny-fixes-v2-1-0f5cbce5fed0@quicinc.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: sgm3140: Add richtek,rt5033-led compatible</title>
<updated>2023-06-21T18:09:28+00:00</updated>
<author>
<name>Raymond Hackley</name>
<email>raymondhackley@protonmail.com</email>
</author>
<published>2023-06-02T13:11:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7bd932d9adbcc5c5370d968bdb0b00385606bf3a'/>
<id>7bd932d9adbcc5c5370d968bdb0b00385606bf3a</id>
<content type='text'>
Richtek's rt5033-led has pin configurations similar to sgm3140.
Add it to the compatible list.

Signed-off-by: Raymond Hackley &lt;raymondhackley@protonmail.com&gt;
Link: https://lore.kernel.org/r/20230602131024.260297-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Richtek's rt5033-led has pin configurations similar to sgm3140.
Add it to the compatible list.

Signed-off-by: Raymond Hackley &lt;raymondhackley@protonmail.com&gt;
Link: https://lore.kernel.org/r/20230602131024.260297-1-raymondhackley@protonmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative</title>
<updated>2023-06-08T17:12:46+00:00</updated>
<author>
<name>Jiapeng Chong</name>
<email>jiapeng.chong@linux.alibaba.com</email>
</author>
<published>2023-05-31T05:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b3f4b679ff427bba8208177ea52cc39128995f62'/>
<id>b3f4b679ff427bba8208177ea52cc39128995f62</id>
<content type='text'>
The variable 'count' is defined as unsigned type, so the following if
statement is invalid, we can modify the type of count to int.

if (count &lt;= 0) {
	dev_err(dev, "No led-sources specified\n");
	return -ENODEV;
}

./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count &lt;= 0.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531053559.5702-1-jiapeng.chong@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variable 'count' is defined as unsigned type, so the following if
statement is invalid, we can modify the type of count to int.

if (count &lt;= 0) {
	dev_err(dev, "No led-sources specified\n");
	return -ENODEV;
}

./drivers/leds/flash/leds-qcom-flash.c:546:5-10: WARNING: Unsigned expression compared with zero: count &lt;= 0.

Reported-by: Abaci Robot &lt;abaci@linux.alibaba.com&gt;
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5344
Signed-off-by: Jiapeng Chong &lt;jiapeng.chong@linux.alibaba.com&gt;
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230531053559.5702-1-jiapeng.chong@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>leds: as3645a: Replace strlcpy with strscpy</title>
<updated>2023-05-25T11:44:25+00:00</updated>
<author>
<name>Azeem Shaikh</name>
<email>azeemshaikh38@gmail.com</email>
</author>
<published>2023-05-24T14:48:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=36af333a753a22b10771af7d11a28b01183c4190'/>
<id>36af333a753a22b10771af7d11a28b01183c4190</id>
<content type='text'>
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace
it with strscpy()[2]. No return values were used, so direct replacement
is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Link: https://lore.kernel.org/r/20230524144824.2360607-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Part of a tree-wide effort to remove deprecated strlcpy()[1] and replace
it with strscpy()[2]. No return values were used, so direct replacement
is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh &lt;azeemshaikh38@gmail.com&gt;
Link: https://lore.kernel.org/r/20230524144824.2360607-1-azeemshaikh38@gmail.com
Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
