u-boot/drivers/sysinfo
Rasmus Villemoes 19213d7a65 sysinfo: gpio: fix loop over DT "revisions" array
There can certainly be a lot more elements in the "revisions" (and
"names") arrays than there are gpios used to form the trinary number
we're searching for; we simply don't know the array size up-front.

Nor do we need to, because the loop body already knows to recognize
-EOVERFLOW as "not that many elements present" (and we have a test
that specifically ensures that dev_read_u32_index() returns exactly
that). So just drop the i < priv->gpio_num condition.

While in here, fix the weird placement of the default: keyword.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2023-03-30 15:09:59 -04:00
..
gazerbeam.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
gazerbeam.h sysinfo: Use global sysinfo IDs for existing sysinfo drivers 2021-05-04 07:57:18 -04:00
gpio.c sysinfo: gpio: fix loop over DT "revisions" array 2023-03-30 15:09:59 -04:00
Kconfig sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver 2021-07-20 23:33:54 +02:00
Makefile sysinfo: rcar3: Add Renesas R-Car Gen3 sysinfo driver 2021-07-20 23:33:54 +02:00
rcar3.c ARM: dts: renesas: Enable sysinfo on R-Car V3H Condor/Condor-I 2023-03-10 17:46:09 +01:00
sandbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sandbox.h sysinfo: Use global sysinfo IDs for existing sysinfo drivers 2021-05-04 07:57:18 -04:00
smbios.c sysinfo: Provide a default driver to set SMBIOS values 2020-11-06 10:18:20 +08:00
sysinfo-uclass.c dm: core: Switch uclass_*_device_err to use uclass_*_device_check 2022-10-29 07:36:33 -06:00