linux/drivers/i3c/master
Christophe JAILLET 3f43926f27 i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in 'hci_dat_v1_get_index()'
The code in 'hci_dat_v1_get_index()' really looks like a hand coded version
of 'for_each_set_bit()', except that a +1 is missing when searching for the
next set bit.

This really looks odd and it seems that it will loop until 'dat_w0_read()'
returns the expected result.

So use 'for_each_set_bit()' instead. It is less verbose and should be more
correct.

Fixes: 9ad9a52cce ("i3c/master: introduce the mipi-i3c-hci driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/0cdf3cb10293ead1acd271fdb8a70369c298c082.1637186628.git.christophe.jaillet@wanadoo.fr
2021-12-10 15:55:41 +01:00
..
mipi-i3c-hci i3c/master/mipi-i3c-hci: Fix a potentially infinite loop in 'hci_dat_v1_get_index()' 2021-12-10 15:55:41 +01:00
dw-i3c-master.c i3c: master: dw: Drop redundant disec call 2021-02-06 00:44:15 +01:00
i3c-master-cdns.c i3c: master: cdns: Fix fall-through warning for Clang 2021-06-29 08:37:04 -05:00
Kconfig i3c: master: svc: Add Silvaco I3C master driver 2021-02-06 00:43:29 +01:00
Makefile i3c: master: svc: Add Silvaco I3C master driver 2021-02-06 00:43:29 +01:00
svc-i3c-master.c i3c: master: svc: fix doc warning in svc-i3c-master.c 2021-06-09 02:02:45 +02:00