Repository navigation
Commit 799d5eb
gpiolib: Fix incorrect use of find_next_zero_bit()
Commit b17566a ("gpiolib: Implement fast processing path in
get/set array"), already fixed to some extent with commit 5d581d7e8cdc
("gpiolib: Fix missing updates of bitmap index"), introduced a new mode
of processing bitmaps where bits applicable for fast bitmap processing
path are supposed to be skipped while iterating bits which don't apply.
Unfortunately, find_next_zero_bit() function supposed to skip over
those fast bits is always called with a 'start' argument equal to an
index of last zero bit found and returns that index value again an
again, causing an infinite loop.
Fix it by incrementing the index uncoditionally before
find_next_zero_bit() is optionally called.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>1 parent be8c8fa commit 799d5eb
1 file changed
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2920 | 2920 | | |
2921 | 2921 | | |
2922 | 2922 | | |
| 2923 | + | |
2923 | 2924 | | |
2924 | 2925 | | |
2925 | 2926 | | |
2926 | 2927 | | |
2927 | | - | |
2928 | | - | |
2929 | 2928 | | |
2930 | 2929 | | |
2931 | 2930 | | |
| |||
2945 | 2944 | | |
2946 | 2945 | | |
2947 | 2946 | | |
| 2947 | + | |
2948 | 2948 | | |
2949 | 2949 | | |
2950 | 2950 | | |
2951 | 2951 | | |
2952 | | - | |
2953 | | - | |
2954 | 2952 | | |
2955 | 2953 | | |
2956 | 2954 | | |
| |||
3233 | 3231 | | |
3234 | 3232 | | |
3235 | 3233 | | |
| 3234 | + | |
3236 | 3235 | | |
3237 | 3236 | | |
3238 | 3237 | | |
3239 | 3238 | | |
3240 | | - | |
3241 | | - | |
3242 | 3239 | | |
3243 | 3240 | | |
3244 | 3241 | | |
| |||
0 commit comments