linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] backlight: qcom-wled: fix and solidify handling of enabled-strings
@ 2021-10-04 19:27 Marijn Suijten
  2021-10-04 19:27 ` [PATCH 01/10] backlight: qcom-wled: Pass number of elements to read to read_u32_array Marijn Suijten
                   ` (9 more replies)
  0 siblings, 10 replies; 34+ messages in thread
From: Marijn Suijten @ 2021-10-04 19:27 UTC (permalink / raw)
  To: phone-devel, Andy Gross, Bjorn Andersson, Lee Jones,
	Daniel Thompson, Jingoo Han
  Cc: ~postmarketos/upstreaming, AngeloGioacchino Del Regno,
	Konrad Dybcio, Martin Botka, Jami Kettunen, Pavel Dubrova,
	Marijn Suijten, Kiran Gunda, Courtney Cavin, Bryan Wu,
	linux-arm-msm, dri-devel, linux-fbdev, linux-kernel

This patchset fixes WLED's handling of enabled-strings: besides some
cleanup it is now actually possible to specify a non-contiguous array of
enabled strings (not necessarily starting at zero) and the values from
DT are now validated to prevent possible unexpected out-of-bounds
register and array element accesses.
Off-by-one mistakes in the maximum number of strings, also causing
out-of-bounds access, have been addressed as well.

Marijn Suijten (10):
  backlight: qcom-wled: Pass number of elements to read to
    read_u32_array
  backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion
  backlight: qcom-wled: Override num-strings when enabled-strings is set
  backlight: qcom-wled: Validate enabled string indices in DT
  backlight: qcom-wled: Fix off-by-one maximum with default num_strings
  backlight: qcom-wled: Remove unnecessary 4th default string in wled3
  backlight: qcom-wled: Provide enabled_strings default for wled 4 and 5
  backlight: qcom-wled: Remove unnecessary double whitespace
  backlight: qcom-wled: Consistently use enabled-strings in
    set_brightness
  backlight: qcom-wled: Consider enabled_strings in autodetection

 drivers/video/backlight/qcom-wled.c | 88 ++++++++++++++++++-----------
 1 file changed, 55 insertions(+), 33 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2021-10-07 21:28 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-04 19:27 [PATCH 00/10] backlight: qcom-wled: fix and solidify handling of enabled-strings Marijn Suijten
2021-10-04 19:27 ` [PATCH 01/10] backlight: qcom-wled: Pass number of elements to read to read_u32_array Marijn Suijten
2021-10-05  9:05   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 02/10] backlight: qcom-wled: Use cpu_to_le16 macro to perform conversion Marijn Suijten
2021-10-05  9:06   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 03/10] backlight: qcom-wled: Override num-strings when enabled-strings is set Marijn Suijten
2021-10-05  9:38   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 04/10] backlight: qcom-wled: Validate enabled string indices in DT Marijn Suijten
2021-10-05  9:14   ` Daniel Thompson
2021-10-05 10:03     ` Marijn Suijten
2021-10-05 10:42       ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 05/10] backlight: qcom-wled: Fix off-by-one maximum with default num_strings Marijn Suijten
2021-10-05  9:19   ` Daniel Thompson
2021-10-05 10:06     ` Marijn Suijten
2021-10-05 10:38       ` Daniel Thompson
2021-10-05 10:53         ` Daniel Thompson
2021-10-05 11:44           ` Marijn Suijten
2021-10-05 14:03             ` Daniel Thompson
2021-10-05 15:23               ` Marijn Suijten
2021-10-05 16:24                 ` Daniel Thompson
2021-10-05 16:50                   ` Konrad Dybcio
2021-10-05 17:34                   ` Marijn Suijten
2021-10-06 14:44                     ` Daniel Thompson
2021-10-07 21:28                       ` Marijn Suijten
2021-10-04 19:27 ` [PATCH 06/10] backlight: qcom-wled: Remove unnecessary 4th default string in wled3 Marijn Suijten
2021-10-05  9:20   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 07/10] backlight: qcom-wled: Provide enabled_strings default for wled 4 and 5 Marijn Suijten
2021-10-05  9:21   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 08/10] backlight: qcom-wled: Remove unnecessary double whitespace Marijn Suijten
2021-10-05  9:21   ` Daniel Thompson
2021-10-04 19:27 ` [PATCH 09/10] backlight: qcom-wled: Consistently use enabled-strings in set_brightness Marijn Suijten
2021-10-05  9:33   ` Daniel Thompson
2021-10-05 10:12     ` Marijn Suijten
2021-10-04 19:27 ` [PATCH 10/10] backlight: qcom-wled: Consider enabled_strings in autodetection Marijn Suijten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).